Skip to content

Record the agent's commit in each run's summary - #7337

Open
ayoubdiourin7 wants to merge 8 commits into
mozilla:masterfrom
ayoubdiourin7:ayoubdiourin7/agent-runs-should-record-the-exact-agent-version
Open

ayoubdiourin7 wants to merge 8 commits into
mozilla:masterfrom
ayoubdiourin7:ayoubdiourin7/agent-runs-should-record-the-exact-agent-version

Conversation

@ayoubdiourin7

Copy link
Copy Markdown
Contributor

Cloud Build passes the commit into the image as HACKBOT_AGENT_COMMIT, and the runtime writes it to summary.json as agent_commit, so each run records the exact code it ran.

Only bug-fix sets it for now

Fixes #7291

@ayoubdiourin7
ayoubdiourin7 requested a review from a team as a code owner October 27, 2026 20:34

@suhaibmujahid suhaibmujahid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! Looks good. Just minor changes.

log.error(msg)
payload = _error_payload(ctx, msg)
exit_code = 1
payload["agent_version"] = ctx.agent_version

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we have the agent name as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't see a need for it; we already have it as input set by the API

@ayoubdiourin7
ayoubdiourin7 enabled auto-merge (squash) November 12, 2026 17:31

This branch has not been deployed

No deployments
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.

Agent runs should record the exact agent version that it is running

2 participants