-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix: track localImages in a new map to enable proper cleanup #133
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Justin Alvarez <[email protected]>
Shubhranshu153
approved these changes
Mar 25, 2024
pendo324
pushed a commit
that referenced
this pull request
Mar 25, 2024
🤖 I have created a release *beep* *boop* --- ## [0.7.17](v0.7.16...v0.7.17) (2024-03-25) ### Build System or External Dependencies * **deps:** Bump github.com/onsi/ginkgo/v2 from 2.17.0 to 2.17.1 ([#132](#132)) ([c55e33b](c55e33b)) ### Bug Fixes * track localImages in a new map to enable proper cleanup ([#133](#133)) ([c8a5e72](c8a5e72)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Shubhranshu153
pushed a commit
to Shubhranshu153/common-tests
that referenced
this pull request
Mar 26, 2024
…h#133) Issue #, if available: See https://github.com/runfinch/finch/actions/runs/8424406162/job/23068204038?pr=825#step:10:5839 ``` time="2024-03-25T17:50:43Z" level=info msg="trying next host" error="failed to do request: Head \"http://localhost:51261/v2/docker/library/alpine/manifests/latest\": dial tcp [::1]:51261: connect: connection refused" host="localhost:51261" time="2024-03-25T17:50:43Z" level=error msg="server \"localhost:51261\" does not seem to support HTTPS" error="failed to resolve reference \"localhost:51261/docker/library/alpine:latest\": failed to do request: Head \"http://localhost:51261/v2/docker/library/alpine/manifests/latest\": dial tcp [::1]:51261: connect: connection refused" time="2024-03-25T17:50:43Z" level=info msg="Hint: you may want to try --insecure-registry to allow plain HTTP (if you are in a trusted network)" time="2024-03-25T17:50:43Z" level=fatal msg="failed to resolve reference \"localhost:51261/docker/library/alpine:latest\": failed to do request: Head \"http://localhost:51261/v2/docker/library/alpine/manifests/latest\": dial tcp [::1]:51261: connect: connection refused" time="2024-03-25T17:50:43Z" level=fatal msg="exit status 1" ``` This error occurs here because the localImages map already has the "local" entries, even though `CleanupLocalRegistry` was run (and on top of that, the VM's disk was completely reset, including the local registry container. This is an edge case that occurs here because the `tests` package is imported once, and the global state of the `localImages` map is preserved. *Description of changes:* - Instead of using one map and overriding its entries, store the local entries in a new map so that `CleanupLocalRegistry` can reset it, and a subsequent `SetupLocalRegistry` can repopulate it without issue *Testing done:* - Tested after running Setup -> Clean -> Setup (by running the exact same failing e2e test locally), and it now works - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Justin Alvarez <[email protected]>
Shubhranshu153
pushed a commit
to Shubhranshu153/common-tests
that referenced
this pull request
Mar 26, 2024
🤖 I have created a release *beep* *boop* --- ## [0.7.17](runfinch/common-tests@v0.7.16...v0.7.17) (2024-03-25) ### Build System or External Dependencies * **deps:** Bump github.com/onsi/ginkgo/v2 from 2.17.0 to 2.17.1 ([runfinch#132](runfinch#132)) ([c55e33b](runfinch@c55e33b)) ### Bug Fixes * track localImages in a new map to enable proper cleanup ([runfinch#133](runfinch#133)) ([c8a5e72](runfinch@c8a5e72)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available: See https://github.com/runfinch/finch/actions/runs/8424406162/job/23068204038?pr=825#step:10:5839
This error occurs here because the localImages map already has the "local" entries, even though
CleanupLocalRegistry
was run (and on top of that, the VM's disk was completely reset, including the local registry container. This is an edge case that occurs here because thetests
package is imported once, and the global state of thelocalImages
map is preserved.Description of changes:
CleanupLocalRegistry
can reset it, and a subsequentSetupLocalRegistry
can repopulate it without issueTesting done:
Tested after running Setup -> Clean -> Setup (by running the exact same failing e2e test locally), and it now works
I've reviewed the guidance in CONTRIBUTING.md
License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.