diff --git a/.github/actions/constellation_create/action.yml b/.github/actions/constellation_create/action.yml index 2935c0690f..e62d898a49 100644 --- a/.github/actions/constellation_create/action.yml +++ b/.github/actions/constellation_create/action.yml @@ -136,6 +136,8 @@ runs: --info logcollect.github.runner-os="${{ runner.os }}" \ --info logcollect.github.e2e-test-payload="${{ inputs.test }}" \ --info logcollect.github.is-debug-cluster=false \ + --info logcollect.github.ref-stream="${{ inputs.refStream }}" \ + --info logcollect.github.kubernetes-version="${{ inputs.kubernetesVersion }}" \ --info logcollect.deployment-type="debugd" \ --verbosity=-1 \ --force diff --git a/.github/actions/deploy_logcollection/action.yml b/.github/actions/deploy_logcollection/action.yml index 43fba1cf87..3cb03e8c76 100644 --- a/.github/actions/deploy_logcollection/action.yml +++ b/.github/actions/deploy_logcollection/action.yml @@ -23,6 +23,12 @@ inputs: isDebugImage: description: "Whether the cluster is a debug cluster / uses a debug image." required: true + refStream: + description: "Reference and stream of the image in use" + required: false + kubernetesVersion: + description: "Kubernetes version of the cluster" + required: false runs: using: "composite" @@ -46,6 +52,8 @@ runs: --fields github.e2e-test-payload="${{ inputs.test }}" \ --fields github.isDebugImage="${{ inputs.isDebugImage }}" \ --fields github.e2e-test-provider="${{ inputs.provider }}" \ + --fields github.ref-stream="${{ inputs.refStream }}" \ + --fields github.kubernetes-version="${{ inputs.kubernetesVersion }}" \ --fields deployment-type="k8s" # Make sure that helm is installed diff --git a/.github/actions/e2e_test/action.yml b/.github/actions/e2e_test/action.yml index 2aaacae13e..8e512458c2 100644 --- a/.github/actions/e2e_test/action.yml +++ b/.github/actions/e2e_test/action.yml @@ -23,6 +23,8 @@ inputs: description: "Version of a released CLI to download, e.g. 'v2.3.0', leave empty to build it." kubernetesVersion: description: "Kubernetes version to create the cluster from." + refStream: + description: "RefStream of the image" regionZone: description: "Region or zone to use for resource creation" required: false @@ -51,7 +53,7 @@ inputs: description: "Azure credentials authorized to create an IAM configuration." required: true test: - description: "The test to run. Can currently be one of [sonobuoy full, sonobuoy quick, autoscaling, lb, perf-bench, verify, recover, malicious join, nop]." + description: "The test to run. Can currently be one of [sonobuoy full, sonobuoy quick, autoscaling, lb, perf-bench, verify, recover, malicious join, nop, upgrade]." required: true sonobuoyTestSuiteCmd: description: "The sonobuoy test suite to run." @@ -85,7 +87,7 @@ runs: using: "composite" steps: - name: Check input - if: (!contains(fromJson('["sonobuoy full", "sonobuoy quick", "autoscaling", "perf-bench", "verify", "lb", "recover", "malicious join", "nop"]'), inputs.test)) + if: (!contains(fromJson('["sonobuoy full", "sonobuoy quick", "autoscaling", "perf-bench", "verify", "lb", "recover", "malicious join", "nop", "upgrade"]'), inputs.test)) shell: bash run: | echo "::error::Invalid input for test field: ${{ inputs.test }}" @@ -261,12 +263,14 @@ runs: test: ${{ inputs.test }} provider: ${{ inputs.cloudProvider }} isDebugImage: ${{ inputs.isDebugImage }} + kubernetesVersion: ${{ inputs.kubernetesVersion }} + refStream: ${{ inputs.refStream }} # # Test payloads # - name: Nop test payload - if: inputs.test == 'nop' + if: (inputs.test == 'nop') || (inputs.test == 'upgrade') shell: bash run: | echo "::warning::This test has a nop payload. It doesn't run any tests." diff --git a/.github/actions/notify_failure/action.yml b/.github/actions/notify_failure/action.yml index 2fd5bb1a77..7d8640b02b 100644 --- a/.github/actions/notify_failure/action.yml +++ b/.github/actions/notify_failure/action.yml @@ -37,7 +37,7 @@ runs: run: | # TODO(katexochen): add job number when possible jobURL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - opensearchURL="https://search-e2e-logs-y46renozy42lcojbvrt3qq7csm.eu-central-1.es.amazonaws.com/_dashboards/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-7d,to:now))&_a=(columns:!(metadata.name,systemd.unit,kubernetes.pod_name,message),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.e2e-test-provider,negate:!f,params:(query:${{ inputs.provider }}),type:phrase),query:(match_phrase:(metadata.github.e2e-test-provider:${{ inputs.provider }}))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.run-id,negate:!f,params:(query:${{ github.run_id }}),type:phrase),query:(match_phrase:(metadata.github.run-id:${{ github.run_id }})))),index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',interval:auto,query:(language:kuery,query:''),sort:!())" + opensearchURL="https://search-e2e-logs-y46renozy42lcojbvrt3qq7csm.eu-central-1.es.amazonaws.com/_dashboards/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-7d,to:now))&_a=(columns:!(metadata.name,systemd.unit,kubernetes.pod_name,message),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.e2e-test-provider,negate:!f,params:(query:${{ inputs.provider }}),type:phrase),query:(match_phrase:(metadata.github.e2e-test-provider:${{ inputs.provider }}))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.run-id,negate:!f,params:(query:${{ github.run_id }}),type:phrase),query:(match_phrase:(metadata.github.run-id:${{ github.run_id }}))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.ref-stream.keyword,negate:!f,params:(query:'${{ inputs.refStream }}'),type:phrase),query:(match_phrase:(metadata.github.ref-stream.keyword:'${{ inputs.refStream }}'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.kubernetes-version.keyword,negate:!f,params:(query:'${{ inputs.kubernetesVersion }}'),type:phrase),query:(match_phrase:(metadata.github.kubernetes-version.keyword:'${{ inputs.kubernetesVersion }}'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.e2e-test-payload,negate:!f,params:(query:'${{ inputs.test }}'),type:phrase),query:(match_phrase:(metadata.github.e2e-test-payload:'${{ inputs.test }}')))),index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',interval:auto,query:(language:kuery,query:''),sort:!())" cat << EOF > header.md ## Metadata diff --git a/.github/workflows/e2e-test-daily.yml b/.github/workflows/e2e-test-daily.yml index 3888b85d9e..21696517da 100644 --- a/.github/workflows/e2e-test-daily.yml +++ b/.github/workflows/e2e-test-daily.yml @@ -73,6 +73,7 @@ jobs: osImage: ${{ matrix.refStream == 'ref/release/stream/stable/?' && needs.find-latest-image.outputs.image-release-stable || needs.find-latest-image.outputs.image-main-debug }} isDebugImage: ${{ matrix.refStream == 'ref/main/stream/debug/?' }} cliVersion: ${{ matrix.refStream == 'ref/release/stream/stable/?' && needs.find-latest-image.outputs.image-release-stable || '' }} + refStream: ${{ matrix.refStream }} gcpProject: ${{ secrets.GCP_E2E_PROJECT }} gcpClusterCreateServiceAccount: "constellation-e2e-cluster@constellation-331613.iam.gserviceaccount.com" gcpIAMCreateServiceAccount: "constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com" diff --git a/.github/workflows/e2e-test-weekly.yml b/.github/workflows/e2e-test-weekly.yml index b57bdf6b16..e7766d98a5 100644 --- a/.github/workflows/e2e-test-weekly.yml +++ b/.github/workflows/e2e-test-weekly.yml @@ -213,6 +213,7 @@ jobs: isDebugImage: ${{ matrix.refStream == 'ref/main/stream/debug/?' }} cliVersion: ${{ matrix.refStream == 'ref/release/stream/stable/?' && needs.find-latest-image.outputs.image-release-stable || '' }} kubernetesVersion: ${{ matrix.kubernetes-version }} + refStream: ${{ matrix.refStream }} awsOpenSearchDomain: ${{ secrets.AWS_OPENSEARCH_DOMAIN }} awsOpenSearchUsers: ${{ secrets.AWS_OPENSEARCH_USER }} awsOpenSearchPwd: ${{ secrets.AWS_OPENSEARCH_PWD }} diff --git a/.github/workflows/e2e-upgrade.yml b/.github/workflows/e2e-upgrade.yml index ec7a079b89..7e383953c2 100644 --- a/.github/workflows/e2e-upgrade.yml +++ b/.github/workflows/e2e-upgrade.yml @@ -169,7 +169,7 @@ jobs: gcpClusterCreateServiceAccount: "constellation-e2e-cluster@constellation-331613.iam.gserviceaccount.com" gcpIAMCreateServiceAccount: "constellation-iam-e2e@constellation-331613.iam.gserviceaccount.com" gcpInClusterServiceAccountKey: ${{ secrets.GCP_CLUSTER_SERVICE_ACCOUNT }} - test: "nop" + test: "upgrade" buildBuddyApiKey: ${{ secrets.BUILDBUDDY_ORG_API_KEY }} azureClusterCreateCredentials: ${{ secrets.AZURE_E2E_CLUSTER_CREDENTIALS }} azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} diff --git a/debugd/internal/debugd/logcollector/fields.go b/debugd/internal/debugd/logcollector/fields.go index 6e95ce1ce3..a694abe66d 100644 --- a/debugd/internal/debugd/logcollector/fields.go +++ b/debugd/internal/debugd/logcollector/fields.go @@ -32,8 +32,10 @@ var ( // cloud provider used in e2e test. If deployed with debugd, this is a duplicate as its also // available in the metadata. If deployed through K8s in e2e tests with a stable image, this // is where the cloud provider is saved in. - "github.e2e-test-provider": {}, - "deployment-type": {}, // deployment type, e.g. "debugd", "k8s" + "github.e2e-test-provider": {}, + "github.ref-stream": {}, + "github.kubernetes-version": {}, + "deployment-type": {}, // deployment type, e.g. "debugd", "k8s" } )