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

test, manifest: test push retry #20242

Merged
merged 2 commits into from
Oct 3, 2023
Merged

Conversation

flouthoc
Copy link
Collaborator

@flouthoc flouthoc commented Oct 3, 2023

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 3, 2023
@flouthoc flouthoc force-pushed the manifest-retry branch 2 times, most recently from 3e57e66 to e07aae8 Compare October 3, 2023 10:07
push := podmanTest.Podman([]string{"manifest", "push", "--all", "--tls-verify=false", "--remove-signatures", "foo", "localhost:7000/bogus"})
push.WaitWithDefaultTimeout()
Expect(push).Should(Exit(1))
Expect(push.ErrorToString()).To(ContainSubstring("Failed, retrying in 1s ... (1/3)."))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wonder if this is correct way to capture warnings before error ?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that looks good to me. Any chance we can avoid the 3 seconds delay in the test?

Copy link
Member

Choose a reason for hiding this comment

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

LGTM also. Strictly speaking, that doesn't actually confirm that there was a retry, so something like this would be more confidence-inspiring:

  Expect(push.ErrorToString()).To(MatchRegexp("Copying blob.*Failed, retrying in 1s \\.\\.\\. \\(1/3\\).*Copying blob.*Failed, retrying in 2s"))

...but this is way in the weeds. I don't see a realistic way for "Failed, retrying" to appear but the retry itself not to happen.

Thank you for remembering to add a test!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@edsantiago thanks I'll amend, could you let me know why current warning catch worked in some tests and failed in others ?

Copy link
Member

Choose a reason for hiding this comment

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

Oh! Because remote. You'll need to SkipIfRemote().

Copy link
Member

Choose a reason for hiding this comment

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

This is a good moment to remind everyone of my greasemonkey Cirrus colorizer. Look how easy it is to find the common element (pink) in this results list:
ci

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah warnings are not relayed in remote setup. @edsantiago thanks for pointing amended the test now.

@mheon
Copy link
Member

mheon commented Oct 3, 2023

LGTM

@ashley-cui
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 3, 2023
@openshift-ci openshift-ci bot merged commit 267e80a into containers:main Oct 3, 2023
97 checks passed
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jan 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants