Skip to content

Conversation

mpryc
Copy link
Contributor

@mpryc mpryc commented Oct 8, 2025

Change that makes rebase of oadp-operator possible:

  • Make make help instant by deferring CLUSTER_TYPE evaluation to runtime (was 12s, now 0.06s - 200x faster)
  • Move cloud-specific variables to test-e2e targets to avoid parse-time cluster API calls that hang when not connected
  • Preserve createdAt timestamp in CSV when only timestamp changed
  • Suppress tool version check warnings when binaries don't exist yet
  • Make container tool check lazy (only runs when needed)
  • Clean up commented code with concise explanatory notes

Why the changes were made

To allow rebasebot properly run $ make bundle, without access to the cluster.
Without this change it's impossible to update manifests without being logged to the cluster.

How to test the changes made

Reading Makefile, asking right questions to claude and modifying code by hand + testing with few make targets:
$ make help
$ make manifests
$ make build
$ make bundle
$ make deploy-olm
$ make run
$ make install
$ make undeploy-olm
$ make uninstall

Tests should be performed by prow CI to execute some other make targets.

Change that makes rebase of oadp-operator possible:

  - Make `make help` instant by deferring CLUSTER_TYPE evaluation to runtime
    (was 12s, now 0.06s - 200x faster)
  - Move cloud-specific variables to test-e2e targets to avoid parse-time
    cluster API calls that hang when not connected
  - Preserve createdAt timestamp in CSV when only timestamp changed
  - Suppress tool version check warnings when binaries don't exist yet
  - Make container tool check lazy (only runs when needed)
  - Clean up commented code with concise explanatory notes

Signed-off-by: Michal Pryc <[email protected]>
Co-Authored-By: Claude <[email protected]>
Copy link

openshift-ci bot commented Oct 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mpryc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 8, 2025
OLD_CREATEDAT=$$(grep '^ createdAt: ' /tmp/oadp-old-csv.yaml); \
NEW_CREATEDAT=$$(grep '^ createdAt: ' bundle/manifests/oadp-operator.clusterserviceversion.yaml); \
cp bundle/manifests/oadp-operator.clusterserviceversion.yaml /tmp/oadp-new-csv-with-old-timestamp.yaml; \
$(SED) -i "s/^ createdAt: .*/$$OLD_CREATEDAT/" /tmp/oadp-new-csv-with-old-timestamp.yaml; \
Copy link
Member

Choose a reason for hiding this comment

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

Just noting that sed -i would work here only with gsed on macos hence the prior > + mv

oadp-operator/Makefile

Lines 422 to 438 in b9229e4

SED = sed
# if on macos, install gsed
# https://formulae.brew.sh/formula/gnu-sed
# Codecov OS String for use in download url
ifeq ($(OS),Windows_NT)
OS_String = windows
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
OS_String = linux
endif
ifeq ($(UNAME_S),Darwin)
OS_String = macos
SED = gsed
endif
endif

Copy link
Member

Choose a reason for hiding this comment

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

Anyone w macos once installing gsed should be good to go.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kaovilai that part was not chaged (discovery of SED on MacOS X), could you please check if the reworked Makefile requires some changes to work in it, or we are fine here?

Copy link

openshift-ci bot commented Oct 8, 2025

@mpryc: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/4.19-e2e-test-cli-aws c6c2fdd link true /test 4.19-e2e-test-cli-aws
ci/prow/images c6c2fdd link true /test images

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants