Run canary as part of CI (#3525)
## Motivation and Context CI now runs [canary](https://github.com/smithy-lang/smithy-rs/tree/main/tools/ci-cdk/canary-lambda/src/latest) on pull requests. ## Description Historically, canary has been running only during releases and daily in the [aws-sdk-rust](https://github.com/awslabs/aws-sdk-rust/actions/workflows/canary.yaml) repository. This presents a problem of action at a distance where a potential bug that may hurt canary won't immediately be caught when a PR is merged to `main` in `smithy-rs` (such as code under code under `#[cfg(debug_assertions)]` was not used during canary's lambda execution and the definition of an item only used under that resulted in unused warning). This PR will address that problem. PRs from forked repositories cannot run the `Canary` job (it will be skipped). A maintainer can run it on their behalf within `smithy-lang:smithy-rs` using a newly added [manual workflow](https://github.com/smithy-lang/smithy-rs/pull/3525/files#diff-1b1b5b27850107cb97519c98de99d35a49b90277ccb52201b842e9b81feb5d47). After we merge this to main, we will update the branch protection so that the `Canary` job is required for merge, in addition to ` Matrix Success ` (this will not affect PRs from forked repositories since the `Canary` job will be skipped a skipped job will [report its status as Success](https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution), but a manual canary run should pass). ## Testing - Verified a PR in `smithy-lang:smithy-rs` ran the canary ([passed](https://github.com/smithy-lang/smithy-rs/actions/runs/8473703578/job/23219021189?pr=3525)). - Verified a PR in a `smithy-rs` fork cannot run the canary and [indicated that a maintainer needs to run it manually](https://github.com/smithy-lang/smithy-rs/actions/runs/8473799146/job/23218944122?pr=3528) - Verified a maintainer can manually invoke the canary using a PR from a fork ([passed](https://github.com/smithy-lang/smithy-rs/actions/runs/8474050953)) - Verified internal release pipeline passed with [the changes to canary-runner](https://github.com/smithy-lang/smithy-rs/pull/3525/files#diff-cc953ba68fec8cf937e1aa70181a901150fc5f1a74bf6ca1075d522c63d1eb6f) ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Loading
Please register or sign in to comment