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

Fix runtime crate versions #3260

Merged
merged 4 commits into from
Nov 29, 2023
Merged

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Nov 27, 2023

Motivation and Context

When the stable/unstable crate versions were split, this caused a regression in determining the crate version during codegen. This enhances our crate-version forwarding code to publish all the crate versions. For impact, see codegen-client-test.

Description

  • Change the build artifact to be a JSON blob will all required versions.

Testing

  • Audit diff

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rcoh rcoh requested review from a team as code owners November 27, 2023 22:34
@rcoh rcoh changed the base branch from main to smithy-rs-release-1.x.y November 27, 2023 22:34
@rcoh rcoh force-pushed the fix-runtime-crate-versions branch from 843ec3c to abf10cb Compare November 28, 2023 01:00
Copy link

@rcoh rcoh force-pushed the fix-runtime-crate-versions branch from abf10cb to d088269 Compare November 28, 2023 02:50
Copy link

@rcoh rcoh force-pushed the fix-runtime-crate-versions branch from d088269 to 613a588 Compare November 28, 2023 14:19
Copy link

@rcoh rcoh force-pushed the fix-runtime-crate-versions branch from 613a588 to 487fe23 Compare November 28, 2023 15:00
Copy link

@rcoh rcoh force-pushed the fix-runtime-crate-versions branch from 487fe23 to 3c90065 Compare November 28, 2023 16:24
Copy link

@rcoh rcoh force-pushed the fix-runtime-crate-versions branch from 3c90065 to 6d4b6b9 Compare November 28, 2023 18:00
Copy link

Copy link

@@ -33,6 +33,21 @@ async fn virtual_hosted_buckets() {
);
}

#[tokio::test]
async fn no_path_rewriting() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unrelated to the rest of the PR?

@@ -476,6 +476,7 @@ class ServiceConfigGenerator(
docs("Apply test defaults to the builder")
rustBlock("pub fn apply_test_defaults(&mut self) -> &mut Self") {
customizations.forEach { it.section(ServiceConfig.DefaultForTests("self"))(this) }
rustTemplate("self.behavior_version = Some(crate::config::BehaviorVersion::latest());")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should use #{Some} for collision avoidance.

@@ -52,19 +52,49 @@ fun gitCommitHash(): String {
}
}

fun kv(key: String, value: String) = """"$key": "$value""""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: put this inside of the block so it is scoped to it

version.append(kv("stableVersion", stableCrateVersion)).append(",")
version.append(kv("unstableVersion", unstableCrateVersion)).append(",")
// hack for internal build
val smithyStableCrates = listOf(
Copy link
Collaborator

Choose a reason for hiding this comment

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

At what point do we put this metadata in the runtime crate Cargo.tomls and resolve it automatically?

Copy link

@rcoh rcoh enabled auto-merge (squash) November 29, 2023 14:24
rcoh added 4 commits November 29, 2023 09:24
When the stable/unstable crate versions were split, this caused a regression in determining the crate version during codegen. This enhances our crate-version forwarding code to publish all the crate versions. For impact, see codegen-client-test.
@rcoh rcoh force-pushed the fix-runtime-crate-versions branch from 53de7e5 to 74cf401 Compare November 29, 2023 14:24
Copy link

@rcoh rcoh merged commit edab8cf into smithy-rs-release-1.x.y Nov 29, 2023
41 checks passed
@rcoh rcoh deleted the fix-runtime-crate-versions branch November 29, 2023 15:01
Copy link
Contributor

@ysaito1001 ysaito1001 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix.

ysaito1001 pushed a commit that referenced this pull request Dec 1, 2023
## Motivation and Context
When the stable/unstable crate versions were split, this caused a
regression in determining the crate version during codegen. This
enhances our crate-version forwarding code to publish all the crate
versions. For impact, see codegen-client-test.

## Description
- Change the build artifact to be a JSON blob will all required
versions.

## Testing
- [ ] Audit diff

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
rcoh added a commit that referenced this pull request Dec 1, 2023
## Motivation and Context
When the stable/unstable crate versions were split, this caused a
regression in determining the crate version during codegen. This
enhances our crate-version forwarding code to publish all the crate
versions. For impact, see codegen-client-test.

## Description
- Change the build artifact to be a JSON blob will all required
versions.

## Testing
- [ ] Audit diff

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_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