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: remove empty elements from tag list #936

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

kayman-mk
Copy link
Collaborator

Description

In rare cases the amazonec2-tags may contain empty elements which show up as ,__PARENT_TAG__ which is not a valid value for AWS API to create an instance.

The problem is that runner_tags must be removed if it is empty. Otherwise the empty element is inserted into the final string which results in a preceding ,.

Closes #933

Verification

Verified manually with

  • no tags --> __PARENT_TAG__
  • with tags --> tag1,value1,__PARENT_TAG

@kayman-mk kayman-mk requested a review from npalm as a code owner August 14, 2023 10:44
@github-actions
Copy link
Contributor

Hey @kayman-mk! 👋

Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process.

Make sure that this PR clearly explains:

  • the problem being solved
  • the best way a reviewer and you can test your changes

With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE.

The following ChatOps commands are supported:

  • /help: notifies a maintainer to help you out

Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command.

This message was generated automatically. You are welcome to improve it.

@kayman-mk kayman-mk force-pushed the main branch 2 times, most recently from 585afba to 156fb63 Compare August 14, 2023 11:02
@kayman-mk kayman-mk force-pushed the kayma/fix-no-tags branch 2 times, most recently from c71da14 to 63706ad Compare August 15, 2023 13:00
@kayman-mk kayman-mk merged commit 3b4a95e into cattle-ops:main Aug 31, 2023
@kayman-mk kayman-mk deleted the kayma/fix-no-tags branch August 31, 2023 18:38
kayman-mk pushed a commit that referenced this pull request Aug 31, 2023
🤖 I have created a release *beep* *boop*
---


##
[6.5.2](6.5.1...6.5.2)
(2023-08-31)


### Bug Fixes

* remove empty elements from tag list
([#936](#936))
([3b4a95e](3b4a95e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Signed-off-by: Niek Palm <[email protected]>
Co-authored-by: cattle-ops-releaser-2[bot] <134548870+cattle-ops-releaser-2[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

Unable to provision EC2 instances: "Tag key must have a value"
1 participant