Skip to content

Properly set ModuleIdentity and commit when reading from cache#2152

Merged
bufdev merged 2 commits intomainfrom
cache-fix
Jun 3, 2023
Merged

Properly set ModuleIdentity and commit when reading from cache#2152
bufdev merged 2 commits intomainfrom
cache-fix

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
@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.

2 participants