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

Identify all tag styles #1367

Merged
merged 5 commits into from
Feb 23, 2024
Merged

Identify all tag styles #1367

merged 5 commits into from
Feb 23, 2024

Conversation

danielrbradley
Copy link
Member

  1. Add detection of last two observed variations.
  2. Add test to fail unit test if new unexpected tag styles are found.

The purpose of complete coverage of all tags styles is to maintain quality of tag accessibility. Additionally, this will allow us to reliably apply DefaultTags in a future PR (see #107).

Breaking into smaller, more specific functions.
At least one of the assigning values should match the {key:string, value:string} style.
@danielrbradley danielrbradley self-assigned this Feb 23, 2024
@danielrbradley danielrbradley added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Feb 23, 2024
Copy link
Contributor

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 22.38%. Comparing base (b477da2) to head (c4ec5db).

Files Patch % Lines
provider/pkg/schema/gen_tags.go 81.08% 4 Missing and 3 partials ⚠️
provider/pkg/schema/gen.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1367      +/-   ##
==========================================
+ Coverage   22.13%   22.38%   +0.25%     
==========================================
  Files          24       24              
  Lines        4103     4124      +21     
==========================================
+ Hits          908      923      +15     
- Misses       3044     3049       +5     
- Partials      151      152       +1     

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

var unexpectedTagsShapes map[string]interface{}
err = json.Unmarshal(bytes, &unexpectedTagsShapes)
require.NoError(t, err)
assert.Empty(t, unexpectedTagsShapes, "reports/unexpectedTagsShapes.json should be empty, which means that we need to update GetTagsStyle in gen_tags.go to cover new tags variations.")
Copy link
Contributor

Choose a reason for hiding this comment

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

If we want to fail hard at build time, why not just directly in GetTagsStyle? So we have the complete report to look at?

Copy link
Member Author

@danielrbradley danielrbradley Feb 23, 2024

Choose a reason for hiding this comment

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

Yeah - would prefer not failing during the build, but after in the test – having all the issues laid out in the report and the ability to fix one at a time if needed. Also quite easy to disable the test temporarily but still have the information reported.

@danielrbradley danielrbradley enabled auto-merge (squash) February 23, 2024 14:25
@danielrbradley danielrbradley merged commit 8d9dcb3 into master Feb 23, 2024
17 checks passed
@danielrbradley danielrbradley deleted the identify-all-tag-styles branch February 23, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants