Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Add support for Amazon EKS #156

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

Merged
ca-nguyen merged 8 commits into aws:main from ca-nguyen:add-support-for-eks
Sep 2, 2021
Merged

Conversation

Copy link
Contributor

@ca-nguyen ca-nguyen commented Aug 17, 2021
edited
Loading

Issue #, if available: #106

Description of changes:
Added:

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
Contributor

@shivlaks shivlaks 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 adding these!! looks great for a first cut.
had some minor nits I think we should address. take a look and let me know if you have any questions!

output_path (str, optional): Path applied to the state’s output after the application of `result_path`, producing the effective output which serves as the raw input for the next state. (default: '$')
wait_for_completion (bool, optional): Boolean value set to `True` if the Task state should wait to complete before proceeding to the next step in the workflow. (default: True)
"""
if wait_for_completion:
Copy link
Contributor

Choose a reason for hiding this comment

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

question: with defaults, I know we're being consistent by setting the default to be synchronous, but I wonder if that's the most pragmatic/idiomatic thing.

not asking for changes, just pondering out loud for now

Copy link
Contributor Author

@ca-nguyen ca-nguyen Aug 17, 2021

Choose a reason for hiding this comment

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

Good question - you're right this was done this way for consistency.

A point to consider: If we were to change the defaults, we would need to notify of the change of behaviour as this might cause breaking change for our customers. Not sure if this is worth bumping the version

Copy link
Contributor

Choose a reason for hiding this comment

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

we haven't set defaults for these steps yet as they're unreleased, so now is the time to make that decision. depending on API/service, I think it'd be sensible to consider alternatives...

somewhat related: I'm quickly writing up the StepFunctions startExecution integration step... and that supports all 3 (wait for completion, wait for task token, request/response)... what would be a sensible default there? all the other service integrations only offer 2 options.

I think this is fine to leave it as is for now for Eks - if we were to change defaults, it would need to go with the next major version bump.

Copy link
Contributor Author

@ca-nguyen ca-nguyen Aug 18, 2021

Choose a reason for hiding this comment

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

My last comment, might not have been clear, but we are on the same page! :)
Let's keep the defaults as is to be consistent with the other released steps for now

Copy link
Contributor

Choose a reason for hiding this comment

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

I expect wait_for_completion=True is what most customers usually want. Since all other steps supporting .sync use it by default, we should probably be consistent so there are less surprises.

Copy link
Contributor

@shivlaks shivlaks left a comment
edited
Loading

Choose a reason for hiding this comment

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

go for it - please be sure to update the PR description to include runJob and call APIs that were added in the most recent commit.

Copy link
Contributor Author

go for it - please be sure to update the PR description to include runJob and call APIs that were added in the most recent commit.

Done! Thank you!

Copy link
Contributor

@wong-a wong-a left a comment

Choose a reason for hiding this comment

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

LGTM besides some minor updates to the docs.

I see there are unit tests, but did you do any manual testing to ensure each step can be created with Step Functions through the SDK?

output_path (str, optional): Path applied to the state’s output after the application of `result_path`, producing the effective output which serves as the raw input for the next state. (default: '$')
wait_for_completion (bool, optional): Boolean value set to `True` if the Task state should wait to complete before proceeding to the next step in the workflow. (default: True)
"""
if wait_for_completion:
Copy link
Contributor

Choose a reason for hiding this comment

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

I expect wait_for_completion=True is what most customers usually want. Since all other steps supporting .sync use it by default, we should probably be consistent so there are less surprises.

Update documentation
Co-authored-by: Adam Wong <55506708+wong-a@users.noreply.github.com>
wong-a
wong-a previously approved these changes Aug 25, 2021
Copy link
Contributor

@wong-a wong-a left a comment

Choose a reason for hiding this comment

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

☸️

Copy link
Contributor Author

LGTM besides some minor updates to the docs.

Thanks for reviewing! I applied your suggested changes

I see there are unit tests, but did you do any manual testing to ensure each step can be created with Step Functions through the SDK?

I did not do any testing outside of unit tests. I'll make sure to manual test before merging

@ca-nguyen ca-nguyen dismissed stale reviews from shivlaks and wong-a via 9a670ef September 1, 2021 07:54
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-sEHrOdk7acJc
  • Commit ID: 1cef855
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor Author

I see there are unit tests, but did you do any manual testing to ensure each step can be created with Step Functions through the SDK?

Tested manually and uncovered a few bugs:

  • eks::call does not have option to run a job (.sync)
  • removed LogOptions param from eks::runJob example as it does not allow to retrieve of logs (only possible with eks::runJob.sync)
    Made the changes in the last commits

Copy link
Contributor

shivlaks commented Sep 1, 2021

I see there are unit tests, but did you do any manual testing to ensure each step can be created with Step Functions through the SDK?

Tested manually and uncovered a few bugs:

  • eks::call does not have option to run a job (.sync)
  • removed LogOptions param from eks::runJob example as it does not allow to retrieve of logs (only possible with eks::runJob.sync)
    Made the changes in the last commits

glad we caught those. be sure to expand on testing methodology and the steps we followed.

not for this PR:

thought: how can we automate that testing (via unit/simple integ tests). It will be helpful to establish so that we responsibly introduce service integrations. More importantly, regressions are easy to introduce if we don't have automated tests in place.

"""
if wait_for_completion:
Copy link
Contributor

Choose a reason for hiding this comment

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

Glad we caught this. The public documentation isn't really clear about which service integrations support .sync.

https://docs.aws.amazon.com/step-functions/latest/dg/connect-supported-services.html
https://docs.aws.amazon.com/step-functions/latest/dg/connect-eks.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
2 more reviewers

@shivlaks shivlaks shivlaks approved these changes

@wong-a wong-a wong-a approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /