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

feat(stepfunctions-tasks): enable resultReuseConfiguration in AthenaStartQueryExecution #30447

Merged
merged 16 commits into from
Jul 8, 2024

Conversation

mazyu36
Copy link
Contributor

@mazyu36 mazyu36 commented Jun 4, 2024

Issue # (if applicable)

Closes #30446.

Reason for this change

To use "reuse result" feature in Amazon Athena on Step Functions.

Description of changes

Add resultReuseConfiguration to the AthenaStartQueryExecution

Description of how you validated changes

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added feature-request A feature should be added or improved. p2 labels Jun 4, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team June 4, 2024 16:52
@github-actions github-actions bot added the admired-contributor [Pilot] contributed between 13-24 PRs to the CDK label Jun 4, 2024
@mazyu36 mazyu36 force-pushed the sfn-athena-start-query-reuse branch from 22c31b7 to d1f2a19 Compare June 4, 2024 17:29
@mazyu36 mazyu36 force-pushed the sfn-athena-start-query-reuse branch from d1f2a19 to 57348a6 Compare June 4, 2024 17:39
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 4, 2024
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks 👍
Left a comment for an initial adjustment on the interface.
Let me know if you have any feedback.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 4, 2024
@mazyu36
Copy link
Contributor Author

mazyu36 commented Jun 5, 2024

@lpizzinidev
Thank you.
I think your suggestion is smarter, so I made revisions including unit tests and integration tests.

Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks 👍 Left comments for some final minor adjustments

mazyu36 and others added 3 commits June 6, 2024 08:55
…query-execution.ts

Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
@mazyu36
Copy link
Contributor Author

mazyu36 commented Jun 6, 2024

@lpizzinidev
Thanks. I have revised again.

Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks 👍 Sorry for suggesting a syntactically wrong error message 🙂

if (resultReuseConfigurationMaxAge === undefined || cdk.Token.isUnresolved(resultReuseConfigurationMaxAge)) return;
const maxAgeInMillis = resultReuseConfigurationMaxAge.toMilliseconds();
if (maxAgeInMillis > 0 && maxAgeInMillis < cdk.Duration.minutes(1).toMilliseconds()) {
throw new Error(`resultReuseConfigurationMaxAge must be between greater than or equal to 1 minute or 0, got ${maxAgeInMillis} ms`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
throw new Error(`resultReuseConfigurationMaxAge must be between greater than or equal to 1 minute or 0, got ${maxAgeInMillis} ms`);
throw new Error(`resultReuseConfigurationMaxAge must be greater than or equal to 1 minute or 0, got ${maxAgeInMillis} ms`);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I fixed it.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jun 6, 2024
Copy link
Contributor

@paulhcsun paulhcsun left a comment

Choose a reason for hiding this comment

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

Changes look good to me, just a couple of wording changes for the error messages!

mazyu36 and others added 3 commits July 4, 2024 21:32
…query-execution.ts

Co-authored-by: paulhcsun <47882901+paulhcsun@users.noreply.github.com>
…query-execution.ts

Co-authored-by: paulhcsun <47882901+paulhcsun@users.noreply.github.com>
@mazyu36
Copy link
Contributor Author

mazyu36 commented Jul 4, 2024

@paulhcsun
Thank you for the review.
I've changed error messages and unit tests.

@paulhcsun paulhcsun added the pr/do-not-merge This PR should not be merged at this time. label Jul 4, 2024
paulhcsun
paulhcsun previously approved these changes Jul 4, 2024
Copy link
Contributor

@paulhcsun paulhcsun 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 your contribution @mazyu36! I've approved the PR but added a do-not-merge label as we're currently holding off on merging anything while fixing a custom resources related issue which touches a lot of integ tests. As with your other PR, this change probably would not affect that but we're pausing all merges temporarily to be safe. We should hopefully be able to get this merged in tomorrow if not sometime next week. Thanks for your patience and understanding! 🙏

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 4, 2024
@Leo10Gama Leo10Gama removed the pr/do-not-merge This PR should not be merged at this time. label Jul 5, 2024
Copy link
Contributor

mergify bot commented Jul 5, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mazyu36
Copy link
Contributor Author

mazyu36 commented Jul 5, 2024

@Mergifyio update

Copy link
Contributor

mergify bot commented Jul 5, 2024

update

✅ Branch has been successfully updated

Copy link
Contributor

mergify bot commented Jul 6, 2024

update

✅ Branch has been successfully updated

@mergify mergify bot dismissed paulhcsun’s stale review July 6, 2024 05:32

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 6, 2024
@mazyu36
Copy link
Contributor Author

mazyu36 commented Jul 6, 2024

@paulhcsun
Thank you for approve.
But integ test failed because of #30108, so I’ve updated.
Could you please approve again?

@mazyu36 mazyu36 requested a review from paulhcsun July 6, 2024 06:58
Copy link
Contributor

mergify bot commented Jul 8, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 8, 2024
Copy link
Contributor

mergify bot commented Jul 8, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 9da4d83
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit 046bf56 into aws:main Jul 8, 2024
9 checks passed
Copy link
Contributor

mergify bot commented Jul 8, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mazyu36 mazyu36 deleted the sfn-athena-start-query-reuse branch July 9, 2024 01:12
GavinZZ pushed a commit that referenced this pull request Jul 10, 2024
…tartQueryExecution (#30447)

### Issue # (if applicable)

Closes #30446.

### Reason for this change
To use  "reuse result" feature in Amazon Athena on Step Functions.



### Description of changes
Add `resultReuseConfiguration` to the `AthenaStartQueryExecution`



### Description of how you validated changes



### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@aws-cdk-automation
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
admired-contributor [Pilot] contributed between 13-24 PRs to the CDK feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stepfunctions-tasks: enable resultReuseConfiguration in AthenaStartQueryExecution
5 participants