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(cfnspec): IoT timestamp type by overwriting with patch #25416

Closed
wants to merge 9 commits into from

Conversation

sthuber90
Copy link

@sthuber90 sthuber90 commented May 3, 2023

This PR provides a patch for the CloudFormation Timestamp property in AWS IoT. Here, a timestamp does not reflect a date but is an object, consisting of a Unit and Value property. By patching the IoT spec, renaming the Timestamp property type, the problem gets resolved.

Closes #22732


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 May 3, 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 labels May 3, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team May 3, 2023 17:45
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label May 3, 2023
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.

@sthuber90 sthuber90 changed the title fix: IoT timestamp type by overwriting with patch fix(cfnspec): IoT timestamp type by overwriting with patch May 4, 2023
@sthuber90
Copy link
Author

Exemption Request

As the tests for cfnspec are generated I don't see the need to add custom unit or integration test logic. Let me know if you'd still like me to add tests and where you'd want them

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label May 4, 2023
@sthuber90
Copy link
Author

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.

I thought I followed the comment and asked for an Exemption Request request. Any help to fix the PR linter is appreciated

@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 May 4, 2023
@sthuber90
Copy link
Author

Ok, so after multiple iterations and trying different approaches (see commit history) it's become apparent that CDK does not like me renaming the Timestamp property to avoid breaking changes. The solution now is to keep the Timestamp property, even though it's no longer used, and add the custom IotTimestamp and use that one in the LocationActionProperty. See build log with failure message.

I don't think it's so ideal as this will result in the TimestampProperty and IotTimestampProperty being created thereby duplicating the code.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@sthuber90 sthuber90 marked this pull request as ready for review May 5, 2023 04:37
@sthuber90
Copy link
Author

@TheRealAmazonKendra or @corymhall does it makes sense that one of you reviews the PR since your also involved in another PR from me related to IoT?

@corymhall
Copy link
Contributor

@TheRealAmazonKendra or @corymhall does it makes sense that one of you reviews the PR since your also involved in another PR from me related to IoT?

@sthuber90 let me check with the team on this one. I'm not sure the approach that we want to take.

@corymhall
Copy link
Contributor

@TheRealAmazonKendra or @corymhall does it makes sense that one of you reviews the PR since your also involved in another PR from me related to IoT?

@sthuber90 let me check with the team on this one. I'm not sure the approach that we want to take.

@sthuber90 after discussing this with the team I think we want to handle this on the generation side since this is a case that we should be handling. I've created another PR to try and handle it.

@aws-cdk-automation
Copy link
Collaborator

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

@aws-cdk-automation
Copy link
Collaborator

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

@aws-cdk-automation aws-cdk-automation added the closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. label Jun 1, 2023
@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 1, 2023
@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.

@sthuber90 sthuber90 deleted the fix-iot-timestamp-type branch June 13, 2023 08:02
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. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort p1 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. 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-cdk/aws-iot): CfnLocationAction asks for Date type despite spec wanting Timestamp type
3 participants