Skip to content
Open
13 changes: 13 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,16 @@
/.github/CODEOWNERS @aws/aws-lambda-durable-functions-js-maintain
/.github/prompts/ @aws/aws-lambda-durable-functions-js-maintain
/packages/aws-durable-execution-sdk-js/src/context/execution-context/execution-context.ts @aws/aws-lambda-durable-functions-js-maintain

# The release path. These files decide what CI runs, which dependencies the
# packages install, and what gets published to npm.
/.github/workflows/ @aws/aws-lambda-durable-functions-js-maintain
/.github/actions/ @aws/aws-lambda-durable-functions-js-maintain
/.github/dependabot.yml @aws/aws-lambda-durable-functions-js-maintain
/package.json @aws/aws-lambda-durable-functions-js-maintain
/package-lock.json @aws/aws-lambda-durable-functions-js-maintain
/packages/*/package.json @aws/aws-lambda-durable-functions-js-maintain
/rollup.config.js @aws/aws-lambda-durable-functions-js-maintain
Comment thread
ParidelPooya marked this conversation as resolved.
Resolved
/packages/*/rollup.config.mjs @aws/aws-lambda-durable-functions-js-maintain
/packages/*/tsconfig.build.json @aws/aws-lambda-durable-functions-js-maintain
/packages/*/esbuild.mjs @aws/aws-lambda-durable-functions-js-maintain
4 changes: 2 additions & 2 deletions .github/actions/npm-ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ runs:
run: echo "version=$(node --version)" >> "$GITHUB_OUTPUT"
- name: Restore node_modules
id: cache
uses: actions/cache@v6.1.0
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Comment thread
ParidelPooya marked this conversation as resolved.
Resolved
with:
path: |
node_modules
packages/*/node_modules
key: node-modules-${{ runner.os }}-${{ runner.arch }}-${{ steps.node.outputs.version }}-${{ hashFiles('package-lock.json') }}
- name: Restore the npm download cache
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache@v6.1.0
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.npm
key: npm-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package-lock.json') }}
Expand Down
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
# "/" covers .github/workflows. The composite action needs its own entry,
# or Dependabot never updates its SHA pins.
directories:
- "/"
- "/.github/actions/*"
schedule:
interval: "weekly"
day: "monday"
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
# and by the reusable workflows this one calls.
runs-on: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-latest' || format('codebuild-github-actions-runner-{0}-{1}', github.run_id, github.run_attempt) }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js 22.x
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22.x
- name: Check PR title
Expand All @@ -67,17 +67,17 @@ jobs:
# still gets real test results in the same run.
runs-on: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-latest' || format('codebuild-github-actions-runner-{0}-{1}', github.run_id, github.run_attempt) }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js 22.x
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22.x
- name: Install dependencies
uses: ./.github/actions/npm-ci
- name: Build project
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: built-artifacts
path: |
Expand All @@ -90,9 +90,9 @@ jobs:
verify-declared-files:
runs-on: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-latest' || format('codebuild-github-actions-runner-{0}-{1}', github.run_id, github.run_attempt) }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js 22.x
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22.x
- name: Install dependencies
Expand Down Expand Up @@ -121,9 +121,9 @@ jobs:
telemetry-hosts:
runs-on: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-latest' || format('codebuild-github-actions-runner-{0}-{1}', github.run_id, github.run_attempt) }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js 22.x
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22.x
cache: "npm"
Expand Down Expand Up @@ -166,9 +166,9 @@ jobs:
eslint: ["8", "9"]
name: eslint-plugin-compat (ESLint ${{ matrix.eslint }})
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js 22.x
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22.x
cache: "npm"
Expand Down Expand Up @@ -238,14 +238,14 @@ jobs:
pull-requests: write # Required to comment on slow tests
runs-on: ${{ format('codebuild-github-actions-runner-{0}-{1}', github.run_id, github.run_attempt) }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
sparse-checkout: .github/workflows/scripts/integration-test
- uses: actions/setup-node@v7.1.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22.x
- name: Download test timings
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: integration-test-timings-*
path: timings
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
echo "✅ External PR - Integration tests skipped for security"
echo "Maintainer: Add 'safe-to-merge' label and use squash & merge"
- name: Check for bypass label
uses: actions/github-script@v9
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
// Fetch current labels via API (event payload has stale data)
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/capacity-provider-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ jobs:
id-token: write # Required for AWS credentials
runs-on: codebuild-github-actions-runner-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup Node.js
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ inputs.node-version }}

- name: Get AWS Credentials
id: credentials
if: github.actor != 'nektos/act'
uses: aws-actions/configure-aws-credentials@v6
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
with:
role-to-assume: "${{ secrets.TEST_ROLE_ARN }}"
role-session-name: githubIntegrationTest
aws-region: ${{ vars.AWS_REGION }}

- name: Download build artifacts
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: built-artifacts
path: .
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/conformance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
outputs:
suites: ${{ steps.discover.outputs.suites }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Discover suites from templates
id: discover
Expand Down Expand Up @@ -75,10 +75,10 @@ jobs:
run:
working-directory: packages/aws-durable-execution-sdk-js-conformance-tests
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup Node.js
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: "22.x"
cache: "npm"
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
run: uv pip install "git+https://github.com/aws/aws-durable-execution-conformance-tests.git@main#subdirectory=packages/aws-durable-execution-conformance-tests"

- name: Get AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
with:
# SAM-capable deploy role (has CloudFormation/S3/IAM), same role the
# SAM-based integration tests assume. NOT ACTIONS_INTEGRATION_ROLE_NAME
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:

- name: Upload conformance report
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: conformance-report-${{ matrix.suite }}
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integration-stack-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ jobs:
pull-requests: read # Required to check which pull requests are closed
runs-on: codebuild-github-actions-runner-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
sparse-checkout: .github/workflows/scripts/integration-test

- name: Setup Node.js
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24.x

- name: Get AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
with:
role-to-assume: "${{ secrets.TEST_ROLE_ARN }}"
role-session-name: githubIntegrationStackCleanup
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,31 @@ jobs:
id-token: write # Required for AWS credentials
runs-on: codebuild-github-actions-runner-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup Node.js
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ inputs.node-version }}

- name: Get AWS Credentials
id: credentials
if: github.actor != 'nektos/act'
uses: aws-actions/configure-aws-credentials@v6
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
with:
role-to-assume: "${{ secrets.TEST_ROLE_ARN }}"
role-session-name: githubIntegrationTest
aws-region: ${{ vars.AWS_REGION }}

- name: Setup SAM CLI
uses: aws-actions/setup-sam@v3
uses: aws-actions/setup-sam@341eee193f458fa5aae5d52c94b0c5cf3a1c5a52 # v3
with:
# Native installer instead of pip: pip built a venv and resolved ~60 packages
# on every run (~39s). The installer is one verified zip, cached across runs.
use-installer: true

- name: Download build artifacts
uses: actions/download-artifact@v8
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: built-artifacts
path: .
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
# Later runs compare with this, and the PR comment job reads it.
- name: Upload test timings
if: always() && hashFiles('integration-timings.json') != ''
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: integration-test-timings-${{ inputs.node-version }}
path: integration-timings.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
lint:
runs-on: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-latest' || format('codebuild-github-actions-runner-{0}-{1}', github.run_id, github.run_attempt) }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# The async-safety step below uses `biome lint --changed`, which diffs
# against the base branch and therefore needs real history. This also
Expand All @@ -40,7 +40,7 @@ jobs:
# benefit.
fetch-depth: 0
- name: Use Node.js 22.x
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22.x
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/llrt-container-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ jobs:
contents: read
id-token: write # Required for AWS credentials
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup Node.js
uses: actions/setup-node@v7.1.0
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ inputs.node-version || '22.x' }}
cache: "npm"

- name: Get AWS Credentials
if: github.actor != 'nektos/act'
uses: aws-actions/configure-aws-credentials@v6
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
with:
role-to-assume: "${{ secrets.TEST_ROLE_ARN }}"
role-session-name: githubLlrtContainerTest
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
name: npm publish

permissions:
id-token: write # Required for OIDC
contents: read
on:
release:
Expand All @@ -21,6 +20,13 @@ env:
jobs:
npm-publish:
runs-on: ubuntu-latest
# A repository admin sets the required reviewers of this environment. The
# job then waits for one of them to approve before it can publish. The
# reviewer checks that the release tag is on main or v1.x.
environment: npm-publish
Comment on lines +25 to +26

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Codex AI review · Finding arf_v1_rerhdxtlmexlh4u6f5vudgkosl

[P1] Bind the approved release to the checkout commit. The new gate asks reviewers to check the release tag, but checkout still receives the unqualified github.event.release.tag_name. The pinned checkout's getCheckoutInfo prefers a matching branch over a tag. If someone creates a branch with the release tag's name, the tag can remain immutable and on main while this approved job builds and publishes the branch's code with id-token: write. Set checkout's ref to ${{ github.sha }} and have the reviewer verify that same commit, so approval and publishing use identical source. Include regression coverage for a branch/tag name collision.

To suppress repeats, reply /ai verdict deferred, /ai verdict false-positive, or /ai verdict out-of-scope on the first nonblank line. Add rationale on later lines. A new /ai verdict accepted allows future repeats again.

permissions:
id-token: write # Required for OIDC
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -29,9 +35,18 @@ jobs:
with:
node-version: 24
registry-url: https://registry.npmjs.org/
- run: npm ci
# Skip the install scripts of dependencies. This job can publish to npm, so
# it must not run third-party code that the build does not need. The
# build and the tests pass without those scripts.
- run: npm ci --ignore-scripts
- run: npm run build
- run: npm run test
# The same package checks that run on every pull request. They catch a
# tarball that misses a declared file or has wrong type resolution.
- name: Verify every package ships the files its package.json declares
run: node .github/workflows/scripts/test-publish/verify-declared-files-shipped.mjs
- name: Check the core package with attw and publint
Comment thread
ParidelPooya marked this conversation as resolved.
Resolved
run: npm run check:package -w packages/aws-durable-execution-sdk-js
- name: Make script executable
run: chmod +x ./.github/workflows/iterate-publish-npm.sh
- name: iterate and publish
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/otel-conformance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
actions: write
contents: read
id-token: write
# This reusable workflow stays on main, not a SHA. It loads the conformance
# tests from conformance_test_ref, which also defaults to main. A SHA pin
# here would run an old orchestrator against new tests. The workflow is in
# the aws org and owned by the same team.
uses: aws/aws-durable-execution-conformance-tests/.github/workflows/opentelemetry-orchestrator.yml@main
with:
runs_on: codebuild-github-actions-runner-${{ github.run_id }}-${{ github.run_attempt }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@v4.39.1
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
sarif_file: results.sarif
Loading
Loading