Skip to content
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

Merged
merged 11 commits into from
Jul 30, 2024
Merged

v2 Smoketest codegen #3758

merged 11 commits into from
Jul 30, 2024

Conversation

Velfi
Copy link
Contributor

@Velfi Velfi commented Jul 12, 2024

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.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

add missing copyright header
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@Velfi Velfi marked this pull request as ready for review July 15, 2024 19:13
@Velfi Velfi requested review from a team as code owners July 15, 2024 19:13
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link
Contributor

@landonxjames landonxjames left a 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
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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.

Copy link
Contributor

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)

Copy link
Contributor Author

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) {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@Velfi Velfi added this pull request to the merge queue Jul 30, 2024
Merged via the queue into main with commit 507ebe8 Jul 30, 2024
44 checks passed
@Velfi Velfi deleted the zhessler-smoke-tests-v2 branch July 30, 2024 16:33
github-merge-queue bot pushed a commit that referenced this pull request Aug 23, 2024
## 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._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants