fix(stepfunctions-tasks): Athena StartQueryExecution includes QueryExecutionContext even when object is empty#16141
fix(stepfunctions-tasks): Athena StartQueryExecution includes QueryExecutionContext even when object is empty#16141mergify[bot] merged 8 commits intoaws:masterfrom LukvonStrom:master
Conversation
BenChaimberg
left a comment
There was a problem hiding this comment.
Thank you so much for cleaning up our logic! A couple of further modifications to make things sleek
packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts
Show resolved
Hide resolved
packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Ben Chaimberg <youppi3@gmail.com>
Pull request has been modified.
BenChaimberg
left a comment
There was a problem hiding this comment.
awesome, looks great! just some minor stuff
packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.ts
Outdated
Show resolved
Hide resolved
Pull request has been modified.
packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts
Outdated
Show resolved
Hide resolved
Pull request has been modified.
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…ecutionContext even when object is empty (aws#16141) fixes: aws#16133 As described in aws#16133, the empty `QueryExecutionContext`, which was included before this fix, leads to an error. To mitigate this, I implemented a check to exclude the `QueryExecutionContext`when both params are empty. This way, it behaves like a truly optional parameter. Additionally I integrated an easier way to merge an OutputLocation if provided. This means less redundancy than the original solution, which returned an object that was only different in one key in each branch. The unittest is based on the default unittest, but a bit "stripped down". It proofs that no empty `QueryExecutionContext` object is present. In my tests, this fixes the ``` { "resourceType": "athena", "resource": "startQueryExecution.sync", "error": "Athena.InvalidRequestException", "cause": "Both queryExecutionContext.catalog and queryExecutionContext.database are null or empty (Service: AmazonAthena; Status Code: 400; Error Code: InvalidRequestException; Request ID: [Censored]; Proxy: null)" } ``` error. This solution turned out to be a bit different than I envisioned in the issue. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ecutionContext even when object is empty (aws#16141) fixes: aws#16133 As described in aws#16133, the empty `QueryExecutionContext`, which was included before this fix, leads to an error. To mitigate this, I implemented a check to exclude the `QueryExecutionContext`when both params are empty. This way, it behaves like a truly optional parameter. Additionally I integrated an easier way to merge an OutputLocation if provided. This means less redundancy than the original solution, which returned an object that was only different in one key in each branch. The unittest is based on the default unittest, but a bit "stripped down". It proofs that no empty `QueryExecutionContext` object is present. In my tests, this fixes the ``` { "resourceType": "athena", "resource": "startQueryExecution.sync", "error": "Athena.InvalidRequestException", "cause": "Both queryExecutionContext.catalog and queryExecutionContext.database are null or empty (Service: AmazonAthena; Status Code: 400; Error Code: InvalidRequestException; Request ID: [Censored]; Proxy: null)" } ``` error. This solution turned out to be a bit different than I envisioned in the issue. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
fixes: #16133
As described in #16133, the empty
QueryExecutionContext, which was included before this fix, leads to an error.To mitigate this, I implemented a check to exclude the
QueryExecutionContextwhen both params are empty.This way, it behaves like a truly optional parameter.
Additionally I integrated an easier way to merge an OutputLocation if provided.
This means less redundancy than the original solution, which returned an object that was only different in one key in each branch.
The unittest is based on the default unittest, but a bit "stripped down". It proofs that no empty
QueryExecutionContextobject is present.In my tests, this fixes the
error.
This solution turned out to be a bit different than I envisioned in the issue.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license