Skip to content

Commit a4e4411

Browse files
authored
Copier update (github action versions) (#66)
## Why is this change necessary? Keep up to date ## How does this change address the issue? Pulls in upstream changes ## What side effects does this change have? None ## How is this change tested? downstream repo ## Other also addresses #63 and #67 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - CI tooling: optional skip for SSM Plugin install and Windows support for SSM Plugin. - Reusable Docker build workflow now exposes an artifact-name output. - Chores - Bumped many devcontainer extensions, tooling, dependencies, and GitHub Action versions. - Removed obsolete manual dependency setup script. - Pre-commit workflow: added concurrency mutex. - Publish flow: stricter import verification and changed PyPI install timing/flags. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 71c3b69 commit a4e4411

File tree

23 files changed

+318
-216
lines changed

23 files changed

+318
-216
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: v0.0.64
2+
_commit: v0.0.69
33
_src_path: gh:LabAutomationAndScreening/copier-base-template.git
44
description: Copier template for creating Python libraries and executables
55
python_ci_versions:

.devcontainer/devcontainer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
"eamodio.gitlens@15.5.1",
2424
"ms-vscode.live-server@0.5.2025051301",
2525
"MS-vsliveshare.vsliveshare@1.0.5905",
26-
"github.copilot@1.320.1564",
27-
"github.copilot-chat@0.28.2025051402",
26+
"github.copilot@1.366.1775",
27+
"github.copilot-chat@0.31.2025090401",
2828

2929
// Python
30-
"ms-python.python@2025.7.2025051401",
31-
"ms-python.vscode-pylance@2025.4.104",
30+
"ms-python.python@2025.13.2025090201",
31+
"ms-python.vscode-pylance@2025.7.102",
3232
"ms-vscode-remote.remote-containers@0.414.0",
3333
"charliermarsh.ruff@2025.24.0",
3434

@@ -61,5 +61,5 @@
6161
"initializeCommand": "sh .devcontainer/initialize-command.sh",
6262
"onCreateCommand": "sh .devcontainer/on-create-command.sh",
6363
"postStartCommand": "sh .devcontainer/post-start-command.sh"
64-
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): d72f90f7 # spellchecker:disable-line
64+
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): bec12e35 # spellchecker:disable-line
6565
}

.devcontainer/install-ci-tooling.py

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import tempfile
88
from pathlib import Path
99

10-
UV_VERSION = "0.8.4"
11-
PNPM_VERSION = "10.14.0"
12-
COPIER_VERSION = "9.9.1"
13-
COPIER_TEMPLATE_EXTENSIONS_VERSION = "0.3.2"
10+
UV_VERSION = "0.8.15"
11+
PNPM_VERSION = "10.15.1"
12+
COPIER_VERSION = "9.10.1"
13+
COPIER_TEMPLATE_EXTENSIONS_VERSION = "0.3.3"
1414
PRE_COMMIT_VERSION = "4.3.0"
1515
GITHUB_WINDOWS_RUNNER_BIN_PATH = r"C:\Users\runneradmin\.local\bin"
1616
INSTALL_SSM_PLUGIN_BY_DEFAULT = False
@@ -31,10 +31,10 @@
3131
"--no-node", action="store_true", default=False, help="Do not process any environments using node package managers"
3232
)
3333
_ = parser.add_argument(
34-
"--install-ssm-plugin",
34+
"--skip-installing-ssm-plugin",
3535
action="store_true",
36-
default=INSTALL_SSM_PLUGIN_BY_DEFAULT,
37-
help="Install the SSM plugin for AWS CLI",
36+
default=False,
37+
help="Skip installing the SSM plugin for AWS CLI",
3838
)
3939

4040

@@ -117,26 +117,43 @@ def main():
117117
else [cmd]
118118
)
119119
_ = subprocess.run(cmd, shell=True, check=True)
120-
if args.install_ssm_plugin:
121-
if is_windows:
122-
raise NotImplementedError("SSM plugin installation is not implemented for Windows")
120+
if INSTALL_SSM_PLUGIN_BY_DEFAULT and not args.skip_installing_ssm_plugin:
123121
with tempfile.TemporaryDirectory() as tmp_dir:
124-
local_package_path = Path(tmp_dir) / "session-manager-plugin.deb"
125-
# Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-debian-and-ubuntu.html
126-
# no specific reason for that version, just pinning it for best practice
127-
_ = subprocess.run(
128-
[
129-
"curl",
130-
"https://s3.amazonaws.com/session-manager-downloads/plugin/1.2.707.0/ubuntu_64bit/session-manager-plugin.deb",
131-
"-o",
132-
f"{local_package_path}",
133-
],
134-
check=True,
135-
)
136-
_ = subprocess.run(
137-
["sudo", "dpkg", "-i", str(local_package_path)],
138-
check=True,
139-
)
122+
if is_windows:
123+
local_package_path = Path(tmp_dir) / "SessionManagerPluginSetup.exe"
124+
# Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-windows.html
125+
# no specific reason for that version, just pinning it for best practice
126+
_ = subprocess.run(
127+
[
128+
"curl",
129+
"https://s3.amazonaws.com/session-manager-downloads/plugin/1.2.707.0/windows/SessionManagerPluginSetup.exe",
130+
"-o",
131+
f"{local_package_path}",
132+
],
133+
check=True,
134+
)
135+
_ = subprocess.run(
136+
[str(local_package_path), "/quiet"],
137+
check=True,
138+
)
139+
else:
140+
local_package_path = Path(tmp_dir) / "session-manager-plugin.deb"
141+
# Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-debian-and-ubuntu.html
142+
# no specific reason for that version, just pinning it for best practice
143+
_ = subprocess.run(
144+
[
145+
"curl",
146+
"https://s3.amazonaws.com/session-manager-downloads/plugin/1.2.707.0/ubuntu_64bit/session-manager-plugin.deb",
147+
"-o",
148+
f"{local_package_path}",
149+
],
150+
check=True,
151+
)
152+
_ = subprocess.run(
153+
["sudo", "dpkg", "-i", str(local_package_path)],
154+
check=True,
155+
)
156+
print("SSM Plugin Manager Version: ")
140157
_ = subprocess.run(
141158
["session-manager-plugin", "--version"],
142159
check=True,

.devcontainer/manual-setup-deps.sh

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/actions/install_deps/action.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ inputs:
1616
default: true
1717
type: boolean
1818
description: Whether to run the setup-deps script, or just to setup basic CI tooling
19+
skip-installing-ssm-plugin-manager:
20+
required: false
21+
default: false
22+
type: boolean
23+
description: Whether to explicitly skip installing the SSM Plugin manager when setting up basic CI tooling
1924
project-dir:
2025
type: string
2126
description: What's the relative path to the project?
@@ -48,24 +53,24 @@ runs:
4853

4954
- name: Setup python
5055
if: ${{ inputs.python-version != 'notUsing' }}
51-
uses: actions/setup-python@v5.6.0
56+
uses: actions/setup-python@v6.0.0
5257
with:
5358
python-version: ${{ env.PYTHON_VERSION }}
5459

5560
- name: Setup node
5661
if: ${{ inputs.node-version != 'notUsing' }}
57-
uses: actions/setup-node@v4.4.0
62+
uses: actions/setup-node@v5.0.0
5863
with:
5964
node-version: ${{ inputs.node-version }}
6065

6166
- name: Install tooling
6267
# the funky syntax is github action ternary
63-
run: python .devcontainer/install-ci-tooling.py ${{ inputs.python-version == 'notUsing' && '--no-python' || '' }} ${{ inputs.node-version == 'notUsing' && '--no-node' || '' }}
68+
run: python .devcontainer/install-ci-tooling.py ${{ inputs.python-version == 'notUsing' && '--no-python' || '' }} ${{ inputs.node-version == 'notUsing' && '--no-node' || '' }} ${{ inputs.skip-installing-ssm-plugin-manager && '--skip-installing-ssm-plugin' || '' }}
6469
shell: pwsh
6570

6671
- name: OIDC Auth for CodeArtifact
6772
if: ${{ inputs.code-artifact-auth-role-name != 'no-code-artifact' }}
68-
uses: aws-actions/configure-aws-credentials@v4.2.0
73+
uses: aws-actions/configure-aws-credentials@v5.0.0
6974
with:
7075
role-to-assume: arn:aws:iam::${{ inputs.code-artifact-auth-role-account-id }}:role/${{ inputs.code-artifact-auth-role-name }}
7176
aws-region: ${{ inputs.code-artifact-auth-region }}

.github/actions/update-devcontainer-hash/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
shell: bash
2828

2929
- name: Checkout code
30-
uses: actions/checkout@v4.2.2
30+
uses: actions/checkout@v5.0.0
3131
with:
3232
persist-credentials: true
3333
fetch-depth: 1

.github/reusable_workflows/build-docker-image.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ on:
3131
description: 'Should the image be saved as an artifact?'
3232
required: false
3333
default: false
34+
outputs:
35+
artifact-name:
36+
description: 'The name of the uploaded artifact of the image tarball'
37+
value: ${{ jobs.build-image.outputs.artifact-name }}
3438

3539
permissions:
3640
id-token: write
@@ -40,6 +44,8 @@ jobs:
4044
build-image:
4145
name: Build Docker Image
4246
runs-on: ubuntu-24.04
47+
outputs:
48+
artifact-name: ${{ steps.calculate-build-context-hash.outputs.image_name_no_slashes }}
4349
steps:
4450
- name: Parse ECR URL
4551
if: ${{ inputs.push-role-name != 'no-push' }}
@@ -59,11 +65,11 @@ jobs:
5965
shell: bash
6066

6167
- name: Checkout code
62-
uses: actions/checkout@v4.2.2
68+
uses: actions/checkout@v5.0.0
6369

6470
- name: OIDC Auth for ECR
6571
if: ${{ inputs.push-role-name != 'no-push' }}
66-
uses: aws-actions/configure-aws-credentials@v4.2.0
72+
uses: aws-actions/configure-aws-credentials@v5.0.0
6773
with:
6874
role-to-assume: arn:aws:iam::${{ steps.parse_ecr_url.outputs.aws_account_id }}:role/${{ inputs.push-role-name }}
6975
aws-region: ${{ steps.parse_ecr_url.outputs.aws_region }}
@@ -114,9 +120,9 @@ jobs:
114120
115121
- name: Set up Docker Buildx
116122
if: ${{ (inputs.save-as-artifact && inputs.push-role-name == 'no-push') || steps.check-if-exists.outputs.status == 'notfound' }}
117-
uses: docker/setup-buildx-action@v3.10.0
123+
uses: docker/setup-buildx-action@v3.11.1
118124
with:
119-
version: v0.22.0
125+
version: v0.27.0
120126

121127
- name: Build Docker Image
122128
if: ${{ (inputs.save-as-artifact && inputs.push-role-name == 'no-push') || steps.check-if-exists.outputs.status == 'notfound' }}

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353

5454
steps:
5555
- name: Checkout code
56-
uses: actions/checkout@v4.2.2
56+
uses: actions/checkout@v5.0.0
5757

5858
- name: Move python script that replaces private package registry information to temp folder so it doesn't get deleted
5959
run: |
@@ -108,7 +108,7 @@ jobs:
108108
timeout-minutes: 30 # this is the amount of time this action will wait to attempt to acquire the mutex lock before failing, e.g. if other jobs are queued up in front of it
109109

110110
- name: Cache Pre-commit hooks
111-
uses: actions/cache@v4.2.3
111+
uses: actions/cache@v4.2.4
112112
env:
113113
cache-name: cache-pre-commit-hooks
114114
with:

.github/workflows/get-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
pr-short-num: ${{ steps.find-pr-num.outputs.number }}
2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v4.2.2
28+
uses: actions/checkout@v5.0.0
2929

3030
- name: Update Devcontainer Hash
3131
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'push' }}

.github/workflows/pre-commit.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,20 @@ jobs:
3232
steps:
3333
- name: Checkout code during push
3434
if: ${{ github.event_name == 'push' }}
35-
uses: actions/checkout@v4.2.2
35+
uses: actions/checkout@v5.0.0
3636
with:
3737
ref: ${{ github.ref_name }} # explicitly get the head of the branch, which will include any new commits pushed if this is a dependabot branch
3838

3939
- name: Checkout code not during push
4040
if: ${{ github.event_name != 'push' }}
41-
uses: actions/checkout@v4.2.2
41+
uses: actions/checkout@v5.0.0
4242

4343
- name: Install latest versions of packages
4444
uses: ./.github/actions/install_deps
4545
with:
4646
python-version: ${{ inputs.python-version }}
4747
node-version: ${{ inputs.node-version }}
48+
skip-installing-ssm-plugin-manager: true
4849

4950
- name: Set up mutex # Github concurrency management is horrible, things get arbitrarily cancelled if queued up. So using mutex until github fixes itself. When multiple jobs are modifying cache at once, weird things can happen. possible issue is https://github.com/actions/toolkit/issues/658
5051
if: ${{ runner.os != 'Windows' }} # we're just gonna have to YOLO on Windows, because this action doesn't support it yet https://github.com/ben-z/gh-action-mutex/issues/14
@@ -54,7 +55,7 @@ jobs:
5455
timeout-minutes: 30 # this is the amount of time this action will wait to attempt to acquire the mutex lock before failing, e.g. if other jobs are queued up in front of it
5556

5657
- name: Cache Pre-commit hooks
57-
uses: actions/cache@v4.2.3
58+
uses: actions/cache@v4.2.4
5859
env:
5960
cache-name: cache-pre-commit-hooks
6061
with:

0 commit comments

Comments
 (0)