Skip to content

[BEAM-10399] Periodic clear of GCS wheels staging bucket - #12049

Closed
TobKed wants to merge 2 commits into
apache:masterfrom
TobKed:github-actions-periodic-gcs-clear
Closed

[BEAM-10399] Periodic clear of GCS wheels staging bucket#12049
TobKed wants to merge 2 commits into
apache:masterfrom
TobKed:github-actions-periodic-gcs-clear

Conversation

@TobKed

@TobKedTobKed commented Jun 22, 2020

Copy link
Copy Markdown
Contributor

Once per month clear GCS folders which do not have corresponding branches.

About cleaning up these GCS locations I consider two options:

  • setting lifecycle management on the bucket which will delete files older than some arbitrary age, e.g. 365 days. I think advantage of this is that will be maintenance free.
  • creating another scheduled workflow on github actions which will delete gcs folders if corresponding branch does not exist anymore. Could be scheduled to run e.g. once pre week.

#11877 (comment)
#11877 (comment)

Before merging

Before merging it is required to setup related secrets:

  • GCP_PROJECT_ID

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Post-Commit Tests Status (on master branch)

LangSDKApexDataflowFlinkGearpumpSamzaSpark
GoBuild Status------Build Status------Build Status
JavaBuild StatusBuild StatusBuild Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build StatusBuild StatusBuild Status
Build Status
Build Status
PythonBuild Status
Build Status
Build Status
Build Status
---Build Status
Build Status
Build Status
Build Status
Build Status
------Build Status
XLang---------Build Status------Build Status

Pre-Commit Tests Status (on master branch)

---JavaPythonGoWebsite
Non-portableBuild StatusBuild Status
Build Status
Build StatusBuild Status
Portable---Build Status------

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@TobKed
TobKedforce-pushed the github-actions-periodic-gcs-clear branch from 5e579bb to ee4916cCompareJune 30, 2020 11:58
@TobKedTobKed changed the title GitHub Actions periodic GCS clear [dependent on [BEAM-10184]]GitHub Actions periodic GCS clearJun 30, 2020
@TobKedTobKed changed the title GitHub Actions periodic GCS clear[BEAM-10399] Periodic clear of GCS wheels staging bucketJul 1, 2020
@TobKed
TobKed marked this pull request as ready for review July 1, 2020 13:58
service_account_key: ${{ secrets.GCP_SA_KEY }}
- name: Delete folders without corresponding branch in repo
run: |
declare -a FOLDERS_TO_BE_DELETED=()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's much better to put it all in separate bash script and call it from there. It's easier to analyse it this way

@mik-lajmik-lajJul 1, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree. The bash script contained in the YAML file cannot be validated by shellcheck.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks for the suggestion. I moved it to the separate file. Looks much more nicer and it is easier do test script locally.

@TobKed

Copy link
Copy Markdown
ContributorAuthor

R: @kamilwu@aaltay

@aaltay

aaltay commented Jul 8, 2020

Copy link
Copy Markdown
Member

What files will be cleared this way? Release branches live forever. Would there be other branches that this script will clean?

@TobKed

Copy link
Copy Markdown
ContributorAuthor

At the moment only master and release branches upload wheels to GCS. and after learning that release branches are kept forever this PR seems has no sense.

@TobKedTobKed closed this Jul 13, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@TobKed@aaltay@potiuk@mik-laj