Skip to content

2026 11 12 tjr issue fixes - #464

Merged
tomrittervg merged 4 commits into
masterfrom
2026-11-12-tjr-issue-fixes
Nov 12, 2026
Merged

tomrittervg merged 4 commits into
masterfrom
2026-11-12-tjr-issue-fixes

Conversation

@tomrittervg

Copy link
Copy Markdown
Collaborator

No description provided.

…te. Fixes #244

The command runner now asks subprocess for UTF-8 text, replacing any
bytes that aren't valid UTF-8. Most call sites decoded strictly, so
output in another encoding (like the ISO-8859-1 commit behind #362)
raised UnicodeDecodeError wherever it was read.
…changes. Fixes #392

Our commits succeed before we push, so this means something was changed
or deleted without being registered with hg, which is how the WebGPU CTS
pushes in #392 failed (fixed by Bug 1971136's vcs-add-remove-files
action). If it happens again, the log will show which files.
If an update changes moz.yaml's license-file, or a file under the vendor
directory named like a license (LICENSE*, COPYING*, NOTICE*, ...), the
bug description starts by listing them and asking for the license in
moz.yaml to be checked. This happened in 3 of Updatebot's 439 commits
in the past year, so it should rarely fire. It's a note rather than a
failure: stopping the update would only leave us on older code.
Every method a mock defines must exist on the real class with the same
signature, so a change to a provider's interface can't leave tests
passing against the old one.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the command-output handling, vendoring diagnostics, and license-change notification updates.

No open issues 🎉

What changed in this PR

This PR improves Updatebot’s command-output handling and vendoring diagnostics, while adding license-change notices to update bugs.

Changes:

  • Standardizes command output as UTF-8 text with replacement for invalid bytes, updating callers and mocks.
  • Detects changed license files and adds a review reminder to Bugzilla descriptions.
  • Logs repository status when try submissions reject uncommitted changes, and adds regression and mock-interface tests.
File Description
tests/​treeherder_api.py Tests uncommitted-change diagnostics for failed try submissions.
tests/​scm.py Uses text stderr in the checkout-failure mock.
tests/​run_command.py Tests text output, invalid UTF-8 handling, and timeouts.
tests/​mock_interfaces.py Checks mock method signatures against real providers.
tests/​mock_commandprovider.py Returns text stdout and stderr from command mocks.
tests/​mach_vendor.py Updates patch-failure tests to expect text output.
tests/​license_files.py Tests license-file detection and notification text.
tests/​library.py Tests parsing of license-file metadata.
tests/​build_bug_description.py Uses text output in commit-detail mocks.
tests/​aiprovider.py Returns text stdout from the AI command mock.
test.py Registers the license-file and mock-interface test suites.
tasktypes/​vendoring.py Detects license changes, prepends notices, and consumes text errors.
components/​scmprovider.py Consumes Git command output directly as text.
components/​mach_vendor.py Handles vendoring output and errors as text.
components/​logging.py Reads version and hostname output as text.
components/​libraryprovider.py Stores license-file metadata and consumes text command output.
components/​hg.py Adds directory-scoped change queries and consumes text output.
components/​commandrunner.py Decodes subprocess output centrally and handles timeout output for logging.
components/​commandprovider.py Processes traceback stderr as text.
components/​bugzilla.py Adds a license-change reminder template.
components/​aiprovider.py Parses AI command output without explicit decoding.
automation.py Reads the Updatebot version from text output.
apis/​taskcluster.py Logs dirty-checkout status on try rejection and consumes text output.
apis/​phabricator.py Parses Conduit and submission responses as text.

Review effort: Balanced

@tomrittervg
tomrittervg merged commit 7d38b0a into master Nov 12, 2026
12 checks passed
@tomrittervg
tomrittervg deleted the 2026-11-12-tjr-issue-fixes branch November 12, 2026 13:42
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.

2 participants