feat(emr): support per-action arguments in bootstraps_paths (#3191)#3313
Draft
MukundaKatta wants to merge 1 commit into
Draft
feat(emr): support per-action arguments in bootstraps_paths (#3191)#3313MukundaKatta wants to merge 1 commit into
MukundaKatta wants to merge 1 commit into
Conversation
Closes aws#3191. `create_cluster` previously accepted only a list of script paths and dropped EMR's `Args` field on the floor. Extend `bootstraps_paths` to also accept dict entries shaped like the boto3 `ScriptBootstrapAction` (path, args, name) and convert them internally. Plain string paths keep working unchanged. Adds unit tests covering the helper directly plus an end-to-end moto run that asserts `BootstrapActions` reach `run_job_flow` with `Args` intact.
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #3191. Extends
EMR.create_cluster'sbootstraps_pathsto support per-action arguments and a custom name, while preserving the existing string-list shape for backwards compatibility.API
bootstraps_paths=["s3://bucket/init.sh"]bootstraps_paths=[{"path": "s3://bucket/init.sh", "args": ["--flag", "x"], "name": "init"}]Files
awswrangler/emr.py— added_build_bootstrap_actions()helper; rewrote theBootstrapActionsbuild site to use it; widened thebootstraps_pathsannotation; expanded the docstring with both forms.tests/unit/test_emr.py— 7 unit tests for the helper (paths-only, dicts with args, mixed, capitalized boto3 keys, invalid type, missing path, invalid args type) plus 1 end-to-end moto test that creates a cluster and assertsBootstrapActionsarrive atrun_job_flowwithArgspopulated.Test plan
pytest tests/unit/test_emr.py -k "bootstrap or run_job_flow or get_emr").ruff checkandruff formatclean.