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
Bug 1715001: hack/build: Use BUILD_VERSION if non-empty #1829
Conversation
|
/hold @sosiouxme is running this through doozer to see if it works, and we'll want to double-check the CI results to make sure the CI pipeline is handling it well too. |
|
doozer sets |
|
/test e2e-openstack |
|
Looks like this is working in CI (by not changing anything vs. our previous code): We still need to figure out what variable doozer will set to hold the version being built. |
@wking http://pkgs.devel.redhat.com/cgit/containers/ose-installer/tree/Dockerfile?h=rhaos-4.1-rhel-7 |
|
e2e-aws had the external API load-balancer throttled: /test e2e-aws |
|
CI is still happily unaffected: $ curl --compressed -s https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_installer/1829/pull-ci-openshift-installer-master-e2e-aws/7008/artifacts/e2e-aws/installer/.openshift_install.log | head -n1
time="2019-08-01T19:05:51Z" level=debug msg="OpenShift Installer unreleased-master-1497-g7177dc92ef38ed7c4d8e1c144bd584736ee65def-dirty"@sosiouxme, did you want to wash this through doozer to confirm it picks up your |
Like 3313c08 (hack/build: Use SOURCE_GIT_COMMIT if set, 2019-05-13, openshift#1828). This should fix [1]: $ ./openshift-install version ./openshift-install v4.1.0-201905212232-dirty ... which is from Git looking at the build directory (and seeing -dirty because doozer is adjusting our Dockerfile?). Since the tags aren't in the source repository (github.com/openshift/install), we need to use the BUILD_* variables which were added to Doozer in [2]. In a recent build [3], these looked like: ENV SOURCE_GIT_COMMIT=8aa5b10aa82d201deba0befbfac9fabf76f719f4 SOURCE_DATE_EPOCH=1561485623 BUILD_VERSION=v4.1.9 SOURCE_GIT_URL=https://github.com/openshift/installer SOURCE_GIT_TAG=8aa5b10a BUILD_RELEASE=201907311355 With this commit, we prefer BUILD_VERSION, falling back to 'git describe' in the local repository if BUILD_VERSION is unset or empty. Doozer also sets BUILD_RELEASE, but Luke says we always set BUILD_VERSION in OpenShift 4 so there's no need to include it in the fallback chain [4] (otherwise I'd have preferred BUILD_VERSION, falling back to BUILD_RELEASE, falling back to Git inspection). I don't see a need to use: GIT_TAG="${BUILD_VERSION}-${BUILD_RELEASE}" with both, because if we know the version is v4.1.8, who cares about the timestamp? We only ever get a single 4.1.8 far enough along to show up in front of end-users, even if there's a build hiccup or some such that causes us to build multiple rounds with the same version internally. There's a bunch of v4.2.0, etc., in the run-up to a new minor release, but we have commit hashes to distinguish between those. [1]: openshift#1828 [2]: https://gitlab.cee.redhat.com/openshift-art/tools/doozer/commit/b02114a0bb26bbb7f60f1cc484c17fc3172c6df4 distgit.py: ART-165 add build ENV vars, 2019-07-07 [3]: http://pkgs.devel.redhat.com/cgit/containers/ose-installer/tree/Dockerfile?h=rhaos-4.1-rhel-7 [4]: openshift#1829 (comment)
|
I'm comfortable with the test results, even though those were against 59e43a3 and I've since pushed further updates. /hold cancel |
|
@wking: This pull request references a valid Bugzilla bug. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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/test-infra repository. |
|
@patrickdillon or @vrutkovs PTAL |
|
/retest |
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vrutkovs, wking 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 |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@wking: All pull requests linked via external trackers have merged. Bugzilla bug 1715001 has been moved to the MODIFIED state. In response to this:
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/test-infra repository. |
Like 3313c08 (hack/build: Use SOURCE_GIT_COMMIT if set, 2019-05-13, openshift#1828). This should fix [1]: $ ./openshift-install version ./openshift-install v4.1.0-201905212232-dirty ... which is from Git looking at the build directory (and seeing -dirty because doozer is adjusting our Dockerfile?). Since the tags aren't in the source repository (github.com/openshift/install), we need to use the BUILD_* variables which were added to Doozer in [2]. In a recent build [3], these looked like: ENV SOURCE_GIT_COMMIT=8aa5b10aa82d201deba0befbfac9fabf76f719f4 SOURCE_DATE_EPOCH=1561485623 BUILD_VERSION=v4.1.9 SOURCE_GIT_URL=https://github.com/openshift/installer SOURCE_GIT_TAG=8aa5b10a BUILD_RELEASE=201907311355 With this commit, we prefer BUILD_VERSION, falling back to 'git describe' in the local repository if BUILD_VERSION is unset or empty. Doozer also sets BUILD_RELEASE, but Luke says we always set BUILD_VERSION in OpenShift 4 so there's no need to include it in the fallback chain [4] (otherwise I'd have preferred BUILD_VERSION, falling back to BUILD_RELEASE, falling back to Git inspection). I don't see a need to use: GIT_TAG="${BUILD_VERSION}-${BUILD_RELEASE}" with both, because if we know the version is v4.1.8, who cares about the timestamp? We only ever get a single 4.1.8 far enough along to show up in front of end-users, even if there's a build hiccup or some such that causes us to build multiple rounds with the same version internally. There's a bunch of v4.2.0, etc., in the run-up to a new minor release, but we have commit hashes to distinguish between those. [1]: openshift#1828 [2]: https://gitlab.cee.redhat.com/openshift-art/tools/doozer/commit/b02114a0bb26bbb7f60f1cc484c17fc3172c6df4 distgit.py: ART-165 add build ENV vars, 2019-07-07 [3]: http://pkgs.devel.redhat.com/cgit/containers/ose-installer/tree/Dockerfile?h=rhaos-4.1-rhel-7 [4]: openshift#1829 (comment)
Like 3313c08 (#1744), but for tags. This should fix #1828:
Doozer sets
SOURCE_GIT_TAGjust like it setsSOURCE_GIT_COMMIT.Fixes #1828.