-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add FXIOS-27112 Update FirefoxTelemetryUtility.sh to automatically update tags.yaml #27279
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
base: main
Are you sure you want to change the base?
Conversation
…and alphabetize the tags.yaml for -add operations
@ih-codes Please take a look! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great work @Marvae! Thank you very much for taking this on. I appreciate the detailed documentation changes you made as well. 🚀
I tested your changes and just found one edge case with appending to the end of the tags.yaml
file. Maybe you can take a look? Thanks!
Generated by 🚫 Danger Swift against 8d6095e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes @Marvae! Works great when I tested. 👌 I had just one tiny nitpick for the appending extra newlines to the end of the tags.yaml.
Example output:
Toasts:
description: Corresponds to any events around toasts in the app. Toasts are the shortlived banners that
appear when an action is taken.
TopSites:
description: Corresponds to the [Feature:TopSites](https://mozilla-hub.atlassian.net/browse/FXIOS-3464)
label on GitHub.
XTag:
description: TODO: Add description for XTag tag
YTag:
description: TODO: Add description for YTag tag
ZTag:
description: TODO: Add description for ZTag tag
FirefoxTelemetryUtility.sh
Outdated
echo "" >> "$temp_file" | ||
echo "${tag_name}:" >> "$temp_file" | ||
echo " description: ${tag_description}" >> "$temp_file" | ||
echo "" >> "$temp_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "" >> "$temp_file" |
I think we can delete this ending newline. As long as we make sure tags.yaml
always has a newline at the end, then we can just prepend the one newline on 269 before appending the newest tag.
Otherwise if you keep appending new tags right to the end of the file you'll get double spaces between tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the throughout test! Updated
📜 Tickets
Github issue
💡 Description
Currently, when developers add new metrics using the
FirefoxTelemetryUtility.sh
script with the--add
option, they need to manually update thetags.yaml
file. This manual step can lead to errors if forgotten and causesglean_parser
compiler errors in Xcode.Changes
update_tags_yaml
function to handle tag updates--add
command to accept an optional description parameter📝 Checklist
@Mergifyio backport release/v120
)