Skip to content

HIVE-2862: Remove python dependency from makefile #2692

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dlom
Copy link
Contributor

@dlom dlom commented May 30, 2025

This change allows building the container images without the python dependencies that are getting harder to get by.

xref: HIVE-2862

This change allows building the container images without the python
dependencies that are getting harder to get by.

Signed-off-by: Antoni Segura Puimedon <[email protected]>
@openshift-ci-robot
Copy link

openshift-ci-robot commented May 30, 2025

@dlom: This pull request references HIVE-2862 which is a valid jira issue.

In response to this:

This change allows building the container images without the python dependencies that are getting harder to get by.

xref: HIVE-2862

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 30, 2025
@openshift-ci openshift-ci bot requested review from 2uasimojo and suhanime May 30, 2025 19:02
Copy link
Contributor

openshift-ci bot commented May 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dlom

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 May 30, 2025
}

function short_sha() {
git rev-parse --short HEAD
Copy link
Member

Choose a reason for hiding this comment

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

To be compatible with the existing functionality, this should be

Suggested change
git rev-parse --short HEAD
git rev-parse --short=7 HEAD

git rev-parse --short HEAD
}

echo "$(prefix_from_branch "$(git rev-parse --abbrev-ref HEAD)").$(commit_count)-$(short_sha)"
Copy link
Member

Choose a reason for hiding this comment

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

To be compatible with the existing functionality, we need to include the v prefix, so either here via

Suggested change
echo "$(prefix_from_branch "$(git rev-parse --abbrev-ref HEAD)").$(commit_count)-$(short_sha)"
echo v"$(prefix_from_branch "$(git rev-parse --abbrev-ref HEAD)").$(commit_count)-$(short_sha)"

...or in the Makefile as noted above.

SOURCE_GIT_TAG := $(shell export HOME=$(HOME); python3 -m ensurepip >&2; python3 -mpip --no-cache install --user gitpython pyyaml >&2; hack/version2.py)
# 0.0.x-y if it is an `UnknownBranch`. However, the {commitcount} and {sha}
# should still be accurate.
SOURCE_GIT_TAG := $(shell hack/version2.sh)
Copy link
Member

Choose a reason for hiding this comment

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

To be compatible with the existing functionality, this needs to include the v prefix, either by prepending it here

Suggested change
SOURCE_GIT_TAG := $(shell hack/version2.sh)
SOURCE_GIT_TAG := v$(shell hack/version2.sh)

...or by including it in the output of version2.sh as noted below.

Copy link
Member

Choose a reason for hiding this comment

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

We should be able to delete version2.py as part of this PR, yes?

@2uasimojo
Copy link
Member

Looks like you're either going to have to install pyyaml as part of build-app-sre-template, or port generate-saas-template.py to shell. The latter might be possible via yq, which we definitely already install for other reasons.

Copy link
Contributor

openshift-ci bot commented May 30, 2025

@dlom: The following test 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/verify c71a9bb link true /test verify

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants