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(outputs): refactor unroll_tags to use str as tags #4817

Conversation

pedrooot
Copy link
Member

@pedrooot pedrooot commented Aug 21, 2024

Context

The tags can also be unique strings; until now, they were expected to have the key: value format.

Fix #4740
Fix #4799

Description

unroll_tags method has been modified to manage str as tags for resources:

>>> tags = ["name", "age"]
>>> unroll_tags(tags)
{'tag0': 'name', 'tag1': 'age'}

Checklist

License

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

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.06%. Comparing base (a557d62) to head (476a181).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4817   +/-   ##
=======================================
  Coverage   89.05%   89.06%           
=======================================
  Files         926      926           
  Lines       28363    28365    +2     
=======================================
+ Hits        25258    25262    +4     
+ Misses       3105     3103    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MrCloudSec MrCloudSec force-pushed the PRWLR-4585-attribute-error-during-output-generation-of-tags-4740 branch from 476a181 to 37d2f8b Compare August 21, 2024 14:59
@MrCloudSec
Copy link
Member

Using this approach for cases of tags without values like:

{
    "tags": {
        "Author": ""
    }
}

Copy link
Member

@MrCloudSec MrCloudSec left a comment

Choose a reason for hiding this comment

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

Great fix!

@MrCloudSec MrCloudSec merged commit 5876fea into master Aug 21, 2024
19 checks passed
@MrCloudSec MrCloudSec deleted the PRWLR-4585-attribute-error-during-output-generation-of-tags-4740 branch August 21, 2024 16:40
@github-actions github-actions bot added the was-backported The PR was successfully backported to the target branch label Aug 21, 2024
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
v4.3

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

MrCloudSec pushed a commit that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
was-backported The PR was successfully backported to the target branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Execution Failure 'str' object has no attribute 'items' AttributeError during output generation
2 participants