Closed Bug 931542 Opened 11 years ago Closed 5 years ago

Tree closure tags not available via API anywhere other than for the /logs endpoint

Categories

(Release Engineering :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Unassigned, Mentored)

References

Details

(Whiteboard: [good-first-bug])

Attachments

(1 file)

Bug added support for tags for closure reason.

These can be seen in the per tree logs, eg:
https://treestatus.mozilla.org/b2g-inbound/logs?format=json

However they are not available in the "per-tree current state" endpoint, eg:
https://treestatus.mozilla.org/b2g-inbound?format=json
...or the "show current state of all trees" endpoint:
https://treestatus.mozilla.org/?format=json

We should add it, to allow downstream consumers who need to tell the difference between an infra closure and another closure apart etc (eg bug 931079).
Assignee: nobody → emorley
Assignee: emorley → nobody
Product: Webtools → Tree Management
Attached file PR 59
So, I think this is what would be needed to get things working correctly. The tags information didn't appear to be stored in the DB (!?), so this adds the tags field to the DBs.

I've played with this locally and nothing seems too broken, but it's been a looong time since I've had to care about DB stuff, so I make no promises. Hopefully I did the DB migration stuff correctly. Do I need to change something near the top of model.py to indicate a new DB version?
Assignee: nobody → wkocher
Status: NEW → ASSIGNED
Flags: needinfo?(catlee)
Attachment #8624785 - Flags: review?(emorley)
Comment on attachment 8624785 [details] [review]
PR 59

I don't really know Flask or sqlalchemy that well - I'd be more comfortable with catlee reviewing this, since he wrote it :-)
Attachment #8624785 - Flags: review?(emorley) → review?(catlee)
Unassigning this for now since Treestatus is being ported to relengapi. We can come back to this after that transition if it's not already fixed just by the transition.
Assignee: wkocher → nobody
Status: ASSIGNED → NEW
Product: Tree Management → Release Engineering
Flags: needinfo?(catlee)
Comment on attachment 8624785 [details] [review]
PR 59

Can you rebase this on top of the new relengapi implementation?
Attachment #8624785 - Flags: review?(catlee)
Whiteboard: [good-first-bug]
I am new to open source, very interested in contribution. Need help how to get started.
Rok, are you able to mentor this?
Flags: needinfo?(rgarbas)
:dustin: sure.

Hi anrgbndhu!

Few things changes since this issue was opened:
 - Code is now here: https://github.com/mozilla-releng/services/tree/master/src/releng_treestatus
 - Url for TreeStatus API changed and is now here: http://treestatus.mozilla-releng.net

TreeStatus API services is implemented with Flask[1] and Connextion[2].

Since many things changes I will reword the ticket.

Currently in `per-tree logs` endpoint[3] contain tags, but `per-tree` endpoint[4] does not and we need to add then. Tags should be also added to `all trees` endpoint.

- `per-tree logs` endpoint is implemented here: https://github.com/mozilla-releng/services/blob/master/src/releng_treestatus/releng_treestatus/api.py#L217
- `per-tree` endpoint is implemented here: https://github.com/mozilla-releng/services/blob/master/src/releng_treestatus/releng_treestatus/api.py#L239
- `all trees` endpoint is implemented here: https://github.com/mozilla-releng/services/blob/master/src/releng_treestatus/releng_treestatus/api.py#L109


Since I'm not familiar with your background I will stop here, but please ask any questions you have.


[1] http://flask.pocoo.org/
[2] https://github.com/zalando/connexion
[3] https://treestatus.mozilla-releng.net/trees/ash/logs?all=1
Assignee: nobody → rgarbas
Flags: needinfo?(rgarbas)
Assignee: rgarbas → nobody
Mentor: rgarbas
Hello everyone! I am a newbie to Bugzilla and have just recently started learning Flask. In case no one is working on this bug, may I please work on the same? It would be great if someone please explains me the workflow for this bug. Thanks in advance!
Hi Preeti,

Do instructions from Comment 8[1] help? Where do you get stuck?


[1] https://bugzilla.mozilla.org/show_bug.cgi?id=931542#c8
(In reply to Rok Garbas [:garbas] from comment #10)
> Hi Preeti,
> 
> Do instructions from Comment 8[1] help? Where do you get stuck?
> 
> 
> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=931542#c8

Hello Rok Garbas,

I am not familiar with the term :`per-tree logs` and endpoint.

As I have mentioned earlier, I have just started learning Flask ,but, I have no knowledge on SQLAlchemy and Connextion. So, it would be great if you could mention the technologies I need to learn to fix this bug.I am willing to learn new technologies to fix this bug.
QA Contact: dustin → rgarbas
:preeti

Please look at the Connexion library (https://github.com/zalando/connexion) to know what it is its purpose and how to use it. Then instructions will have more meaning.

For all the terminology the following list should help, since it points to the implementation of those API endpoints which need to be changed.

- `per-tree logs` endpoint is implemented here: https://github.com/mozilla-releng/services/blob/master/src/releng_treestatus/releng_treestatus/api.py#L216
- `per-tree` endpoint is implemented here: https://github.com/mozilla-releng/services/blob/master/src/releng_treestatus/releng_treestatus/api.py#L238
- `all trees` endpoint is implemented here: https://github.com/mozilla-releng/services/blob/master/src/releng_treestatus/releng_treestatus/api.py#L108

Is this bug still open? I see that there has been no activity for about an year, is it okay if I take it up?

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Component: Applications: TreeStatus → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: