Skip to content

K8SPG-1056 Add distribution field to version service API#542

Merged
hors merged 1 commit into
mainfrom
K8SPG-1056
Jul 1, 2026
Merged

K8SPG-1056 Add distribution field to version service API#542
hors merged 1 commit into
mainfrom
K8SPG-1056

Conversation

@hors

@hors hors commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Add a distribution query parameter to the VersionService Apply endpoint to track which PostgreSQL distribution ("percona" or "community") is running, following the same pattern as the existing platform field.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the VersionService API surface to accept a new distribution query parameter (intended to distinguish PostgreSQL “percona” vs “community”), and regenerates protobuf/OpenAPI artifacts accordingly.

Changes:

  • Added distribution to ApplyRequest, OperatorRequest, and ProductRequest in api/version.proto (and regenerated Go protobuf output).
  • Updated generated OpenAPI specs to include distribution as an optional query parameter on the Apply/Operator/Product endpoints.
  • Updated Buf dependency lockfile to newer dep commits/digests.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
versionpb/api/version.pb.go Regenerated protobuf Go output; adds distribution fields/getters and updates generator output format.
api/version.proto Adds distribution field to the three request messages that back the VersionService endpoints.
api/version.swagger.yaml Adds distribution query param to the OpenAPI spec for Apply/Operator/Product endpoints (generated copy).
third_party/OpenAPI/api/version.swagger.yaml Same OpenAPI updates as api/version.swagger.yaml (source-of-truth generated output).
buf.lock Updates Buf dependency pins (googleapis + grpc-gateway).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/version.proto
Comment on lines 151 to 155
bool role_management_enabled = 27;
bool mcs_enabled = 28;
bool volume_expansion_enabled = 29;
string distribution = 30;
}
Comment thread api/version.proto
Comment on lines 181 to 186
bool user_management_enabled = 26;
bool role_management_enabled = 27;
bool mcs_enabled = 28;
bool volume_expansion_enabled = 29;
string distribution = 30;
}
Comment thread api/version.swagger.yaml
Comment on lines +208 to +211
- name: distribution
in: query
required: false
type: string
Comment thread api/version.swagger.yaml
Comment on lines +342 to +345
- name: distribution
in: query
required: false
type: string
Comment thread api/version.swagger.yaml
Comment on lines +480 to +483
- name: distribution
in: query
required: false
type: string
Comment on lines +208 to +211
- name: distribution
in: query
required: false
type: string
Comment on lines +342 to +345
- name: distribution
in: query
required: false
type: string
Comment on lines +480 to +483
- name: distribution
in: query
required: false
type: string
@JNKPercona

Copy link
Copy Markdown
Contributor
Test name Status
api-tests passed

Add a distribution query parameter to the VersionService Apply,
Operator, and Product endpoints to track which PostgreSQL distribution
("percona" or "community") is running, following the same pattern as
the existing platform field.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread api/version.proto
bool volume_expansion_enabled = 29;
string distribution = 30 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet)."
Comment thread api/version.proto
bool volume_expansion_enabled = 29;
string distribution = 30 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet)."
Comment thread api/version.proto
bool volume_expansion_enabled = 29;
string distribution = 30 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet)."
@JNKPercona

Copy link
Copy Markdown
Contributor
Test name Status
api-tests passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated 4 comments.

Comment thread api/version.swagger.yaml
required: false
type: boolean
- name: distribution
description: PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet).
required: false
type: boolean
- name: distribution
description: PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet).
Comment thread api/version.proto
Comment on lines +122 to +126
string distribution = 30 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet)."
enum: ["", "percona", "community"]
}
Comment thread api/version.proto
bool volume_expansion_enabled = 29;
string distribution = 30 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "PostgreSQL distribution running in the cluster. Empty string means unknown (e.g. no running pods yet)."
@gkech

gkech commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

just for reference, the related pr: percona/percona-postgresql-operator#1664

@hors hors merged commit 9cb00c6 into main Jul 1, 2026
4 of 5 checks passed
@hors hors deleted the K8SPG-1056 branch July 1, 2026 09:19
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.

5 participants