Skip to content

Conversation

@frobware
Copy link
Contributor

@frobware frobware commented May 13, 2025

Move version information into a standalone VERSION file to provide a clear, central source of truth for the project version and future runtime consumers (e.g. CLI programs that may support a --version flag).

There's nothing inherently wrong with the previous approach of hard-coding VERSION in the Makefile. The real issue is that we had no process for bumping the version immediately after a release tag was cut. As a result, subsequent development continued to build and push bundle and catalog images using the same version tag.

For example, once we had tagged 0.5.6, any further updates to the bundle--such as updated manifests--were still pushed to bpfman-operator-bundle:v0.5.6. This isn't expected behaviour and violates the assumption that tagged images are stable and immutable.

The new process for bumping to the next development release:

  1. Prepare a release:

    • Update the VERSION file to remove the -dev suffix (e.g. change 0.5.7-dev -> 0.5.7).
    • Run make bundle to generate release manifests with the correct version embedded.
    • Commit both the VERSION and regenerated bundle content.
    • Raise a PR After merging
    • git tag -a the resulting commit (e.g. v0.5.7)
  2. Begin the next development cycle:

    • Update the VERSION file to the next dev version (e.g. 0.5.8-dev).
    • Run make bundle again to update the ClusterServiceVersion accordingly.
    • Commit both the VERSION and regenerated bundle content.
    • Raise a PR.

Move version information into a standalone VERSION file to provide a
clear, central source of truth for the project version and future
runtime consumers (e.g. CLI programs that may support a --version
flag).

There's nothing inherently wrong with the previous approach of
hard-coding VERSION in the Makefile. The real issue is that we had no
process for bumping the version immediately after a release tag was
cut. As a result, subsequent development continued to build and push
bundle and catalog images using the same version tag.

For example, once we had tagged 0.5.6, any further updates to the
bundle--such as updated manifests--were still pushed to
`bpfman-operator-bundle:v0.5.6`. This isn't expected behaviour and
violates the assumption that tagged images are stable and immutable.

Signed-off-by: Andrew McDermott <amcdermo@redhat.com>
@frobware
Copy link
Contributor Author

/hold

@frobware
Copy link
Contributor Author

/hold cancel

Copy link
Contributor

@dave-tucker dave-tucker left a comment

Choose a reason for hiding this comment

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

@frobware changes LGTM.

However, you should also update the documentation over at https://github.com/bpfman/bpfman/blob/main/RELEASE.md

There's also an argument to be made for potentially splitting that doc into two since we've moved the operator into it's own repository.

We may as well follow the same versioning scheme for bpfman too to avoid drift (i.e bpfman 0.5.6 and bpfman-operator 0.5.7-dev)

@mergify mergify bot merged commit 7f7bfa9 into bpfman:main May 14, 2025
11 checks passed
@frobware frobware deleted the feature-branch branch May 16, 2025 16:24
ralphbean pushed a commit to ralphbean/bpfman-operator that referenced this pull request Jun 10, 2025
…s/component-update-ocp-bpfman-operator

chore(deps): update ocp-bpfman-operator to 833b7bf
frobware added a commit to frobware/bpfman-operator that referenced this pull request Oct 17, 2025
Introduce OPENSHIFT-VERSION file containing BUILDVERSION=0.5.6 for
downstream OpenShift container builds, following the pattern used by
network-observability-operator. This decouples downstream versioning
from the upstream VERSION file, which represents the next development
version per upstream convention (see bpfman#440).

When merging from upstream, the VERSION file will contain their next
development version (e.g., 0.5.8-dev), whilst OPENSHIFT-VERSION
maintains the downstream release version (e.g., 0.5.6) independently.

Changes:
- Add OPENSHIFT-VERSION file as source of truth for downstream builds
- Update all OpenShift Containerfiles to use BUILDVERSION build argument
- Configure Tekton pipelines to pass build-args-file parameter
- Update local Makefile to use --build-arg-file for testing
- Remove obsolete sync-version.sh script
- Update documentation to reflect new versioning approach

The build system can now override the version at build time via
--build-arg BUILDVERSION=<value>, whilst defaulting to the value in
OPENSHIFT-VERSION when using --build-arg-file.
frobware added a commit to frobware/bpfman-operator that referenced this pull request Oct 17, 2025
Introduce OPENSHIFT-VERSION file containing BUILDVERSION=0.5.6 for
downstream OpenShift container builds, following the pattern used by
network-observability-operator. This decouples downstream versioning
from the upstream VERSION file, which represents the next development
version per upstream convention (see bpfman#440).

When merging from upstream, the VERSION file will contain their next
development version (e.g., 0.5.8-dev), whilst OPENSHIFT-VERSION
maintains the downstream release version (e.g., 0.5.6) independently.

Changes:
- Add OPENSHIFT-VERSION file as source of truth for downstream builds
- Update all OpenShift Containerfiles to use BUILDVERSION build argument
- Configure Tekton pipelines to pass build-args-file parameter
- Update local Makefile to use --build-arg-file for testing
- Remove obsolete sync-version.sh script
- Update documentation to reflect new versioning approach

The build system can now override the version at build time via
--build-arg BUILDVERSION=<value>, whilst defaulting to the value in
OPENSHIFT-VERSION when using --build-arg-file.
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.

2 participants