-
Notifications
You must be signed in to change notification settings - Fork 195
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
v2 Smoketest codegen #3758
v2 Smoketest codegen #3758
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
add missing copyright header
A new generated diff is ready to view.
A new doc preview is ready to view. |
aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SmokeTestsDecorator.kt
Outdated
Show resolved
Hide resolved
aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SmokeTestsDecorator.kt
Outdated
Show resolved
Hide resolved
update smoketest config flag
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SmokeTestsDecorator.kt
Outdated
Show resolved
Hide resolved
...n/software/amazon/smithy/rust/codegen/client/smithy/generators/OperationUnitTestGenerator.kt
Outdated
Show resolved
Hide resolved
aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SmokeTestsDecorator.kt
Outdated
Show resolved
Hide resolved
aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SmokeTestsDecorator.kt
Outdated
Show resolved
Hide resolved
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! One question about our strategy around making network calls in our CI as opposed to in the canary.
# of the top-level `Cargo.toml` | ||
cargo test --all-features | ||
# Check if the $ENABLE_SMOKETESTS environment variable is set | ||
if [ -n "$ENABLE_SMOKETESTS" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we ever want to run these smoketests in our CI check? My understanding was that we wanted to keep all network calls out of that portion of our testing? This came up when I contributed the wasm crate because I initially put the tests in CI and was asked to move them to the Canary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ref: #3409 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We run these checks in Catapult too IIRC. I wanted to use the same script in both cases, but differ in whether smoketests are enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to an env var ENABLE_SMOKETESTS
, it fails when the script runs in a container
./smithy-rs/tools/ci-scripts/check-aws-sdk-services: line 11: ENABLE_SMOKETESTS: unbound variable
we need to make sure that the script runs fine in our relase pipeline (and compiling smoke tests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove the script change for now so that we can get this merged. We can integrate it in a separate PR
|
||
private fun isSmokeTestSupported(smokeTestCase: SmokeTestCase): Boolean { | ||
AwsSmokeTestModel.getAwsVendorParams(smokeTestCase)?.orNull()?.let { vendorParams -> | ||
if (vendorParams.sigv4aRegionSet.isPresent) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Why can't we support sigv4a tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have a way to configure region sets right now unless you manually sign a request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, I can't find any service using it: https://github.com/search?q=repo%3Aaws%2Faws-models%20sigv4aRegionSet&type=code
aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SmokeTestsDecorator.kt
Show resolved
Hide resolved
A new generated diff is ready to view.
A new doc preview is ready to view. |
## Motivation and Context This PR restores [an environment variable](https://github.com/smithy-lang/smithy-rs/pull/3758/files/62ff67ed89b1d920540b03a252a69bf50a1d1081#diff-903f493806a39cd49c26728eee0410545eb911162b1d889dd7154eae81b7c7c7) we attempted to add in #3758. ## Description We removed that environment variable since we ran into an error `ENABLE_SMOKETESTS: unbound variable` in our release pipeline. This PR will have a default value `false` when `ENABLE_SMOKETESTS` is not present. We expect the value to be `false` in smithy-rs CI and `true` in our release pipeline (can set it to `true` in our release pipeline asynchronously). ## Testing - Existing tests in CI ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
This PR adds codegen for service-defined smoketests.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.