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

StepFunctions: Multi-accounts compatibility #9119

Merged
merged 20 commits into from Oct 6, 2023

Conversation

viren-nadkarni
Copy link
Member

@viren-nadkarni viren-nadkarni commented Sep 12, 2023

Motivation

This PR introduces multi-account support to the legacy StepFunctions provider. It also makes multi-account friendly fixes to the work-in-progress StepFunctions v2 provider.

cc: @MEPalma

Implementation

The legacy provider uses StepFunctions Local which itself does not support namespacing. So we take an approach similar to Kinesis. Each account+region combo will run its own instance of SFLocal. Of course this is not optimal but should fulfill simple usecases.

However, SFLocal does not respect the --account-id argument and overwrites ARNs like Lambda Functions during invocations. So I guess the way forward is to only support true multi-accounts in the new SF provider and keep this limitation in the legacy one. The multi-region parameter is maintained.

Criteria for merging: all stepfunctions tests (legacy as well as the ci/circleci: itest-sfn-v2-provider job) pass when AWS_ACCESS_KEY_ID is set to a non-default account ID or when AWS_REGION_NAME is set to non-us-east-1 region.

79ec46e must be reverted before merge

Related

Closes #8205

@viren-nadkarni viren-nadkarni self-assigned this Sep 12, 2023
@viren-nadkarni viren-nadkarni added the semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases label Sep 12, 2023
@viren-nadkarni viren-nadkarni marked this pull request as ready for review September 14, 2023 10:24
Copy link
Contributor

@MEPalma MEPalma left a comment

Choose a reason for hiding this comment

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

Thank you for the changes! I would like the separation between building the evaluation tree and evaluating runtime values to remain consistent. We achieve this with Component and EvalComponent classes. Adding these runtime values to the environment is valid, but not in the preprocessor. Also a question about parameter validation of the new clients.

@viren-nadkarni viren-nadkarni added this to the 3.0 milestone Sep 18, 2023
Copy link
Contributor

@MEPalma MEPalma left a comment

Choose a reason for hiding this comment

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

Resources are now evaluation components for ResourceRuntimePart which includes the region and account. This means that the request's account and region are used if none is declared in the resource Arn. All other staticResource properties are still accessible from the declaration objects themselves.

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

LocalStack Community integration with Pro

       2 files         2 suites   1h 16m 23s ⏱️
2 243 tests 1 741 ✔️ 502 💤 0
2 244 runs  1 741 ✔️ 503 💤 0

Results for commit 670df14.

♻️ This comment has been updated with latest results.

@coveralls
Copy link

Coverage Status

coverage: 83.034% (+0.1%) from 82.939% when pulling 670df14 on stepfunctions-multi-accounts into 0aea7e2 on master.

@MEPalma MEPalma merged commit e7ddddd into master Oct 6, 2023
26 checks passed
@MEPalma MEPalma deleted the stepfunctions-multi-accounts branch October 6, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Stepfunctions creates resources in the fallback account
3 participants