FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(aiven)!: expose Valkey version and error when no version is known by x10an14-nav · Pull Request #508 · nais/api · GitHub

/ api Public

feat(aiven)!: expose Valkey version and error when no version is known - #508

Open
x10an14-nav wants to merge 1 commit into
mainfrom
add_valkey_version
Open

feat(aiven)!: expose Valkey version and error when no version is known#508
x10an14-nav wants to merge 1 commit into
mainfrom
add_valkey_version

Conversation

Copy link
Copy Markdown
Contributor

Aiven reports what an instance is actually running, so it outranks the CR, which only records what was asked for. An unknown version previously became V2 by default, so the API asserted a version nobody chose and the update path could validate an upgrade against that guess. V1 is no longer offered by Aiven for OpenSearch.

BREAKING CHANGE: version is now required on createValkey and updateValkey. V1 is removed from OpenSearchMajorVersion.

Closes: https://github.com/nais/system/pull/539

Aiven reports what an instance is actually running, so it outranks the CR, which only records what was asked for.
An unknown version previously became `V2` by default, so the API asserted a version nobody chose and the update path could validate an upgrade against that guess.
`V1` is no longer offered by Aiven for OpenSearch.

BREAKING CHANGE: `version` is now required on `createValkey` and `updateValkey`.
`V1` is removed from `OpenSearchMajorVersion`.

Closes: nais/system#539
x10an14-nav requested a review from a team as a code owner August 28, 2026 15:55
x10an14-nav requested a balanced review from Copilot and removed request for a team August 28, 2026 15:55
x10an14-nav self-assigned this Aug 28, 2026
x10an14-nav requested a review from thokra-nav August 28, 2026 15:57

Copy link
Copy Markdown
Contributor Author

@thokra-nav Sorry, du kan ignorere/vente til neste uke og når copilot har gått igjennom.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

Exposes authoritative Aiven versions for Valkey and OpenSearch and validates upgrades against running versions.

Changes:

  • Adds Valkey version inputs, persistence, GraphQL exposure, and upgrade validation.
  • Centralizes Aiven version loading and removes OpenSearch V1 support.
  • Expands integration coverage and updates the Nix toolchain.

Reviewed changes

Copilot reviewed 22 out of 24 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
internal/thirdparty/aiven/versionloader.go Adds shared version loader.
internal/thirdparty/aiven/fake.go Adds fake version metadata.
internal/thirdparty/aiven/dataloader.go Registers shared loader.
internal/persistence/valkey/queries.go Persists and updates versions.
internal/persistence/valkey/models.go Adds version models and validation.
internal/persistence/opensearch/queries.go Uses Aiven versions.
internal/persistence/opensearch/models.go Removes V1 support.
internal/persistence/opensearch/dataloader.go Removes domain-specific loader.
internal/graph/valkey.resolvers.go Resolves Valkey versions.
internal/graph/schema/valkey.graphqls Exposes version API.
internal/graph/schema/opensearch.graphqls Removes V1 enum value.
internal/graph/gengql/valkey.generated.go Updates generated Valkey GraphQL code.
internal/graph/gengql/root_.generated.go Updates generated schema code.
internal/cmd/api/http.go Initializes the shared loader.
integration_tests/valkeyversion.lua Tests version queries.
integration_tests/valkey_crud.lua Updates version mutation tests.
integration_tests/opensearchversion.lua Updates reported version expectations.
integration_tests/opensearch_version_defects.lua Tests version-source edge cases.
integration_tests/opensearch_crud.lua Updates supported-version tests.
integration_tests/k8s_resources/opensearch_version/dev/myteam/opensearch-myteam-nometa.yaml Adds CR-fallback fixture.
integration_tests/k8s_resources/opensearch_version/dev/myteam/opensearch-myteam-nocrd.yaml Adds unknown-version fixture.
integration_tests/activitylog_filter.lua Supplies required Valkey version.
flake.nix Updates Go and Prettier configuration.
flake.lock Updates pinned nixpkgs.
Files not reviewed (1)
  • internal/graph/gengql/valkey.generated.go: Generated file
Suppressed comments (2)

internal/graph/schema/valkey.graphqls:69

  • The public enum itself is missing a GraphQL description; descriptions on its values do not document the enum type. Add a concise description before the declaration.
enum ValkeyMajorVersion {

internal/graph/schema/valkey.graphqls:66

  • desiredMajor is derived exclusively from the running Aiven version, so it reports the actual major rather than the desired version described by this public field. Either source the desired value from the persisted configuration or rename this field to actualMajor before exposing the API.
	"The desired major version of the Valkey instance."
	desiredMajor: ValkeyMajorVersion!

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +560 to +561
if oldMajor == input.Version {
return changes, nil
Comment on lines +456 to +458
switch {
case aivenErr == nil:
oldVersion = *actual

if major == "" {
major = OpenSearchMajorVersionV2
major, err := OpenSearchMajorVersionFromAivenString(*actual)
total: Int!
}

type ValkeyVersion {
Comment thread flake.nix
Comment on lines +32 to +36
newVersionNotInNixpkgs = -1 == prev.lib.compareVersions nixpkgsVersion version;
in
{
go = if newVersionNotInNixpkgs then newerGoVersion else prev.go;
buildGoModule = prev.buildGoModule.override { go = final.go; };
go_latest = if newVersionNotInNixpkgs then newerGoVersion else prev.go_latest;
buildGoModule = prev.buildGoModule.override { go = final.go_latest; };
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL