Skip to content

Conversation

saschagrunert
Copy link
Member

@saschagrunert saschagrunert commented May 29, 2020

What type of PR is this?

/kind api-change
/kind cleanup

What this PR does / why we need it:

We usually run anago only within GCB so we have no need for a dedicated
--gcb flag.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

This will break the usage of tools like find_green_build and push-build for local execution as well, becase we cannot distinguish any more if we're running locally.

Does this PR introduce a user-facing change?

- Changed `anago` to always expect to be run inside GCB.
  This means local runs of `anago` are not possible any more.
  The flag `--gcb` does not exist any more and is enforced inside `anago` via `export FLAGS_gcb=1`

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels May 29, 2020
@k8s-ci-robot
Copy link
Contributor

@saschagrunert: Adding label: do-not-merge/blocked-paths because PR changes a protected file.

Reasons for blocking this PR:

[Changes to certain release tools can affect our ability to test, build, and release Kubernetes. This PR must be explicitly approved by SIG Release repo admins.]

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.

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 29, 2020
@k8s-ci-robot k8s-ci-robot added the sig/release Categorizes an issue or PR as relevant to SIG Release. label May 29, 2020
Copy link
Member

@justaugustus justaugustus left a comment

Choose a reason for hiding this comment

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

@saschagrunert -- Great cleanup all around!

Can you provide more explicit detail about what would break in find_green_build and push-build.sh? I'm less concerned about find_green_build, but if "local" runs of push-build.sh break, it will break all of the ci-kubernetes-build* jobs.

After we answer that ^^, I'd like to see a successful stage/release from this PR.
The changes appear fairly straightforward, but with anago, you never know! 😅
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 29, 2020
@justaugustus
Copy link
Member

For visibility: @kubernetes/release-managers

@saschagrunert
Copy link
Member Author

Can you provide more explicit detail about what would break in find_green_build and push-build.sh? I'm less concerned about find_green_build, but if "local" runs of push-build.sh break, it will break all of the ci-kubernetes-build* jobs.

  • find_green_build is using common:check_packages which will now only work with Ubuntu.
  • every script (push-build.sh, find_green_build, prin, anago) which is using gitlib.sh will now only work via GCB, because we do not pass the FLAGS_gcb any more.

The second one might be a bigger issue, I think I can solve it by reverting the change and setting the flag based on the script execution path…

@saschagrunert saschagrunert changed the title WIP: Remove FLAGS_gcb from anago Remove FLAGS_gcb from anago Jun 2, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 2, 2020
We usually run anago only within GCB so we have no need for a dedicated
`--gcb` flag.

Signed-off-by: Sascha Grunert <[email protected]>
@saschagrunert
Copy link
Member Author

saschagrunert commented Jun 2, 2020

Some basic test were successful.

Stage

✔️ $ TOOL_ORG=saschagrunert TOOL_BRANCH=flags-gcb krel gcbmgr --stage --type beta
INFO Verifying repository state
INFO Repository is in clean state
INFO Found matching branch "flags-gcb"
INFO Found matching organization "saschagrunert" and repository "release" in remote: origin ([email protected]:saschagrunert/release)
INFO Verifying remote HEAD commit
INFO Got remote commit: 59a2fd57f1f13da1d8496860cb3b4352b7d2563d
INFO Verifying that remote commit is equal to the local one
INFO Repository is up-to-date
INFO Running gcbmgr with the following options: &{Stage:true Release:false Stream:false Branch:master ReleaseType:beta BuildVersion: GcpUser: LastJobs:5 Repo:0xc0003f9950 Version:0xc0003f9960}
INFO Build options: {  cloudbuild.yaml   kubernetes-release-test false false false   }
INFO Retrieving Kubernetes release version for ci/latest on branch master
INFO Retrieving Kubernetes build version from https://dl.k8s.io/ci/latest.txt...
INFO Retrieved Kubernetes version: v1.19.0-beta.0.348+7bd4c53b275f5c
INFO Trying to get the kube-cross version for master...
INFO Found the following kube-cross version: v1.13.9-5
INFO Listing GCB substitutions prior to build submission...
INFO BUILDVERSION: --buildversion=v1.19.0-beta.0.348+7bd4c53b275f5c
INFO NOMOCK_TAG:
INFO NOMOCK:
INFO TOOL_ORG: saschagrunert
INFO TOOL_BRANCH: flags-gcb
INFO TYPE: beta
INFO RELEASE_BRANCH: master
INFO BUILD_AT_HEAD:
INFO BUILD_POINT: v1.19.0-beta.0.348-7bd4c53b275f5c
INFO KUBE_CROSS_VERSION: v1.13.9-5
INFO TOOL_REPO: release
INFO GCP_USER_TAG: saschagrunert-at-gmail-com
INFO TYPE_TAG: beta
INFO Build directory: /home/sascha/go/src/k8s.io/release/gcb/stage
INFO Config directory: /home/sascha/go/src/k8s.io/release/gcb/stage
INFO cd-ing to build directory: /home/sascha/go/src/k8s.io/release/gcb/stage
ID                                    CREATE_TIME                DURATION  SOURCE  IMAGES  STATUS
25c09d7a-50f9-40e6-97f4-8044244141c4  2020-06-02T09:52:24+00:00  -         -       -       QUEUED
INFO: Refreshing access_token
Created [https://cloudbuild.googleapis.com/v1/projects/kubernetes-release-test/builds/25c09d7a-50f9-40e6-97f4-8044244141c4].
Logs are available at [https://console.cloud.google.com/cloud-build/builds/25c09d7a-50f9-40e6-97f4-8044244141c4?project=648026197307].
INFO: Display format: "
        table(
          id,
          createTime.date('%Y-%m-%dT%H:%M:%S%Oz', undefined='-'),
          duration(start=startTime,end=finishTime,precision=0,calendar=false,undefined="  -").slice(2:).join(""):label=DURATION,
          build_source(undefined="-"):label=SOURCE,
          build_images(undefined="-"):label=IMAGES,
          status
        )
      "

Logs: https://console.cloud.google.com/cloud-build/builds/25c09d7a-50f9-40e6-97f4-8044244141c4?project=648026197307

Release

✔️ $ TOOL_ORG=saschagrunert TOOL_BRANCH=flags-gcb krel gcbmgr --release --type beta --branch master --build-version=v1.19.0-beta.0.348+7bd4c53b275f5c
INFO Verifying repository state
INFO Repository is in clean state
INFO Found matching branch "flags-gcb"
INFO Found matching organization "saschagrunert" and repository "release" in remote: origin ([email protected]:saschagrunert/release)
INFO Verifying remote HEAD commit
INFO Got remote commit: 59a2fd57f1f13da1d8496860cb3b4352b7d2563d
INFO Verifying that remote commit is equal to the local one
INFO Repository is up-to-date
INFO Running gcbmgr with the following options: &{Stage:false Release:true Stream:false Branch:master ReleaseType:beta BuildVersion:v1.19.0-beta.0.348+7bd4c53b275f5c GcpUser: LastJobs:5 Repo:0xc000427940 Version:0xc000427950}
INFO Build options: {  cloudbuild.yaml   kubernetes-release-test false false false   }
INFO Trying to get the kube-cross version for master...
INFO Found the following kube-cross version: v1.13.9-5
INFO Listing GCB substitutions prior to build submission...
INFO BUILD_POINT: v1.19.0-beta.0.348-7bd4c53b275f5c
INFO BUILDVERSION: --buildversion=v1.19.0-beta.0.348+7bd4c53b275f5c
INFO TOOL_ORG: saschagrunert
INFO TOOL_BRANCH: flags-gcb
INFO GCP_USER_TAG: saschagrunert-at-gmail-com
INFO TYPE: beta
INFO TYPE_TAG: beta
INFO RELEASE_BRANCH: master
INFO NOMOCK_TAG:
INFO TOOL_REPO: release
INFO KUBE_CROSS_VERSION: v1.13.9-5
INFO NOMOCK:
INFO Build directory: /home/sascha/go/src/k8s.io/release/gcb/release
INFO Config directory: /home/sascha/go/src/k8s.io/release/gcb/release
INFO cd-ing to build directory: /home/sascha/go/src/k8s.io/release/gcb/release
ID                                    CREATE_TIME                DURATION  SOURCE  IMAGES  STATUS
4f2d263a-8e18-46e0-b03f-1b6ff541407e  2020-06-02T10:42:18+00:00  -         -       -       QUEUED
Created [https://cloudbuild.googleapis.com/v1/projects/kubernetes-release-test/builds/4f2d263a-8e18-46e0-b03f-1b6ff541407e].
Logs are available at [https://console.cloud.google.com/cloud-build/builds/4f2d263a-8e18-46e0-b03f-1b6ff541407e?project=648026197307].
INFO: Display format: "
        table(
          id,
          createTime.date('%Y-%m-%dT%H:%M:%S%Oz', undefined='-'),
          duration(start=startTime,end=finishTime,precision=0,calendar=false,undefined="  -").slice(2:).join(""):label=DURATION,
          build_source(undefined="-"):label=SOURCE,
          build_images(undefined="-"):label=IMAGES,
          status
        )
      "

Logs: https://console.cloud.google.com/cloud-build/builds/4f2d263a-8e18-46e0-b03f-1b6ff541407e?project=kubernetes-release-test

I have to mention that the --gcb flag will still be passed to anago because the cloudbuild.yaml changes are part of this PR.

@justaugustus
Copy link
Member

This should be good to merge now. Thanks @saschagrunert!
/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 7, 2020
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 7, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus, saschagrunert

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 7, 2020
@justaugustus justaugustus removed the do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. label Jun 7, 2020
@justaugustus
Copy link
Member

@saschagrunert -- Given this was added:

export FLAGS_gcb=1

It merits an update to the release note. We're essentially faking GCB usage by unconditionally setting the flag, right?

@k8s-ci-robot k8s-ci-robot merged commit f48a38b into kubernetes:master Jun 7, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Jun 7, 2020
@saschagrunert
Copy link
Member Author

@saschagrunert -- Given this was added:

export FLAGS_gcb=1

It merits an update to the release note. We're essentially faking GCB usage by unconditionally setting the flag, right?

Yep that’s right. I changed the release note, please take a look.

@saschagrunert saschagrunert deleted the flags-gcb branch June 7, 2020 17:33
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. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants