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.
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
feat(stepfunctions-tasks): add EKS call to SFN-tasks #12779
feat(stepfunctions-tasks): add EKS call to SFN-tasks #12779
Changes from 6 commits
ea41033
d6d55e5
fb639aa
b831188
26150b4
db84626
6f545ed
5796a70
1130675
af0dee4
b5556e9
453bd85
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nit: would be helpful to include doc links and or purpose of query parameters. the current doc strings don't add much information from the parameter names
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.
Query parameters would look something like this: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#-strong-write-operations-cronjob-v1beta1-batch-strong- I'm not sure if it would be helpful to include an example such as this
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.
gotcha, I agree. maybe using it in the readme example would be helpful for users though.
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.
this does not support paths: i.e. how could you supply
$.blah
please change the type to
sfn.TaskInput
and also add a test for it.the same applies to any parameters that support state input json path.
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.
Changed to sfn.TaskInput and added more coverage tests
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.
probably worth a comment why task policies are not being set in this integration
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.
Added a comment in latest commit.
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.
Are these parameters required for successfully making the call? Note that if
ICluster
is imported, these properties might not be defined, and will throw an exception.I would extract these and do:
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.
Thanks for the feedback, I'll add validation for ClusterName, ClusterEndpoint and clusterCertificateAuthorityData, as well as coverage tests for these cases
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.
With some testing I think the error thrown from the eks module has the valid context in our case.
for eks:call I'm extracting
clusterName
,clusterEndpoint
, andclusterCertificateAuthorityData
from ICluster, for example if clusterEndpoint is not defined, it will throw exception with message"clusterEndpoint" is not defined for this imported cluster
, which is sufficient to show the context of the error.All three are required to make the call, I'll just add coverage test to reflect this case
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.
@shivlaks Do you think
"clusterEndpoint" is not defined for this imported cluster
is sufficient or more details needs to be added such asCluster Endpoint is not defined for this imported cluster, this field is required for eks:call task.
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.
@NovakGu that seems sensible. let's keep it simple. I generally like the format of
<validation error><remediation (if any)>
i.e.
The
clusterEndpoint
property must be specified when using an imported Cluster.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.
@shivlaks @iliapolo
Added validation for
clusterEndpoint
andclusterCertificateAuthorityData
.clusterName
is required when import a cluster or creating a new cluster so I'm not double checking it here.After changes
The "clusterEndpoint" property must be specified when using an imported Cluster.
The "clusterCertificateAuthorityData" property must be specified when using an imported Cluster.
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.
should the type of
requestBody
besfn.TaskInput
? it's currently not configured in that way.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.
Yes, that's a good point. Changed the
requestBody
to besfn.TaskInput