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

Properly set ModuleIdentity and commit when reading from cache #2152

Merged
merged 2 commits into from
Jun 3, 2023

Conversation

bufdev
Copy link
Member

@bufdev bufdev commented Jun 3, 2023

The ModuleIdentity and commit were not being set when returning a Module from the cache. In the constructors of Module, we have a comment saying that we rely on a level higher, i.e. ModuleReader, to set identity and commit information since we do not store this in the proto representation. We were properly doing this with the delegate (i.e. in bufapimodule), but not doing this in the cache.

This has only been a problem since the new CAS cache was released, this was previously properly done in the cache, but the option was omitted when the new CAS cache was introduced:

bufmodule.ModuleWithModuleIdentityAndCommit(modulePin, modulePin.Commit()),

@bufdev bufdev requested a review from pkwarren June 3, 2023 02:09
@bufdev bufdev merged commit 967b9de into main Jun 3, 2023
10 checks passed
@bufdev bufdev deleted the cache-fix branch June 3, 2023 02:17
unmultimedio added a commit that referenced this pull request Jun 5, 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.

None yet

2 participants