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

fix(athena): WorkGroup tags corruption #9085

Merged
merged 13 commits into from
Aug 3, 2020

Conversation

moofish32
Copy link
Contributor

@moofish32 moofish32 commented Jul 15, 2020

Since Athena does not have AWS constructs the tests are empty. What does
the team think about me adding one test to verify this patch is
correctly applied for the cfn generated constructs?

Can I also get feedback on the file name choice I made or a pointer to
conventions on the patch file names?

Fixes #6936


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

@moofish32
Copy link
Contributor Author

@iliapolo initial draft work here. A little more to do in my opinion, but looking for a little guidance from your side about what is necessary. Specifically the lint failure, which I think might be alleviated if I add a unit test here.

@moofish32
Copy link
Contributor Author

@iliapolo - not sure if there is naming convention on these patches? But I've added a test to verify tags render correctly based on the docs: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-athena-workgroup.html#aws-resource-athena-workgroup--examples. I didn't write an integration test because that's not normally here for cfn constructs, but let me know.

@udondan and @blimmer -- https://github.com/aws/aws-cdk/pull/9085/files#diff-337b645f01ad335010f3212222427af8R23-R32 does this look right to you?

@iliapolo iliapolo changed the title fix(cfn-spec): patch athena workgroup tags specification fix(athena): patch athena workgroup tags specification Jul 19, 2020
@iliapolo iliapolo changed the title fix(athena): patch athena workgroup tags specification fix(athena): WorkGroup tags corruption Jul 19, 2020
Copy link
Contributor

@iliapolo iliapolo left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for taking the time! :)

"PropertyTypes": {
"AWS::Athena::WorkGroup.Tags": {
"patch": {
"description": "Sets AWS::Serverless::Function.S3Event.Events#UpdateType to Immutable",
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy-paste leftovers.. :)


test('No tests are specified for this package', () => {
expect(true).toBe(true);
test('test tags spec correction', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets also add a test that configured Tags on CfnWorkGroup rather than using the Tag aspect.

@@ -0,0 +1,36 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add Workgroup to the file name.

@iliapolo
Copy link
Contributor

@moofish32 P.S I also opened an issue (the very first one!) with the Athena resource provider in CloudFormation: aws-cloudformation/aws-cloudformation-resource-providers-athena#21

@udondan
Copy link
Contributor

udondan commented Jul 20, 2020

@moofish32 P.S I also opened an issue (the very first one!) with the Athena resource provider in CloudFormation: aws-cloudformation/aws-cloudformation-resource-providers-athena#21

Is this repo/org the source of the CFN spec? I wasn't aware of this. Is there a list of als AWS orgs on GitHub?

@iliapolo
Copy link
Contributor

@udondan

Is this repo/org the source of the CFN spec? I wasn't aware of this. Is there a list of als AWS orgs on GitHub?

Im honestly not sure. I was poking around to see if there is a repo for the spec, and came across this specific athena resource provider. Lets wait a bit for their response and we can ask them.

Copy link
Contributor

@iliapolo iliapolo left a comment

Choose a reason for hiding this comment

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

@moofish32 I'd feel more comfortable if we also had a small integ test that makes sure this change actually deploys well. Would this be hard to accomplish?

@moofish32
Copy link
Contributor Author

@moofish32 I'd feel more comfortable if we also had a small integ test that makes sure this change actually deploys well. Would this be hard to accomplish?

I debated about this too. Should be possible, but I want to highlight that we won't see an Integ change when the spec updates, until we remove the patch. Since you won't see a change in the CFN output the test won't fire. So this is sort of a one time benefit and somebody needs to remember to kill this patch when the spec is fixed (hardest job in software).

@moofish32
Copy link
Contributor Author

not quite enough time tonight to do the Integ test, but hopefully by Monday.

@mergify mergify bot dismissed iliapolo’s stale review July 21, 2020 06:23

Pull request has been modified.

@moofish32
Copy link
Contributor Author

@iliapolo - can you give this another pass now?

@mergify
Copy link
Contributor

mergify bot commented Aug 3, 2020

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).

@mergify
Copy link
Contributor

mergify bot commented Aug 3, 2020

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).

@mergify mergify bot merged commit b688913 into aws:master Aug 3, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 055eb27
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

curtiseppel pushed a commit to curtiseppel/aws-cdk that referenced this pull request Aug 11, 2020
Since Athena does not have AWS constructs the tests are empty. What does
the team think about me adding one test to verify this patch is
correctly applied for the cfn generated constructs?

Can I also get feedback on the file name choice I made or a pointer to
conventions on the patch file names?

Fixes aws#6936

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatible tags definition for AWS::Athena::WorkGroup
4 participants