Conversation
✅ Deploy Preview for mozilla-perfcompare ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…rror Handle missing Lando commit IDs using the landing-job status from Lando instead of waiting for Treeherder to reject a blank new_revision. Also explain when Lando has landed but Treeherder has not ingested the try push yet (including a hint for the new Lando instance). Fixes Bug-2003889 and Bug-2028932
moijes12
force-pushed
the
fix2003889
branch
from
September 14, 2026 09:56
33e97e6 to
d8841a5
Compare
New Lando returns commit_id as an empty string when a landing job fails, along with a multi-line hg error. Treat that as a missing revision, and show only the first line of Lando's error so the page is readable.
moijes12
marked this pull request as ready for review
September 14, 2026 14:53
Contributor
Author
|
@kala-moz I feel I could create a Error page with some styling which can be used to display these errors. What do you think? |
Comment on lines
+34
to
+38
| return text | ||
| .split(/\r?\n/) | ||
| .map((line) => line.trim()) | ||
| .find((line) => line.length > 0); | ||
| } |
Contributor
There was a problem hiding this comment.
nit: Optional suggestion to stop as soon as you find a match
for (const line of text.split(/\r?\n/)) {
const trimmed = line.trim();
if (trimmed) return trimmed;
}
return undefined;
| @@ -22,9 +68,15 @@ async function fetchFromLando(url: string) { | |||
| export async function fetchRevisionFromLandoId( | |||
| landoid: string, | |||
Contributor
There was a problem hiding this comment.
nit (this might fall outside this PR's scope to correct this, feel free to ignore):
Suggested change
| landoid: string, | |
| landoId: string, |
| return typeof job.commit_id === 'string' && job.commit_id.trim().length > 0; | ||
| } | ||
|
|
||
| function firstLine(text: string | undefined) { |
Contributor
There was a problem hiding this comment.
Suggested change
| function firstLine(text: string | undefined) { | |
| function firstLine(text: string | undefined): string | undefined { |
Return the first non-empty line without mapping the whole error, add an explicit return type on firstLine, and rename landoid to landoId.
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.
Handle missing Lando commit IDs using the landing-job status from Lando instead of waiting for Treeherder to reject a blank new_revision. Also explain when Lando has landed but Treeherder has not ingested the try push yet (including a hint for the new Lando instance).
Outcomes
@gmierz
Fixes Bug-2003889 and Bug-2028932