Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Thabokani authored Feb 27, 2024
2 parents a913af5 + 4b626c7 commit 23def50
Show file tree
Hide file tree
Showing 381 changed files with 16,775 additions and 2,871 deletions.
65 changes: 48 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ parameters:
starlark-test-args-file-test-main-star-relative-path:
type: string
default: "internal_testsuites/starlark/ci_tests/simple_arg_test/main.star"
starlark-test-taints-and-tolerations:
type: string
default: "internal_testsuites/starlark/taints_and_tolerations/taints_and_toleration_test.star"
starlark-test-args-file-test-args-json-relative-path:
type: string
default: "internal_testsuites/starlark/ci_tests/simple_arg_test/args.json"
Expand Down Expand Up @@ -525,6 +528,11 @@ jobs:
docker:
- image: "docker/tilt-releaser@sha256:<< pipeline.parameters.tilt-releaser-version >>"
resource_class: large
parameters:
all_architectures:
description: "Whether we should build all architectures or not"
type: boolean
default: false
steps:
- checkout

Expand All @@ -549,24 +557,32 @@ jobs:
- << pipeline.parameters.cli-build-cache-key-prefix >>-{{ checksum "cli/cli/go.sum" }}

- run: |
cli/cli/scripts/build.sh true
cli/cli/scripts/build.sh << parameters.all_architectures >>
- save_cache:
key: << pipeline.parameters.cli-build-cache-key-prefix >>-{{ checksum "cli/cli/go.sum" }}
paths:
- "/go/pkg/mod" # Go module cache for the Goreleaser image, as reported by "go env GOMODCACHE"
- "/root/.cache/go-build" # Go build cache for the Goreleaser image, as reported by "go env GOCACHE"
- persist_to_workspace:
root: .
paths:
- "./<< pipeline.parameters.cli-dist-home-relative-dirpath >>"
- "./<< pipeline.parameters.startosis-test-script-file-relative-path >>"
# only save cache and persist to workspace the CLI built for just the CircleCI architecture
- when:
condition:
equal: [ false, << parameters.all_architectures >> ]
steps:
- save_cache:
key: << pipeline.parameters.cli-build-cache-key-prefix >>-{{ checksum "cli/cli/go.sum" }}
paths:
- "/go/pkg/mod" # Go module cache for the Goreleaser image, as reported by "go env GOMODCACHE"
- "/root/.cache/go-build" # Go build cache for the Goreleaser image, as reported by "go env GOCACHE"

- persist_to_workspace:
root: .
paths:
- "./<< pipeline.parameters.cli-dist-home-relative-dirpath >>"
- "./<< pipeline.parameters.startosis-test-script-file-relative-path >>"
- "./<< pipeline.parameters.starlark-test-taints-and-tolerations >>"

build_golang_testsuite:
executor: ubuntu_vm
parameters:
<<: *param_cli_cluster_backend
parallelism: 4
steps:
- checkout

Expand Down Expand Up @@ -600,7 +616,7 @@ jobs:
equal: [ "kubernetes", << parameters.cli-cluster-backend >> ]
steps:
- run: |
if ! ./internal_testsuites/golang/scripts/test.sh kubernetes; then
if ! ./internal_testsuites/golang/scripts/test.sh kubernetes true; then
touch /tmp/testsuite-failed
fi
Expand All @@ -611,7 +627,7 @@ jobs:
equal: [ "docker", << parameters.cli-cluster-backend >> ]
steps:
- run: |
if ! ./internal_testsuites/golang/scripts/test.sh; then
if ! ./internal_testsuites/golang/scripts/test.sh docker true; then
touch /tmp/testsuite-failed
fi
Expand Down Expand Up @@ -762,9 +778,9 @@ jobs:
false
fi
- run:
name: "Verify Kurtosis cleaned up all its volumes (except for the log storage volume, so we can persist service logs)"
name: "Verify Kurtosis cleaned up all its volumes (except for the log storage and github auth storage volumes)"
command: |
if ! [ $(docker volume ls | grep -v kurtosis-logs-collector-vol | grep -v kurtosis-logs-db-vol | tail -n+2 | wc -l ) -eq 1 ]; then
if ! [ $(docker volume ls | grep -v kurtosis-logs-collector-vol | grep -v kurtosis-logs-db-vol | tail -n+2 | wc -l ) -eq 2 ]; then
docker volume ls
false
fi
Expand Down Expand Up @@ -877,6 +893,10 @@ jobs:
- run: "${KURTOSIS_BINPATH} files storeservice test-enclave test1 /usr/local/apache2/conf/httpd.conf --name stored-file"
- run: "${KURTOSIS_BINPATH} files download test-enclave stored-file ."

# Check Dump Contains files
- run: "${KURTOSIS_BINPATH} enclave dump test-enclave test-dump"
- run: "ls test-dump/files/rendered-file"

# Module inside an enclave
- run: "${KURTOSIS_BINPATH} enclave ls"
- run: "${KURTOSIS_BINPATH} enclave inspect test-enclave"
Expand Down Expand Up @@ -909,6 +929,12 @@ jobs:
# Execute docker compose import
- run: "${KURTOSIS_BINPATH} import --enclave test-import --env << pipeline.parameters.dockerimport-cli-dotenv-relative-path >> << pipeline.parameters.dockerimport-cli-dockerfile-relative-path >>"

# This just tests that tolerations don't mess up Docker
# TODO add proper tests for Docker and Kubernetes that test
# Adding Toleration to a tainted cluster makes things work
# Not having toleration fails
- run: "${KURTOSIS_BINPATH} run --enclave with-tolerations << pipeline.parameters.workspace-with-cli-binary-and-images-mountpoint >>/<< pipeline.parameters.starlark-test-taints-and-tolerations >>"

# Execute engine functions
- run: "${KURTOSIS_BINPATH} engine stop"
- run: "${KURTOSIS_BINPATH} engine stop"
Expand Down Expand Up @@ -991,9 +1017,9 @@ jobs:
false
fi
- run:
name: "Verify Kurtosis cleaned up all its volumes (except for the log storage volume, so we can persist service logs)"
name: "Verify Kurtosis cleaned up all its volumes (except for the log storage and github auth storage volumes)"
command: |
if ! [ $(docker volume ls | grep -v kurtosis-logs-collector-vol | grep -v kurtosis-logs-db-vol | tail -n+2 | wc -l) -eq 1 ]; then
if ! [ $(docker volume ls | grep -v kurtosis-logs-collector-vol | grep -v kurtosis-logs-db-vol | tail -n+2 | wc -l) -eq 2 ]; then
docker volume ls
false
fi
Expand Down Expand Up @@ -1460,6 +1486,11 @@ workflows:
- build_cli:
<<: *filters_ignore_main

- build_cli:
all_architectures: true
name: "Check if CLI builds for all os and arch pairs"
<<: *filters_ignore_main

- test_enclave_manager_web_ui:
name: "Test Basic Web UI Functionality in Docker"
context:
Expand Down
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/docs-issue.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: "Docs Issue"
description: Report an issue in our documentation
labels: ["docs"]
assignees:
- leeederek
- thylocine33
assignees: []
body:
- type: input
id: url-link
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/check-proto-break.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,25 @@ on:
- edited

jobs:
check-if-code-change:
runs-on: ubuntu-latest
outputs:
change: ${{ steps.check.outputs.change }}
steps:
- uses: actions/checkout@v4
with:
go-version: '1.20'
fetch-depth: 0
- run: |
if git --no-pager diff --exit-code origin/main...HEAD -- . ':!docs' ':!*.md'; then
echo "::set-output name=change::false"
else
echo "::set-output name=change::true"
fi
id: check
check-proto-break:
needs: check-if-code-change
if: ${{ needs.check-if-code-change.outputs.change == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/gofmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,25 @@ on:
merge_group:

jobs:
check-if-code-change:
runs-on: ubuntu-latest
outputs:
change: ${{ steps.check.outputs.change }}
steps:
- uses: actions/checkout@v4
with:
go-version: '1.20'
fetch-depth: 0
- run: |
if git --no-pager diff --exit-code origin/main...HEAD -- . ':!docs' ':!*.md'; then
echo "::set-output name=change::false"
else
echo "::set-output name=change::true"
fi
id: check
gofmt:
needs: check-if-code-change
if: ${{ needs.check-if-code-change.outputs.change == 'true' }}
name: gofmt
runs-on: ubuntu-latest
steps:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,25 @@ env:
GOLINT_VERSION: v1.53.3

jobs:
check-if-code-change:
runs-on: ubuntu-latest
outputs:
change: ${{ steps.check.outputs.change }}
steps:
- uses: actions/checkout@v4
with:
go-version: '1.20'
fetch-depth: 0
- run: |
if git --no-pager diff --exit-code origin/main...HEAD -- . ':!docs' ':!*.md'; then
echo "::set-output name=change::false"
else
echo "::set-output name=change::true"
fi
id: check
golangci:
needs: check-if-code-change
if: ${{ needs.check-if-code-change.outputs.change == 'true' }}
name: golang-lint
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 6 additions & 0 deletions .run/APIC-remote-debug.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="APIC-remote-debug" type="GoRemoteDebugConfigurationType" factoryName="Go Remote" port="50103">
<option name="disconnectOption" value="ASK" />
<method v="2" />
</configuration>
</component>
6 changes: 6 additions & 0 deletions .run/CLI-remote-debug.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="CLI-remote-debug" type="GoRemoteDebugConfigurationType" factoryName="Go Remote" port="50101">
<option name="disconnectOption" value="ASK" />
<method v="2" />
</configuration>
</component>
6 changes: 6 additions & 0 deletions .run/Engine-remote-debug.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Engine-remote-debug" type="GoRemoteDebugConfigurationType" factoryName="Go Remote" port="50102">
<option name="disconnectOption" value="ASK" />
<method v="2" />
</configuration>
</component>
Loading

0 comments on commit 23def50

Please sign in to comment.