grafana / agent

Vendor-neutral programmable observability pipelines.
https://grafana.com/docs/agent/
Apache License 2.0
1.59k stars 486 forks source link

This is to handle myriad ways that git revision can be used. #6803

Closed mattdurham closed 6 months ago

mattdurham commented 6 months ago

PR Description

There were issues with the previous change when it came to handling branches and tags. The hard reset would cause a cannot merge non-forwarded merge error when pulling to see if any changes occurred.

Instead of a reset went with a checkout that worked with the pull context, though checkout needs some massaging when handling revision. Specifically the commit hash of a tag doesnt work, thankfully you can use the tag name as a branch and everything is happy. I think I have every use case covered now, HEAD, branch name, tag, and commit. Along with ensuring that if the value changes on HEAD then that will be tracked properly.

I also verified it worked using branch names from the agent-modules repo.