-
Notifications
You must be signed in to change notification settings - Fork 84
Improve Makefile performance and reduce spurious bundle changes #1984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: oadp-dev
Are you sure you want to change the base?
Conversation
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]>
[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 |
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; \ |
There was a problem hiding this comment.
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
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
@mpryc: The following tests failed, say
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. |
Change that makes rebase of oadp-operator possible:
make help
instant by deferring CLUSTER_TYPE evaluation to runtime (was 12s, now 0.06s - 200x faster)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.