Skip to content

Add first patch release changelog integration test #1023

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

Closed
wants to merge 1 commit into from
Closed

Add first patch release changelog integration test #1023

wants to merge 1 commit into from

Conversation

saschagrunert
Copy link
Member

@saschagrunert saschagrunert commented Jan 17, 2020

We now use a bare repo to integration test (or e2e test) the changelog functionality. A patch release integration test has been added as well, but we still need tests for the other use cases.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. labels Jan 17, 2020
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 17, 2020
@saschagrunert
Copy link
Member Author

The failing test is expected due to the missing token.

@saschagrunert saschagrunert changed the title Add first patch release changelog integration test WIP: Add first patch release changelog integration test Jan 17, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 17, 2020
@justaugustus
Copy link
Member

justaugustus commented Jan 19, 2020

@saschagrunert -- None of our release tools should support passing the GitHub token as a flag. We should instead read it in from the environment. It opens us up to token exposure in log output.

I'd like to see that option removed from any tools that have it today.
Can you handle that in this PR?

@justaugustus
Copy link
Member

/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 Jan 19, 2020
@saschagrunert
Copy link
Member Author

@saschagrunert -- None of our release tools should support passing the GitHub token as a flag. We should instead read it in from the environment. It opens us up to token exposure in log output.

I'd like to see that option removed from any tools that have it today.
Can you handle that in this PR?

Yes, I will include a check for GITHUB_TOKEN in the tests as well as in the CLI flag for krel changelog.

@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 20, 2020
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 30, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: saschagrunert
To complete the pull request process, please assign hoegaarden
You can assign the PR to them by writing /assign @hoegaarden in a comment when ready.

The full list of commands accepted by this bot can be found 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 removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 30, 2020
cwd, err := os.Getwd()
require.Nil(t, err)
testDataDir := filepath.Join(cwd, "test")
tempDir := filepath.Join(testDataDir, "tmp")
Copy link
Contributor

@hoegaarden hoegaarden Jan 31, 2020

Choose a reason for hiding this comment

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

Is there a reason why we do that in the repo's dir and not in the system's temp dir? Also, if I am not mistaken, we don't clean that up, or do we?

Copy link
Member Author

Choose a reason for hiding this comment

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

I had issues accessing the /tmp dir when running in bazel, maybe you know a better way around it?

Copy link
Contributor

Choose a reason for hiding this comment

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

So you are saying something like ioutil.TempDir(...) does not work in the bazel sandbox? I'll try to reproduce that thing, maybe I'll find something.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I think so, I can give it another try 🤷‍♂️

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 5, 2020
@saschagrunert saschagrunert changed the title WIP: Add first patch release changelog integration test Add first patch release changelog integration test Feb 6, 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 Feb 6, 2020
"changelog_test.go",
"root_test.go",
],
data = glob(["testdata/**"]),
Copy link
Member Author

Choose a reason for hiding this comment

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

@hoegaarden this seems to work as well 🤷‍♂️

@saschagrunert
Copy link
Member Author

Closing in favor of #1068

@saschagrunert saschagrunert deleted the changelog-integration branch February 6, 2020 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants