Skip to content
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

Release Archiver #1768

Merged
merged 3 commits into from
Nov 23, 2020
Merged

Release Archiver #1768

merged 3 commits into from
Nov 23, 2020

Conversation

puerco
Copy link
Member

@puerco puerco commented Nov 21, 2020

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR implements in go the anago code corresponding to the old archive_release () function.

This part of the release process copies a release to the release bucket, sanitizes the log files, changes the ACL of the logs and removes older staged releases.

Which issue(s) this PR fixes:

Part of #1673
Related to #1765

Special notes for your reviewer:

PR is broken in 3 commits:

  • Utility functions to clean logs and a modification to the GCS package to delete paths
  • Release Archiver
  • Tests and generated mocks

Does this PR introduce a user-facing change?

- The `anago` function `archive_release ()` to copy a release into the archive bucket is now implemented in go.

@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. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 21, 2020
@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 21, 2020
Two functions have been added to the util pkg:
 - StripControlCharacters() Removes control chars and bare linefeeds
 - StripSensitiveData() Removes data deemed sensitive (currently oauth tokens)
 - CleanLogFile() uses the former two to clean log files

Thegcs package now can delete location from a bucket using a new func:

 - gcs.DeletePath() - this function honors the flag mechanism in the package

Signed-off-by: Adolfo García Veytia (Puerco) <adolfo.garcia@uservers.net>
This commit packs pkg/release/archive.go which implements the old archive
functionality from bash anago.

Signed-off-by: Adolfo García Veytia (Puerco) <adolfo.garcia@uservers.net>
This commit adds the tests for the release archiver

They are broken into three files:

 - archive_test.go Implements the test using the counterfeiter mocks
 - archive_unit_test.go Has te individual unit tests for the functions that power the archiver
 - releasefakes/fake_archiver_impl.go The generated mock implementation

Signed-off-by: Adolfo García Veytia (Puerco) <adolfo.garcia@uservers.net>
@puerco puerco changed the title [WIP] krel anago: Archive release Release Archiver Nov 22, 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 Nov 22, 2020
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: puerco, 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 lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 23, 2020
@k8s-ci-robot k8s-ci-robot merged commit 9645d87 into kubernetes:master Nov 23, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Nov 23, 2020
@puerco puerco deleted the archive-release branch November 27, 2020 18:24
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/feature Categorizes issue or PR as related to a new feature. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants