Skip to content

Commit

Permalink
Merge branch 'main' into helm_doc_sources
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd authored Apr 13, 2024
2 parents 9fbd2df + ddd47d7 commit f020472
Show file tree
Hide file tree
Showing 2,233 changed files with 299,730 additions and 88,673 deletions.
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ d0998872d8116edd5ebc8231dbdd28779591dc2b

# This commit ran Black over the whole codebase.
29cf9fc8b25a540f32e4a9e0aeeaaa6ea4dcc48f

# README in german was reverted within a day by 208e941ce6281ee9ce7ba16815f643e116bfdbc9
dc8227b9841a1057b6ca8629c430f072dd9a190f

# This commit formatted all Rust code
3632a66bc7918ace25c0aa6f05b4b6a4253d908e
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ contact_links:
url: https://www.pantsbuild.org/
about: You can find a lot of useful information here.
- name: The Pants Community Chat
url: https://join.slack.com/t/pantsbuild/shared_invite/zt-d0uh0mok-RLvVosDiX6JDpvStH~bFBA
url: https://www.pantsbuild.org/docs/getting-help
about: We're a friendly community, and happy to answer questions!
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/user_registration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ body:
description: |
We'd love to use your company's logo on the Users Page!
Please ensure that you have the right to grant us permission to use the logo in
this manner before adding it.
By attaching it here, permission is granted to display this logo on pantsbuild.org
in affirmation that the organization uses Pants. No other usage rights are granted to
the organization's intellectual property. Please ensure that you have the right to
grant us permission to use the logo in this manner before adding it.
If you're unsure, please submit this page without the logo, and we can revisit it later,
if/when permission has been established. The other information is still very helpful!
Expand Down
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ updates:
time: "03:00"
timezone: "US/Pacific"
reviewers:
- Eric-Arellano
- stuhood
16 changes: 16 additions & 0 deletions .github/workflows/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

files(
sources=["*.yaml"],
overrides={
"auto-cherry-picker.yaml": {
"dependencies": [
"//build-support/cherry_pick/package.json:support_files",
"//build-support/cherry_pick/package-lock.json:support_files",
"//build-support/cherry_pick/helper.js:support_files",
"//build-support/cherry_pick/make_pr.sh:support_files",
]
}
},
)
29 changes: 6 additions & 23 deletions .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,25 @@
# GENERATED, DO NOT EDIT!
# To change, edit `build-support/bin/generate_github_workflows.py` and run:
# ./pants run build-support/bin/generate_github_workflows.py
# To change, edit `src/python/pants_release/generate_github_workflows.py` and run:
# ./pants run src/python/pants_release/generate_github_workflows.py


jobs:
audit:
if: ${{ github.repository_owner == 'pantsbuild' }}
if: github.repository_owner == 'pantsbuild'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 10
- if: github.event_name == 'push'
name: Get commit message for branch builds
run: 'echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV
echo "$(git log --format=%B -n 1 HEAD)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
'
- if: github.event_name == 'pull_request'
name: Get commit message for PR builds
run: 'echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV
echo "$(git log --format=%B -n 1 HEAD^2)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
'
- name: Cargo audit (for security vulnerabilities)
run: './cargo install --version 0.16.0 cargo-audit
run: './cargo install --version 0.17.5 cargo-audit
./cargo audit
./cargo audit --ignore RUSTSEC-2020-0128
'
name: Cargo Audit
'on':
schedule:
- cron: 11 8 * * *
workflow_dispatch: null
105 changes: 105 additions & 0 deletions .github/workflows/auto-cherry-picker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Auto Cherry-Picker

on:
# NB: This is safe since we already have merged the PR.
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
pull_request_target:
types: [closed]
branches: [main]
workflow_dispatch:
inputs:
PR_number:
description: The PR number to cherry-pick
type: string
required: true

jobs:
prerequisites:
name: Gather Prerequisites
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'needs-cherrypick') )
runs-on: ubuntu-latest
outputs:
pr_num: ${{ steps.get-prereqs.outputs.pr_num }}
merge_commit: ${{ steps.get-prereqs.outputs.merge_commit }}
matrix: ${{ steps.get-prereqs.outputs.matrix }}
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Check out code
uses: actions/checkout@v3
- run: npm install ./build-support/cherry_pick
- id: get-prereqs
name: Get Cherry-Pick prerequisites
uses: actions/github-script@v6
with:
github-token: ${{ secrets.WORKER_PANTS_CHERRY_PICK_PAT }}
script: |
const Helper = require('./build-support/cherry_pick/helper.js');
const helper = new Helper({octokit: github, context, core});
const prereqs = await helper.get_prereqs();
if (prereqs !== null) {
core.setOutput("pr_num", prereqs.pr_num);
core.setOutput("merge_commit", prereqs.merge_commit);
core.setOutput("matrix", prereqs.milestones.map(
milestone => {return {
milestone,
branch_name: `cherry-pick-${prereqs.pr_num}-to-${milestone}`,
}}
));
}
cherry_picker:
name: Cherry-Pick
needs: prerequisites
runs-on: ubuntu-latest
continue-on-error: true # Don't cancel other jobs if this one fails
strategy:
matrix:
include: ${{ fromJSON(needs.prerequisites.outputs.matrix) }}
steps:
- name: Check out code
uses: actions/checkout@v3
with:
token: ${{ secrets.WORKER_PANTS_CHERRY_PICK_PAT }}
- name: Prepare cherry-pick branch
if: ${{ !env.ACT }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "Worker Pants (Pantsbuild GitHub Automation Bot)"
git fetch --depth=2 origin "${{ needs.prerequisites.outputs.merge_commit }}"
# NB: If this fetch fails, we assume that means the milestone branch hasn't been created yet
git fetch --depth 1 origin "${{ matrix.milestone }}" || exit 0
git checkout -b "${{ matrix.branch_name }}" FETCH_HEAD
git cherry-pick "${{ needs.prerequisites.outputs.merge_commit }}"
git push -u origin "${{ matrix.branch_name }}"
# Now we go back to `main` to ensure we're running the latest `make_pr.sh`.
# (this only really should matter if we're cherry-picking changed to `make_pr.sh` itself).
git checkout main
- name: Create Cherry-Pick Branch
env:
GH_TOKEN: ${{ secrets.WORKER_PANTS_CHERRY_PICK_PAT }}
run: |
bash build-support/cherry_pick/make_pr.sh "${{ needs.prerequisites.outputs.pr_num }}" "${{ matrix.milestone }}" "${{ matrix.branch_name }}"
post_pick:
name: Post-Pick Actions
needs: [cherry_picker, prerequisites]
runs-on: ubuntu-latest
# NB: We don't want to run if the prerequisites job failed or was skipped
if: needs.prerequisites.result == 'success' && (success() || failure())
steps:
- name: Check out code
uses: actions/checkout@v3
- run: npm install ./build-support/cherry_pick
- name: Run Script
uses: actions/github-script@v6
with:
github-token: ${{ secrets.WORKER_PANTS_CHERRY_PICK_PAT }}
script: |
const Helper = require('./build-support/cherry_pick/helper.js');
const helper = new Helper({octokit: github, context, core});
await helper.cherry_pick_finished("${{ needs.prerequisites.outputs.merge_commit }}", ${{ needs.prerequisites.outputs.matrix }});
44 changes: 5 additions & 39 deletions .github/workflows/cache_comparison.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GENERATED, DO NOT EDIT!
# To change, edit `build-support/bin/generate_github_workflows.py` and run:
# ./pants run build-support/bin/generate_github_workflows.py
# To change, edit `src/python/pants_release/generate_github_workflows.py` and run:
# ./pants run src/python/pants_release/generate_github_workflows.py


jobs:
Expand All @@ -11,40 +11,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 10
- if: github.event_name == 'push'
name: Get commit message for branch builds
run: 'echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV
echo "$(git log --format=%B -n 1 HEAD)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
'
- if: github.event_name == 'pull_request'
name: Get commit message for PR builds
run: 'echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV
echo "$(git log --format=%B -n 1 HEAD^2)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
'
- if: github.event_name != 'pull_request'
name: Setup toolchain auth
run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV
'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Tell Pants to use Python ${{ matrix.python-version }}
run: 'echo "PY=python${{ matrix.python-version }}" >> $GITHUB_ENV
echo "PANTS_PYTHON_INTERPRETER_CONSTRAINTS=[''==${{ matrix.python-version
}}.*'']" >> $GITHUB_ENV
'
python-version: '3.9'
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe
- env:
Expand All @@ -69,10 +39,6 @@ jobs:
run: "dist/build-support.bin/cache_comparison_py.pex \\\n --args=\"$PANTS_ARGS\"\
\ \\\n --build-commit=\"$BUILD_COMMIT\" \\\n --source-diffspec=\"$SOURCE_DIFFSPEC\"\
\ \\\n --source-diffspec-step=$SOURCE_DIFFSPEC_STEP\n"
strategy:
matrix:
python-version:
- '3.7'
timeout-minutes: 90
name: Cache Comparison
'on':
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/cancel.yaml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/clear_self_hosted_persistent_caches.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# GENERATED, DO NOT EDIT!
# To change, edit `src/python/pants_release/generate_github_workflows.py` and run:
# ./pants run src/python/pants_release/generate_github_workflows.py


jobs:
clean_linux_arm64:
runs-on:
- self-hosted
- Linux
- ARM64
steps:
- name: df before
run: df -h
- name: Deleting ~/Library/Caches
run: du -sh ~/Library/Caches || true; rm -rf ~/Library/Caches || true
- name: Deleting ~/.cache
run: du -sh ~/.cache || true; rm -rf ~/.cache || true
- name: Deleting ~/.nce
run: du -sh ~/.nce || true; rm -rf ~/.nce || true
- name: Deleting ~/.rustup
run: du -sh ~/.rustup || true; rm -rf ~/.rustup || true
- name: Deleting ~/.pex
run: du -sh ~/.pex || true; rm -rf ~/.pex || true
- name: df after
run: df -h
clean_macos10_15_x86_64:
runs-on:
- self-hosted
- macOS-10.15-X64
steps:
- name: df before
run: df -h
- name: Deleting ~/Library/Caches
run: du -sh ~/Library/Caches || true; rm -rf ~/Library/Caches || true
- name: Deleting ~/.cache
run: du -sh ~/.cache || true; rm -rf ~/.cache || true
- name: Deleting ~/.nce
run: du -sh ~/.nce || true; rm -rf ~/.nce || true
- name: Deleting ~/.rustup
run: du -sh ~/.rustup || true; rm -rf ~/.rustup || true
- name: Deleting ~/.pex
run: du -sh ~/.pex || true; rm -rf ~/.pex || true
- name: df after
run: df -h
clean_macos11_arm64:
runs-on:
- self-hosted
- macOS-11-ARM64
steps:
- name: df before
run: df -h
- name: Deleting ~/Library/Caches
run: du -sh ~/Library/Caches || true; rm -rf ~/Library/Caches || true
- name: Deleting ~/.cache
run: du -sh ~/.cache || true; rm -rf ~/.cache || true
- name: Deleting ~/.nce
run: du -sh ~/.nce || true; rm -rf ~/.nce || true
- name: Deleting ~/.rustup
run: du -sh ~/.rustup || true; rm -rf ~/.rustup || true
- name: Deleting ~/.pex
run: du -sh ~/.pex || true; rm -rf ~/.pex || true
- name: df after
run: df -h
name: Clear persistent caches on long-lived self-hosted runners
'on':
workflow_dispatch: {}
Loading

0 comments on commit f020472

Please sign in to comment.