Improve logging and metrics around NoChange Errors#15169
Open
robaiken wants to merge 1 commit into
Open
Conversation
The end-of-run "Dependencies failed to update" table pretty-prints the full error_details payload for every error. For no_change_error, that payload includes the entire command_traces array (with full stdout for each command), producing a multi-screen wall of text per failing dependency. Render no_change_error rows as a compact one-liner instead. The full structured payload is still sent to the backend via client.record_update_job_error and to logs via log_no_change_diagnostics — this only affects local console output. Also fix a pre-existing service_spec failure by requiring github_api/dependency_submission, which was not being loaded transitively and caused 'uninitialized constant GithubApi' in the create_dependency_submission test.
Contributor
There was a problem hiding this comment.
Pull request overview
Condenses the no_change_error rendering in the updater's end-of-run "Dependencies failed to update" summary table. Previously each row pretty-printed the full error_details payload (including all command_traces stdout), producing a wall of text. The PR delegates the Error Details cell to a new summarize_error_details helper that renders a compact one-liner for no_change_error, while preserving existing behavior (and full payload telemetry) for all other error types.
Changes:
- Add
summarize_error_detailshelper inDependabot::Serviceand use it independency_error_summaryfor enhanced error details. - Add missing
require "github_api/dependency_submission"in service spec to fix pre-existing load failure.
Show a summary per file
| File | Description |
|---|---|
| updater/lib/dependabot/service.rb | New private summarize_error_details helper renders one-line summary for no_change_error; falls back to JSON.pretty_generate for other error types. |
| updater/spec/dependabot/service_spec.rb | Adds require "github_api/dependency_submission" to fix uninitialized constant GithubApi in existing test. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
yeikel
reviewed
May 29, 2026
Contributor
yeikel
left a comment
There was a problem hiding this comment.
A small change that helps a lot. Thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
Improve the logging and metrics signal around
NoChangeErrors from npm/yarn/pnpm lockfile updates by ensuring the end-of-run "Dependencies failed to update" summary table renders a compact one-liner forno_change_errorinstead of pretty-printing the entireerror_detailspayload (which includes the fullcommand_tracesarray with stdout per command).This builds on #15068, which converts what is today an opaque
unknown_error(with a giant Sorbet stack trace andnulldetails) into a structuredno_change_errorcarrying useful diagnostic context. Without this change, that new structured payload drowns the summary in a multi-screen wall of text per failing dependency, hiding the very logging and metrics #15068 is adding.Before this work (on
maintoday) — meaninglessunknown_error / nullrow preceded by ~40 lines of Sorbet stack trace:After #15068 alone — useful structured payload, but the summary table dumps it all:
(plus the same payload pretty-printed inside the summary table)
After this PR — compact, scannable summary; full payload still flows to backend, logs, and metrics:
Anything you want to highlight for special attention from reviewers?
client.record_update_job_error(error_type:, error_details:)still sends the full structured payload to the backend.log_no_change_diagnostics(per-trace info log lines fromerror_handler.rb) still runs unchanged.service.increment_metric("updater.no_change", ...)still fires with all tags.no_change_errorwas never sent to Sentry).no_change_errorbranch insummarize_error_detailsis forward-compatible: it's dormant until Add no-change diagnostics for npm/yarn/pnpm lockfile updates #15068 lands, then activates automatically. This PR can be reviewed and merged independently.no_change_errorrows from the table entirely (since the data is in logs/backend). Kept the row for at-a-glance visibility — open to dropping it if reviewers prefer.require "github_api/dependency_submission"toupdater/spec/dependabot/service_spec.rbto fix a pre-existing failure (uninitialized constant GithubApi) in thecreate_dependency_submissiontest.How will you know you've accomplished your goal?
service_spectests pass, including the twodependency_error_summarytests directly exercising the modified code path:script/dependabot update -f tmp/nc.yamlagainst a pnpm fixture that produces a no-change result — observed the compact summary row shown above instead of the verbose payload.Checklist