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

ci: add retry to cosign keyless test #1109

Merged

Conversation

akashsinghal
Copy link
Collaborator

Description

What this PR does / why we need it:

Adds 3 retries to the cosign keyless test due to intermittent rekor server timeouts.
Adds 10 second backoff

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):

Fixes #1057

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Helm Chart Change (any edit/addition/update that is necessary for changes merged to the main branch)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • Does the affected code have corresponding tests?
  • Are the changes documented, not just with inline documentation, but also with conceptual documentation such as an overview of a new feature, or task-based documentation like a tutorial? Consider if this change should be announced on your project blog.
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have appropriate license header?

Post Merge Requirements

  • MAINTAINERS: manually trigger the "Publish Package" workflow after merging any PR that indicates Helm Chart Change

@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (9f1c41e) 52.30% compared to head (9348767) 52.30%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1109   +/-   ##
=======================================
  Coverage   52.30%   52.30%           
=======================================
  Files         101      101           
  Lines        6305     6305           
=======================================
  Hits         3298     3298           
  Misses       2688     2688           
  Partials      319      319           

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

@akashsinghal akashsinghal marked this pull request as ready for review October 3, 2023 19:58
@@ -81,8 +81,7 @@ SLEEP_TIME=1
run kubectl replace -f ./config/samples/config_v1beta1_store_oras.yaml
sleep 5

run kubectl run cosign-demo-keyless --namespace default --image=wabbitnetworks.azurecr.io/test/cosign-image:signed-keyless
assert_success
wait_for_process 20 10 'kubectl run cosign-demo-keyless --namespace default --image=wabbitnetworks.azurecr.io/test/cosign-image:signed-keyless'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

consider adding a retry message with outputs of the command

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

consider updating the cosign verifier docs to mention potential timeout

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added note to the cosign doc. This doc should probably be migrated to the website.

added a retry statement with the command that gets outputed to a separate IO stream that is always printed. see docs: https://bats-core.readthedocs.io/en/stable/writing-tests.html#printing-to-the-terminal

@akashsinghal akashsinghal enabled auto-merge (squash) October 11, 2023 06:27
@@ -68,6 +68,7 @@ wait_for_process() {
return 0
else
sleep "$sleep_time"
echo "# retrying $cmd" >&3
Copy link
Collaborator

Choose a reason for hiding this comment

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

curious what's FD 3?

Copy link
Collaborator Author

@akashsinghal akashsinghal Oct 11, 2023

Choose a reason for hiding this comment

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

This the FD for the TAP stream produced by BATS. The TAP stream is always outputted to the console regardless of success or failure. I think it might be helpful to see if retries were for a success and not just a failure. https://bats-core.readthedocs.io/en/stable/writing-tests.html#printing-to-the-terminal

@akashsinghal akashsinghal merged commit ceae9d7 into ratify-project:main Oct 12, 2023
19 checks passed
bspaans pushed a commit to bspaans/ratify that referenced this pull request Oct 17, 2023
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.

Intermittent timeout from Rekor Server caused e2e test failed.
3 participants