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
DNM concurrent NewFromEnv tests #1941
Conversation
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@asraa I've obviously screwed something up since the unit tests are failing, and it's not very clean, but the one thing to point out is that I reverted the preference for fetching from Rekor before using the TUF roots that we did in #1921 so at least this may be one way to get to the shared TUF usage, since the CIP tests are now passing with a mostly reverted tlog.go code. I'm still wrapping my head around the various caches and stores and elephants oh my, but just wanted to share what I was playing with. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THANK YOU!
One comment about this design:
If there was out of date metadata and targets, then we would not update the local cache.
I think using only in-memory during the lifetime of the program (outside of updates) is the correct thing to do. I'll give this type of pattern a try, but with syncing with the on-disk cache when an Update is issued.
I think all the bits from here have been hoisted into #1953 so once that gets done we can close this, or I suppose since the commits have made it there, we might be able to close this already? |
Everything from here that was worth bringing has been brought to #1953 |
Summary
Follow up to @asraa investigation in #1938
Some comments in #1938 led me to believe that NewFromEnv is not thread safe, so playing around with some tests for it.
Note, the test fails with this currently because it modifies the expiredTimeStamp.
But if you run the tests with the -v so it doesn't run them in parallel, it fails sort of how I was expecting it to fail:
Ticket Link
Fixes
Release Note