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

The offset file format does not evaluate back-ported patches #372

Closed
MrAlias opened this issue Oct 10, 2023 · 0 comments · Fixed by #393
Closed

The offset file format does not evaluate back-ported patches #372

MrAlias opened this issue Oct 10, 2023 · 0 comments · Fixed by #393
Labels
bug Something isn't working
Milestone

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Oct 10, 2023

When a package releases a patch version to a prior minor version the offsets generator does not evaluate that new patch version if a cached version range beyond the minor version exists. This means the offset for that patch version may be incorrect.

For example, google.golang.org/grpc just released v1.58.3. Our offsets for struct fields from that package include a range with a max greater than v1.58.X. For example,

"google.golang.org/grpc/internal/transport.Stream": {
"ctx": [
{
"versions": {
"oldest": "1.3.0",
"newest": "1.60.0-dev"
},
"offsets": [
{
"offset": 32,
"since": "1.3.0"
},
{
"offset": 24,
"since": "1.15.0"
},
{
"offset": 32,
"since": "1.25.0"
}
]
}

When the offsets are "updated" the cached values are used and given 1.58.3 falls within that range the new offset is not detected, the cached value is used instead.

Possible solution

This may motivate moving back to the prior offsets format that listed each version explicitly (without version ranges).

Related PR

#45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant