Skip to content

docs: add OS_CLUSTER_VERSION to env.example and align dev docs#4670

Open
tuxerrante wants to merge 4 commits intomasterfrom
tuxerrante/add-default-ocp-version
Open

docs: add OS_CLUSTER_VERSION to env.example and align dev docs#4670
tuxerrante wants to merge 4 commits intomasterfrom
tuxerrante/add-default-ocp-version

Conversation

@tuxerrante
Copy link
Copy Markdown
Collaborator

@tuxerrante tuxerrante commented Mar 10, 2026

Summary

  • Add OS_CLUSTER_VERSION=4.19.15 as a default in env.example, so it's available for both cluster creation (hack/cluster) and version registration in CosmosDB
  • Rename OCP_VERSIONOS_CLUSTER_VERSION in the admin/versions curl examples in docs/deploy-development-rp.md to match the env var used by the Go tooling (pkg/util/cluster)
  • Add "default": true to the version registration curl payloads so the registered version is set as the default installable version

Notes

  • OCP_VERSION in Makefile/CI (validate-roledef) is not renamed — it serves a different purpose (role definition validation, not cluster creation)

Test plan

  • Verify env.example sources correctly and OS_CLUSTER_VERSION is set
  • Verify curl examples in docs work with the new variable name

Add OS_CLUSTER_VERSION=4.19.15 as default in env.example. Rename
OCP_VERSION to OS_CLUSTER_VERSION in the admin/versions curl examples
to match the env var used by hack/cluster tooling. Add "default": true
to the version registration payloads.
@tuxerrante
Copy link
Copy Markdown
Collaborator Author

@copilot

Copy link
Copy Markdown

Copilot AI commented Mar 10, 2026

@tuxerrante I've opened a new pull request, #4674, to work on those changes. Once the pull request is ready, I'll request review from you.

tuxerrante and others added 2 commits March 11, 2026 10:15
The ensureDefaultVersionInCosmosdb function was missing Default: true
when putting the default install stream version, causing it to not be
recognized as the default version in local development mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tuxerrante tuxerrante requested a review from alcasim March 11, 2026 09:22
Copy link
Copy Markdown
Collaborator

@rh-returners rh-returners left a comment

Choose a reason for hiding this comment

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

lgtm!

Copilot AI review requested due to automatic review settings March 23, 2026 09:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates local development defaults and documentation so OpenShift version registration and cluster creation use a consistent environment variable (OS_CLUSTER_VERSION), and ensures newly registered versions can be marked as the default.

Changes:

  • Add OS_CLUSTER_VERSION default example to env.example.
  • Update dev-doc curl examples to use OS_CLUSTER_VERSION and include "default": true in version payloads.
  • Mark the locally seeded CosmosDB OpenShiftVersion as Default: true when created by local-dev tooling.

Reviewed changes

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

File Description
pkg/util/version/const.go Rewords the comment describing DefaultInstallStream as a local-dev fallback.
pkg/util/cluster/cluster.go Seeds a default OpenShiftVersion document with Default: true in local dev mode.
env.example Adds an example/default for OS_CLUSTER_VERSION.
docs/deploy-development-rp.md Aligns version registration examples with OS_CLUSTER_VERSION and sets registered versions as default.

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

Comment on lines +41 to 43
// DefaultInstallStream does not wrap data for production and INT which has moved to RP-Config.
// This default is left here ONLY for use by local development mode,
// until we can come up with a better solution.
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

The updated comment reads awkwardly and seems to invert the intended meaning ("does not wrap data"). This looks like it should explain that production/INT install stream data moved to RP-Config and this constant is only a local-dev fallback; please reword for clarity to avoid misleading future readers.

Suggested change
// DefaultInstallStream does not wrap data for production and INT which has moved to RP-Config.
// This default is left here ONLY for use by local development mode,
// until we can come up with a better solution.
// DefaultInstallStream is NOT used for production or INT; install stream data for those
// environments is configured via RP-Config. This constant is kept only as a fallback for
// local development mode until we can come up with a better solution.

Copilot uses AI. Check for mistakes.
export ARO_IMAGE=arointsvc.azurecr.io/aro:latest
export ARO_IMAGE=arointsvc.azurecr.io/aro:latest
export ARO_ENABLE_OUTBOUND_HTTP_LOGGING=false
# export OS_CLUSTER_VERSION="${OS_CLUSTER_VERSION:-4.19.15}"
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

OS_CLUSTER_VERSION is commented out, so sourcing env.example will not actually set a default cluster version. If the goal is for local dev tooling to pick up OS_CLUSTER_VERSION automatically, this should be an active export OS_CLUSTER_VERSION="${OS_CLUSTER_VERSION:-4.19.15}" (or otherwise document that users must uncomment it).

Copilot uses AI. Check for mistakes.
Comment on lines 1147 to 1150
InstallerPullspec: fmt.Sprintf("arointsvc.azurecr.io/aro-installer:release-%s", version.DefaultInstallStream.Version.MinorVersion()),
Enabled: true,
Default: true,
},
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

Setting Default: true unconditionally can create multiple "default" OpenShift versions in CosmosDB if one already exists. The frontend cache logic treats this as a warning and will effectively pick whichever default is seen last, which can make "default version" selection non-deterministic. Consider checking whether any existing version is already marked default and only setting Default: true when no default exists (or explicitly clearing the previous default before creating a new one).

Copilot uses AI. Check for mistakes.
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.

7 participants