Skip to content

Cache all versions by source - #2779

Merged
pkwarren merged 1 commit into
mainfrom
pkw/gosimple-max-version
Oct 8, 2026
Merged

pkwarren merged 1 commit into
mainfrom
pkw/gosimple-max-version

Conversation

@pkwarren

@pkwarren pkwarren commented Oct 8, 2026

Copy link
Copy Markdown
Member

The fix to set max_version for connectrpc/gosimple didn't work completely since the latest version is cached per source, and connectrpc/go and connectrpc/gosimple use the same GitHub source.

Update the fetcher to fetch all versions from a source and cache them. Then add a method to calculate the latest version for a source, accounting for max_version and ignore_versions. This allows multiple plugins to share a common source for version information but differ in their allowed versions.

Fixes #2778.

The fix to set `max_version` for connectrpc/gosimple didn't work
completely since the latest version is cached per source, and
connectrpc/go and connectrpc/gosimple use the same GitHub source.

Update the fetcher to fetch all versions from a source and cache them.
Then add a method to calculate the latest version for a source,
accounting for `max_version` and `ignore_versions`. This allows multiple
plugins to share a common source for version information but differ in
their allowed versions.

Fixes #2778.
require.Contains(t, pending, pluginDir)
want := "v2.0.0"
if config.Source.MaxVersion != "" {
want = "v1.1.0"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test exercises the issue with connectrpc/go and connectrpc/gosimple.

return "", false
}
if semver.Prerelease(version) != "" {
if semver.Prerelease(version) != "" || semver.Build(version) != "" {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugins today don't really support this in our versioning scheme and none are dependent on it so just filtering these out.

@pkwarren
pkwarren merged commit 7c8ea6d into main Oct 8, 2026
4 checks passed
@pkwarren
pkwarren deleted the pkw/gosimple-max-version branch October 8, 2026 17:34
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.

Unexpected Fetch latest versions failure

2 participants