Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger_files removes labels added by user as part of PR creation #1537

Closed
camelid opened this issue Dec 13, 2021 · 2 comments · Fixed by #1540
Closed

trigger_files removes labels added by user as part of PR creation #1537

camelid opened this issue Dec 13, 2021 · 2 comments · Fixed by #1540

Comments

@camelid
Copy link
Member

camelid commented Dec 13, 2021

I added some labels as part of the PR creation flow, but rustbot removed them when it added T-rustdoc: rust-lang/rust#91876 (comment)

@camelid camelid changed the title trigger_files removes labels added by user trigger_files removes labels added by user as part of PR creation Dec 13, 2021
@Mark-Simulacrum
Copy link
Member

Distributed systems problem, I suppose. The github side event log shows:

fd73ee70-5c5d-11ec-914a-1521518a34ea: 16:45:30 - camelid, labeled = +C-cleanup, I-compiletime, I-compilemem
fd7e9cd0-5c5d-11ec-8087-4a7cb5275989: 16:45:30 - camelid, labeled = C-cleanup, I-compiletime, +I-compilemem
fd8812b0-5c5d-11ec-9b60-669487d92dd5: 16:45:30 - camelid, labeled = C-cleanup, +I-compiletime, I-compilemem
fe2208c0-5c5d-11ec-859c-7d384597c723: 16:45:31 - rustbot, unlabeled, remove: C-cleanup, left: T-rustdoc
fe2208c0-5c5d-11ec-859c-7d384597c723: 16:45:31 - rustbot, unlabeled, remove: I-compiletime, left: T-rustdoc
fe2b7ea0-5c5d-11ec-9d4a-c8dfb48b4f18: 16:45:31 - rustbot, unlabeled, remove: I-compilemem, left: T-rustdoc
fe3c6e90-5c5d-11ec-8d28-edd2327c1b85: 16:45:31 - rustbot, labeled = T-rustdoc
fd1a0ea0-5c5d-11ec-8965-864abb4f8d0b: 16:45:32 - camelid, opened, labels = []

Triagebot logs (edited to strip details) show (note, UUIDs here are triagebot, not expected to match those generated by GitHub).

23d83c5e-42b2-4073-bef6-a8945105213f: Opened, labels: []
23d83c5e-42b2-4073-bef6-a8945105213f: set_labels rust-lang/rust#91876 to [T-rustdoc]
5f13fdab-1c90-4e77-a2e9-5c697bc040a6: Labeled, +C-cleanup, labels: [C-cleanup, I-compiletime, I-compilemem]
955c9052-63ea-41b1-b988-ebcc8b58b191: Labeled, +I-compilemem, labels: [C-cleanup, I-compiletime, I-compilemem]
df1cb36a-5984-494e-967d-b8333beb1304: Labeled, +I-compiletime, labels: [C-cleanup, I-compiletime, I-compilemem]
a70da24b-df42-4884-94bc-30b16e87f91c: Unlabeled, -C-cleanup, labels: [T-rustdoc]
4dc2f136-5c14-44b2-baef-4245a6cacfca: Unlabeled, -I-compiletime, labels: [T-rustdoc]
ae0627e2-ca61-416a-91c0-f7b4291a2fed: Unlabeled, -I-compilemem, labels: [T-rustdoc]
8f010590-1d05-4634-a111-3b62f88ce127: Labeled, +T-rustdoc, labels: [T-rustdoc]

Both logs are ordered "oldest" to "newest", i.e., last event is latest event.

I think the likely fix here is to migrate to the new(?) API GitHub offers for adding labels, rather than setting them. It seems like we can do so by just changing the put to a post. We'll want to update the code that calls in to delete and add labels to use the "add" and "delete" APIs as well, so that we're not clobbering unrelated state.

Should be a fairly straightforward change.

@Mark-Simulacrum
Copy link
Member

OK, filed #1540 which should close this issue. Really a nice cleanup regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants