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(aws): Handle YAML cloudformation template bodies #10826

Merged
merged 5 commits into from
May 18, 2023

Conversation

hermanschaaf
Copy link
Member

This fixes an issue with the new aws_cloudformation_stack_templates table, where it seems like the AWS API can return YAML as well as JSON for the template body, so we cannot assume it to be JSON.

This was a tricky one to fix in a backwards-compatible way, however, because the column is now of JSON type. My solution here is to:

  • do a best-effort attempt to convert YAML to JSON for the existing template_body column
  • save the raw text in template_body_text

@github-actions
Copy link

This PR has the following changes to source plugin(s) tables:

  • Table aws_cloudformation_stack_templates: column added with name template_body_text and type String

@hermanschaaf hermanschaaf added the automerge Automatically merge once required checks pass label May 18, 2023
@kodiakhq kodiakhq bot merged commit 498f394 into main May 18, 2023
17 checks passed
@kodiakhq kodiakhq bot deleted the fix-json-template-body branch May 18, 2023 08:36
kodiakhq bot pushed a commit that referenced this pull request May 18, 2023
🤖 I have created a release *beep* *boop*
---


## [17.3.1](plugins-source-aws-v17.3.0...plugins-source-aws-v17.3.1) (2023-05-18)


### This Release has the Following Changes to Tables
- Table `aws_cloudformation_stack_templates`: column added with name `template_body_text` and type `String`

### Bug Fixes

* **aws-s3:** Always use models.WrappedBucket to avoid panic ([#10827](#10827)) ([be55852](be55852))
* **aws:** Handle YAML cloudformation template bodies ([#10826](#10826)) ([498f394](498f394))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge once required checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants