Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions .github/workflows/aws-model-watch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Watch AWS models for new operations

# AWS extensions in this catalog are written by hand. Each one has an
# aws-model.yaml next to it naming the AWS Smithy model it follows. Every day
# this compares the operations in that model with the newest release of the
# extension (tooling/common/watch_aws_operations.py). When AWS adds or removes
# an operation, it opens one issue saying which, updates it if the difference
# changes, and closes it once a new release matches the model.
#
# Only operations are compared: AWS changes documentation, enums and request
# fields far more often, and none of that changes what an app can declare.

on:
schedule:
- cron: "17 6 * * *"
workflow_dispatch:
pull_request:
paths:
- "catalog/aws/**"
- "tooling/common/watch_aws_operations.py"
- "tooling/common/test_watch_aws_operations.py"
- ".github/workflows/aws-model-watch.yml"

permissions:
contents: read

concurrency:
group: aws-model-watch-${{ github.event.pull_request.number || 'main' }}
cancel-in-progress: true

jobs:
watch:
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
# Opening, updating and closing the issue; a pull request run only reports.
issues: write
steps:
- name: Check out the extensions
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Check out the AWS models
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: aws/api-models-aws
# checkout only writes inside the workspace; this folder is not part of the extensions tree.
path: api-models-aws
fetch-depth: 0
filter: blob:none
sparse-checkout: models/s3
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12.10"

- name: Install the YAML parser
run: python -m pip install --disable-pip-version-check -r tooling/common/requirements.txt

- name: Test the watcher
run: python -m unittest discover -s tooling/common -p 'test_watch_aws_operations.py'

- name: Compare AWS S3 operations with the extension
id: s3
run: |
python tooling/common/watch_aws_operations.py --config catalog/aws/s3/aws-model.yaml \
--models-root api-models-aws --output "$RUNNER_TEMP/s3.md"
cat "$RUNNER_TEMP/s3.md" >> "$GITHUB_STEP_SUMMARY"

- name: Open, update or close the issue
if: github.event_name != 'pull_request'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
CHANGED: ${{ steps.s3.outputs.changed }}
FINGERPRINT: ${{ steps.s3.outputs.fingerprint }}
TITLE: ${{ steps.s3.outputs.title }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
set -euo pipefail
body="$RUNNER_TEMP/s3.md"
number="$(gh issue list --state open --search "\"$TITLE\" in:title" --json number,title \
--jq "map(select(.title == env.TITLE)) | .[0].number // empty")"
if [[ "$CHANGED" == true ]]; then
if [[ -z "$number" ]]; then
gh issue create --title "$TITLE" --body-file "$body"
elif ! gh issue view "$number" --json body --jq .body | grep -q "$FINGERPRINT"; then
gh issue edit "$number" --body-file "$body"
gh issue comment "$number" --body "AWS changed the model again; the description now shows the current difference ([run]($RUN_URL))."
fi
elif [[ -n "$number" ]]; then
gh issue close "$number" --comment "The newest extension release now lists every AWS operation ([run]($RUN_URL))."
fi
4 changes: 2 additions & 2 deletions .github/workflows/downstream-extension-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
python-version: "3.12"

- name: Install prerequisites
run: python -m pip install --disable-pip-version-check -r tooling/smithy-runtime-conditions/requirements.txt
run: python -m pip install --disable-pip-version-check -r tooling/common/requirements.txt

- name: Report dependents that will be released after merge
run: |
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
python-version: "3.12"

- name: Install prerequisites
run: python -m pip install --disable-pip-version-check -r tooling/smithy-runtime-conditions/requirements.txt
run: python -m pip install --disable-pip-version-check -r tooling/common/requirements.txt

- name: Write the next release of each stale dependent
id: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enforce-kind-namespacing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
python-version: "3.12"

- name: Install prerequisites
run: python -m pip install --disable-pip-version-check -r tooling/smithy-runtime-conditions/requirements.txt
run: python -m pip install --disable-pip-version-check -r tooling/common/requirements.txt

- name: Check kind namespacing
run: python tooling/common/check_kind_namespacing.py
117 changes: 0 additions & 117 deletions .github/workflows/smithy-maintenance.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
python -m pytest -q -p no:cacheprovider catalog/nats/service/tests
python -m pytest -q -p no:cacheprovider catalog/rabbitmq/service/tests
python -m pytest -q -p no:cacheprovider catalog/rc/cql/tests
python -m pytest -q -p no:cacheprovider tooling/smithy-runtime-conditions/tests

orchestrator:
name: Go orchestrator tests
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ edit (see [EXTENSION_RELEASES.md](EXTENSION_RELEASES.md)).
| --- | --- |
| [`catalog/`](catalog/) | Every extension definition, as `<namespace>/<name>/` with immutable releases under `releases/<version>/` |
| [`bindings/`](bindings/) | Generated language declaration packages (Go, Java, Python, TypeScript), written by CI, never by hand |
| [`tooling/`](tooling/) | Maintenance automation: shared checks and helpers (`common/`), binding generation and publication (`extension-bindings/`), the Smithy compiler (`smithy-runtime-conditions/`) |
| [`tooling/`](tooling/) | Maintenance automation: shared checks and helpers (`common/`), binding generation and publication (`extension-bindings/`) |
| [`docs/`](docs/) | How-to guides: Go bindings, local validation |

## Extensions
Expand All @@ -43,7 +43,7 @@ extension; all older releases remain in the tree, immutable:
| CQL Keyspace | `https://runtimeconditions.io/extensions/rc/cql/0.1.0/runtimeconditions.extension.yaml` | [`catalog/rc/cql/`](catalog/rc/cql/) |
| Source Control | `https://runtimeconditions.io/extensions/source-control/0.1.0/runtimeconditions.extension.yaml` | [`catalog/rc/source-control/`](catalog/rc/source-control/) |
| File System | `https://runtimeconditions.io/extensions/rc/file-system/0.2.0/runtimeconditions.extension.yaml` | [`catalog/rc/file-system/`](catalog/rc/file-system/) |
| Amazon S3 | `https://runtimeconditions.io/extensions/aws/s3/0.2.0/runtimeconditions.extension.yaml` | [`catalog/aws/s3/`](catalog/aws/s3/) |
| Amazon S3 | `https://runtimeconditions.io/extensions/aws/s3/0.3.0/runtimeconditions.extension.yaml` | [`catalog/aws/s3/`](catalog/aws/s3/) |
| Amazon SQS | `https://runtimeconditions.io/extensions/aws/sqs/0.2.0/runtimeconditions.extension.yaml` | [`catalog/aws/sqs/`](catalog/aws/sqs/) |
| AWS Secrets Manager | `https://runtimeconditions.io/extensions/aws/secrets-manager/0.1.0/runtimeconditions.extension.yaml` | [`catalog/aws/secrets-manager/`](catalog/aws/secrets-manager/) |
| Kubernetes API | `https://runtimeconditions.io/extensions/kubernetes/api/0.1.0/runtimeconditions.extension.yaml` | [`catalog/kubernetes/api/`](catalog/kubernetes/api/) |
Expand Down
1 change: 0 additions & 1 deletion SERVICE_OPERATIONS_SEMANTIC_BRIDGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ The fallback inventory MUST contain service facts only. It does not contain Runt

Current examples intentionally use different source kinds:

- Amazon S3 references AWS's public Smithy model directly.
- Kubernetes references the authoritative Kubernetes OpenAPI document directly.
- NATS references a Service Operations Inventory because this experiment has not identified an adequate single upstream machine-readable operation model.

Expand Down
Loading
Loading