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

v3.7.1 merge-back #5802

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Use ASV to check for performance regressions, either:
# - In the last 24 hours' commits.
# - Introduced by this pull request.
# Use ASV to check for performance regressions in the last 24 hours' commits.

name: benchmarks-run
run-name: Run benchmarks
name: benchmark-check

on:
schedule:
Expand All @@ -12,7 +9,7 @@ on:
workflow_dispatch:
inputs:
first_commit:
description: "First commit to benchmark (see bm_runner.py > Overnight)."
description: "Argument to be passed to the overnight benchmark script."
required: false
type: string
pull_request:
Expand All @@ -29,14 +26,14 @@ jobs:
env:
IRIS_TEST_DATA_LOC_PATH: benchmarks
IRIS_TEST_DATA_PATH: benchmarks/iris-test-data
IRIS_TEST_DATA_VERSION: "2.22"
IRIS_TEST_DATA_VERSION: "2.19"
# Lets us manually bump the cache to rebuild
ENV_CACHE_BUILD: "0"
TEST_DATA_CACHE_BUILD: "2"

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down Expand Up @@ -77,17 +74,12 @@ jobs:

- name: Benchmark this pull request
if: ${{ github.event.label.name == 'benchmark_this' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
run: |
git checkout ${{ github.head_ref }}
python benchmarks/bm_runner.py branch origin/${{ github.base_ref }}

- name: Run overnight benchmarks
id: overnight
if: ${{ github.event_name != 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
first_commit=${{ inputs.first_commit }}
if [ "$first_commit" == "" ]
Expand All @@ -100,27 +92,57 @@ jobs:
python benchmarks/bm_runner.py overnight $first_commit
fi

- name: Warn of failure
if: >
failure() &&
steps.overnight.outcome == 'failure'
- name: Create issues for performance shifts
if: ${{ github.event_name != 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
title="Overnight benchmark workflow failed: \`${{ github.run_id }}\`"
body="Generated by GHA run [\`${{github.run_id}}\`](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})"
gh issue create --title "$title" --body "$body" --label "Bot" --label "Type: Performance" --repo $GITHUB_REPOSITORY
if [ -d benchmarks/.asv/performance-shifts ]
then
cd benchmarks/.asv/performance-shifts
for commit_file in *
do
commit="${commit_file%.*}"
pr_number=$(git log "$commit"^! --oneline | grep -o "#[0-9]*" | tail -1 | cut -c 2-)
author=$(gh pr view $pr_number --json author -q '.["author"]["login"]' --repo $GITHUB_REPOSITORY)
merger=$(gh pr view $pr_number --json mergedBy -q '.["mergedBy"]["login"]' --repo $GITHUB_REPOSITORY)
# Find a valid assignee from author/merger/nothing.
if curl -s https://api.github.com/users/$author | grep -q '"type": "User"'; then
assignee=$author
elif curl -s https://api.github.com/users/$merger | grep -q '"type": "User"'; then
assignee=$merger
else
assignee=""
fi
title="Performance Shift(s): \`$commit\`"
body="
Benchmark comparison has identified performance shifts at

* commit $commit (#$pr_number).

Please review the report below and \
take corrective/congratulatory action as appropriate \
:slightly_smiling_face:

- name: Upload any benchmark reports
if: success() || steps.overnight.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: benchmark_reports
path: .github/workflows/benchmark_reports
<details>
<summary>Performance shift report</summary>

\`\`\`
$(cat $commit_file)
\`\`\`

</details>

Generated by GHA run [\`${{github.run_id}}\`](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
"
gh issue create --title "$title" --body "$body" --assignee $assignee --label "Bot" --label "Type: Performance" --repo $GITHUB_REPOSITORY
done
fi

- name: Archive asv results
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: asv-raw-results
path: benchmarks/.asv/results
name: asv-report
path: |
benchmarks/.asv/results
83 changes: 0 additions & 83 deletions .github/workflows/benchmarks_report.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ concurrency:
jobs:
manifest:
name: "check-manifest"
uses: scitools/workflows/.github/workflows/ci-manifest.yml@2023.10.0
uses: scitools/workflows/.github/workflows/ci-manifest.yml@2023.06.0
6 changes: 3 additions & 3 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ jobs:
session: "tests"

env:
IRIS_TEST_DATA_VERSION: "2.22"
IRIS_TEST_DATA_VERSION: "2.19"
ENV_NAME: "ci-tests"

steps:
- name: "checkout"
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: "environment configure"
env:
Expand All @@ -80,7 +80,7 @@ jobs:
env_name: ${{ env.ENV_NAME }}

- name: "conda install"
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
channels: conda-forge,defaults
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
name: "build sdist & wheel"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
env:
ENV_NAME: "ci-wheels"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -82,7 +82,7 @@ jobs:
env_name: ${{ env.ENV_NAME }}

- name: "conda install"
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
channels: conda-forge,defaults
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/refresh-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ on:

jobs:
refresh_lockfiles:
uses: scitools/workflows/.github/workflows/refresh-lockfiles.yml@2023.10.0
uses: scitools/workflows/.github/workflows/refresh-lockfiles.yml@2023.06.0
secrets: inherit
14 changes: 7 additions & 7 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
Otherwise this issue will be automatically closed in 28 days time.

# Comment on the staled prs.
stale-pr-message: |
stale-pr-message: |
In order to maintain a backlog of relevant PRs, we automatically label them as stale after 500 days of inactivity.

If this PR is still important to you, then please comment on this PR and the stale label will be removed.
Expand All @@ -43,32 +43,32 @@ jobs:
# Comment on the staled issues while closed.
close-issue-message: |
This stale issue has been automatically closed due to a lack of community activity.

If you still care about this issue, then please either:
* Re-open this issue, if you have sufficient permissions, or
* Add a comment stating that this is still relevant and someone will re-open it on your behalf.
* Add a comment pinging `@SciTools/iris-devs` who will re-open on your behalf.

# Comment on the staled prs while closed.
close-pr-message: |
This stale PR has been automatically closed due to a lack of community activity.

If you still care about this PR, then please either:
* Re-open this PR, if you have sufficient permissions, or
* Add a comment pinging `@SciTools/iris-devs` who will re-open on your behalf.

# Label to apply on staled issues.
# Label to apply on staled issues.
stale-issue-label: Stale

# Label to apply on staled prs.
stale-pr-label: Stale

# Labels on issues exempted from stale.
exempt-issue-labels:
"Status: Blocked,Status: Decision Required,Peloton 🚴‍♂️,Good First Issue, Dragon 🐉, Dragon Sub-Task 🦎, Release: Major"
"Status: Blocked,Status: Decision Required,Peloton 🚴‍♂️,Good First Issue"

# Labels on prs exempted from stale.
exempt-pr-labels:
"Status: Blocked,Status: Decision Required,Peloton 🚴‍♂️,Good First Issue, Dragon 🐉, Dragon Sub-Task 🦎, Release: Major"
"Status: Blocked,Status: Decision Required,Peloton 🚴‍♂️,Good First Issue"

# Max number of operations per run.
operations-per-run: 300
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pip-cache
# asv data, environments, results
.asv
benchmarks/.data
.github/workflows/benchmark_reports

#Translations
*.mo
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ minimum_pre_commit_version: 1.21.0

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.4.0
hooks:
# Prevent giant files from being committed.
- id: check-added-large-files
Expand All @@ -29,14 +29,14 @@ repos:
- id: no-commit-to-branch

- repo: https://github.com/codespell-project/codespell
rev: "v2.2.6"
rev: "v2.2.5"
hooks:
- id: codespell
types_or: [asciidoc, python, markdown, rst]
additional_dependencies: [tomli]

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 23.7.0
hooks:
- id: black
pass_filenames: false
Expand All @@ -56,7 +56,7 @@ repos:
args: [--filter-files]

- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
rev: 1.15.0
hooks:
- id: blacken-docs
types: [file, rst]
Expand Down
Loading
Loading