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(batch): computeEnvironmentName is not set in FargateComputeEnvironment #25805

Closed
wants to merge 0 commits into from

Conversation

akshaypilankar
Copy link
Contributor

computeEnvironmentName property was missing in FargateComputeEnvironment due to which ComputeEnvironmentName property set on the resulting AWS::Batch::ComputeEnvironment resource in the outputted CloudFormation.
Updated managed-compute-environment to reflect the fix made in FargateComputeEnvironment.

Closes #25794.


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

@gitpod-io
Copy link

gitpod-io bot commented Jun 1, 2023

@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Jun 1, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team June 1, 2023 04:14
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@akshaypilankar akshaypilankar changed the title fix(aws-cdk-lib) attribute added computeEnvironmentName on AWS::Batch::ComputeEnvironment #25794 fix(aws-cdk-lib): attribute added computeEnvironmentName on AWS::Batch::ComputeEnvironment #25794 Jun 1, 2023
@akshaypilankar
Copy link
Contributor Author

Exemption Request - Existing testcases are sufficient to test this small change in parameter.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Jun 1, 2023
@akshaypilankar
Copy link
Contributor Author

Clarification Request - Existing testcases are sufficient for the new changes.

@aws-cdk-automation aws-cdk-automation added the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Jun 1, 2023
@peterwoodworth
Copy link
Contributor

Existing testcases are sufficient for the new changes

It looks like you've gone ahead and tried to work on tests since this, so thanks 🙂

You'll need to run the integration tests and update their snapshots, currently only the file has been adjusted, we need to verify that the integration tests still deploy.

@akshaypilankar
Copy link
Contributor Author

Hey @peterwoodworth, I am not able to run integration tests on my end. Is there any way we can skip the testcases since it is not required in this scenario?

@peterwoodworth
Copy link
Contributor

We should be testing that every property gets synthesized and that deployment works - since we aren't currently doing that, test cases are required.

I am not able to run integration tests on my end

What's preventing you from running integration tests?

@akshaypilankar
Copy link
Contributor Author

What's preventing you from running integration tests?
Not able to build framework-integ

image

@TheRealAmazonKendra TheRealAmazonKendra changed the title fix(aws-cdk-lib): attribute added computeEnvironmentName on AWS::Batch::ComputeEnvironment #25794 fix(batch): computeEnvironmentName is not set in FargateComputeEnvironment Jun 7, 2023
Copy link
Contributor

@comcalvi comcalvi 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 the fix, this is almost ready to merge. We definitely need changes to the integration test snapshots here, because you've (correctly) changed the integ test file. Just remove the taggedFargate resource and I can update the snapshots for you.

Comment on lines 73 to 79
const taggedFargate = new FargateComputeEnvironment(stack, 'taggedFargate', {
vpc,
computeEnvironmentName: 'taggedFargateCE',
});

Tags.of(taggedFargate).add('computeEnvironmentName', 'bar')

Copy link
Contributor

Choose a reason for hiding this comment

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

you don't need to add this here, you already added it to the CE above.

@akshaypilankar
Copy link
Contributor Author

Hey @comcalvi, Thank you so much for the help. Please update the snapshots.

@comcalvi
Copy link
Contributor

comcalvi commented Jun 8, 2023

sigh...I broke it. Sorry about this. Please do not pull from the remote.

I ran git push your-fork main and that didn't work, added a -f to it, and that pushed my main branch to yours, which is not what I wanted; it set your main back to it. For some reason I can push my main to your main, but I can't push the branch that has the actual snapshots on it; that gives a permission denied error.

Can you ensure maintainers are allowed to push to your fork?

This also shouldn't be closed...not sure why it was closed

@aws-cdk-automation
Copy link
Collaborator

The pull request linter fails with the following errors:

❌ Fixes must contain a change to a test file.
❌ Fixes must contain a change to an integration test file and the resulting snapshot.

PRs must pass status checks before we can provide a meaningful review.

If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing Exemption Request and/or Clarification Request.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@akshaypilankar
Copy link
Contributor Author

@comcalvi 😓 I am also not sure why is it closed. I guess they have merged the changes from some other PR 😞

@comcalvi
Copy link
Contributor

comcalvi commented Jun 12, 2023

Can you push some code to branch of this PR @akshaypilankar, so I can reopen it? 🙂
The issue hasn't been fixed yet, and no other PR was merged; this one was closed by mistake and it can't be reopened until you push your main branch, because I accidentally deleted your commits on that branch.

So don't pull from the branch, instead do a force push to your main.

@akshaypilankar
Copy link
Contributor Author

@comcalvi Here is the new PR - #25944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/small Small work item – less than a day of effort p1 pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_batch_alpha: FargateComputeEnvironment compute_environment_name not being respected
4 participants