Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow condition in cloud functional tests #7907

Merged

Conversation

lakshmimsft
Copy link
Contributor

Description

Ref: #7892
Based on logs seen for errors in the past week,
eg. https://github.com/radius-project/radius/actions/runs/10753879482/job/29823820614

Adding condition to workflow to run when github.event.workflow_run.conclusion == 'success' when event is workflow_run.
Keeping additional debug logs in place for the next few days to monitor any subsequent failures.
Another PR to remove logs will be sent closer to end of this week if no failures are detected.

Type of change

Fixes: #7782

@lakshmimsft lakshmimsft requested review from a team as code owners September 9, 2024 17:16
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.00%. Comparing base (f89f424) to head (059d4bd).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7907   +/-   ##
=======================================
  Coverage   61.00%   61.00%           
=======================================
  Files         527      527           
  Lines       27844    27844           
=======================================
  Hits        16986    16986           
  Misses       9365     9365           
  Partials     1493     1493           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@radius-functional-tests
Copy link

radius-functional-tests bot commented Sep 9, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository lakshmimsft/radius-mainfork
Commit ref 776c349
Unique ID func01b72f422c
Image tag pr-func01b72f422c
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func01b72f422c
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func01b72f422c
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func01b72f422c
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func01b72f422c
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
⌛ Starting datastoresrp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ datastoresrp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@ytimocin
Copy link
Contributor

ytimocin commented Sep 9, 2024

The problem is here:

let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {

When this action is called from not a pull request then the matchArtifact is null and, that is why, the matchArtifact.id throws an error:

artifact_id: matchArtifact.id,

@lakshmimsft

@lakshmimsft
Copy link
Contributor Author

lakshmimsft commented Sep 9, 2024

@ytimocin, we want to restrict the downstream workflow (cloud functional tests) to run on valid approved PRs when the event is workflow_run. All the errored workflow runs the past few days were on branches that had a 'failure' conclusion status (so far i looked, it was set to failure for either timing out, waiting for approvals or deploy errors on the upstream approval workflow), There were not valid active PRs and these branches were deleted (in the above example) multiple weeks ago.
The downstream functional cloud test workflow should not run attempt to run on these failed upstream workflow runs. As you have pointed out, the artifacts will not exist.

After the current proposed change is merged in, we still want to continue to monitor and see if we still get this error when the conclusion is a 'success' and if that does occur, debug why the artifacts will not exist in those cases.(so far that has not occured) Let me know if that makes sense or we should change approach.

@lakshmimsft lakshmimsft force-pushed the lakshmimsft/addwrkflowcondition branch from 776c349 to 059d4bd Compare September 9, 2024 19:09
@radius-functional-tests
Copy link

radius-functional-tests bot commented Sep 9, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository lakshmimsft/radius-mainfork
Commit ref 059d4bd
Unique ID func87cf6b83d3
Image tag pr-func87cf6b83d3
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func87cf6b83d3
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func87cf6b83d3
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func87cf6b83d3
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func87cf6b83d3
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting datastoresrp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ datastoresrp-cloud functional tests succeeded
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

Copy link
Contributor

@ytimocin ytimocin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can give it a try.

@ytimocin ytimocin merged commit 8151a96 into radius-project:main Sep 9, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Cannot read properties of undefined (reading 'id') in functional-test-cloud workflow in main
2 participants