New "Weather Item" process with full preparation on topic and verification instead of breaking the world (RELENG-101)

[RELENG-104] POC of a magical solution to eventually be able to "build a topic" Created: 26/Apr/18  Updated: 07/May/18  Resolved: 07/May/18

Status: Resolved
Project: releng
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Sub-task Priority: Medium
Reporter: Michael Vorburger Assignee: Michael Vorburger
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I'd like to understand how hard it would be to build some magic script or something which can build all changes listed on a given Gerrit topic through (initially) RELENG-103 and (later) RELENG-102.

First step is to figure out how to programmatically fetch all changes from a Gerrit topic.



 Comments   
Comment by Michael Vorburger [ 26/Apr/18 ]

zxiiro can you (or anyone you can point me to) have any prior experience with how to do something like this?

Like perhaps Gerrit has an easy to use REST API for this kind of thing - any pointers?

Comment by Michael Vorburger [ 26/Apr/18 ]

Oh wait I think one can just do a query with "topic:..." ...

Comment by Thanh Ha (zxiiro) [ 26/Apr/18 ]

Yep, I would give the Gerrit Rest API a try. For the most part you should be able to query anonymously. If you're using shell you can use "jq" which is installed on all of our systems to parse the json.

Comment by Michael Vorburger [ 30/Apr/18 ]

I've successfully been able to use the Gerrit REST API in https://github.com/vorburger/opendaylight-bot/ ...

Once RELENG-103 clarifies, perhaps I'll make it launch builds automatically for me...

Comment by Michael Vorburger [ 02/May/18 ]

I want to do some "packaging" effort to make it easy for anyone to run The Bot on CLI or Web - then close this.

Comment by Robert Varga [ 04/May/18 ]

An usability idea from: https://lists.opendaylight.org/pipermail/infrastructure/2018-May/000966.html

One way I see this being achieved is:

  • JJB jobs to hook into Jenkins
  • Have Jenkins hooked up to Gerrit to watch a topic and rebuild whenever anything moves

Note that 'anything moves' includes things like upstream patches being rebased in Gerrit UI one at a time, which can create job storms (like 'Submit including parents' does for merge jobs). It would be nice to suppress or short-circuit extra jobs, but that's not critical.

Comment by Michael Vorburger [ 07/May/18 ]

rovarga I've copy/pasted above to another sub-task RELENG-117, and will close this now, as I consider my initial "POC" is now (more than...) completed: The initial goal outlined above about programmatically fetching changes from Gerrit (and ordering them, and formatting them into a multipatch job magic string) has been achieved.

Generated at Wed Feb 07 20:37:30 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.