-
Notifications
You must be signed in to change notification settings - Fork 190
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
Source sdk-partitions from the models instead of hardcoding #3292
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
/** Path to the `default-partitions.json` configuration */ | ||
val partitionsConfigPath: Path? | ||
get() = | ||
awsSdk?.getStringMember("partitionsConfigPath")?.orNull()?.value?.let { Paths.get(it) } | ||
|
||
val productionSdkBuild: Boolean |
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.
As this is being set to true in non-production builds, perhaps we should call it, "requirePartitionsJson"?
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 guess "production" isn't the right word. I really mean "we're generating an AWS SDK" — I think we may want this in other places, e.g. we can remove the requirement for endpoint rules based on this flag instead of requiring customers to manually set the codegen flag.
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 think we were using "generateReadme" for that purpose previously.
7b62443
to
c704d15
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
d4db2be
to
372c563
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
51a3e83
to
7ddc914
Compare
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/SdkSettings.kt
Show resolved
Hide resolved
aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/TestUtil.kt
Outdated
Show resolved
Hide resolved
1. Update `sync-models` to sync from aws-sdk-rust. This location includes `sdk-partitions.json` 2. Update aws:sdk gradle file to properly set this variable in codegen./ 3. Add an additional safeguard to ensure that the default hardcoded version is only used in tests and adhoc SDK generation.
Unify codegen flags behind a single "awsSdkBuild" flag. This is a singular flag to toggle "AWS mode" on and off. This also updates the sdk-codegen integration tests to be use this build mode to more closely reflect actual generated SDKs.
0358783
to
d4771a6
Compare
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. |
merged as bot because server changes are whitespace only |
Motivation and Context
Fixes #2836
This is required to gain access to hew partitions.
Description
sync-models
to sync from aws-sdk-rust. This location includessdk-partitions.json
Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.