Closed Bug 1473790 Opened 7 years ago Closed 7 years ago

Lando should provide a link to the commit in the repository for each landing

Categories

(Conduit :: Lando, enhancement)

Production
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: imadueme, Assigned: imadueme)

References

Details

(Keywords: conduit-triaged)

Attachments

(2 files)

Lando API provides the 'tree' that transplant reports it landed a revision in, but, that doesn't always map clearly to a link on hg.mozilla.org (or another development hg instance). E.g. the 'autoland' tree would map to '/integration/autoland' on hg.m.o. We should add an explicit link to the commit in the API that all clients can use. From there Lando UI can linkify the commit id displayed.
Blocks: 1466120
My original plan was to add the corresponding hg repo url to our repo mapping in repos.py in the API. Then I would add a new field to the Landing schema with that mapping. Do you think I should go ahead with this plan given the work going on in Lando API?
Flags: needinfo?(smacleod)
(In reply to Israel Madueme [:imadueme] from comment #1) > My original plan was to add the corresponding hg repo url to our repo > mapping in repos.py in the API. Then I would add a new field to the Landing > schema with that mapping. > > Do you think I should go ahead with this plan given the work going on in > Lando API? The models need to be migrated a bunch as part of the series work, so I'd rather not modify them for this. I think adding the url to the Repos structure could make sense. Alternatively we can expose the urls we get from Phabricator 'diffusion.repository.search', picking the one we're observing. As a quick fix though, ya, lets add hardcoded urls to the Repos, and just expose that from the landings endpoint, rather than saving the actual url at the time of landing.
Flags: needinfo?(smacleod)
Adds the repo url to the landings api so clients can know where to link commit ids to. Still WIP
Assignee: nobody → imadueme
Status: NEW → ASSIGNED
Attachment #8994216 - Attachment description: [WIP] add repository url to landing api (Bug 1473790) → landings: add tree url to landings api (Bug 1473790)
This adds a new template helper which is used to linkify the commit ids of successful landings. It does not try to guess what a commit id looks like but instead matches exactly the id given in the landing status.
Comment on attachment 8994216 [details] landings: add tree url to landings api (Bug 1473790) Steven MacLeod [:smacleod] has approved the revision. https://phabricator.services.mozilla.com/D2296
Attachment #8994216 - Flags: review+
Comment on attachment 8994254 [details] revisions: autolink to the commit for successful landings (Bug 1473790) Māris Fogels [:mars] has approved the revision. https://phabricator.services.mozilla.com/D2297
Attachment #8994254 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: