Problem/Motivation
This is a follow-up issue to few Slack discussions and a previous discussion from this issue #3254602-10: Using GitLab labels for issues on Drupal projects.
Once we move issues to Gitlab, it would not be possible (by default) for all contributors to change issues labels like status labels or priorities labels. This possibility is a part of the current contribution workflow and I think we should allow these changes also once we move issues to Gitlab. Otherwise it will add a lot more work for maintainers.
Some options how to solve this were mentioned in #3254602: Using GitLab labels for issues on Drupal projects. One of these options was to create a custom bot. Another was to grant everyone "reporter" access on the project (with some cleanup, etc).
Remaining tasks
Decide the best solution and implement it.
Comments
Comment #2
fjgarlin commentedPossible options:
- Triage bot (eg: https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage) - this is only possible if inside an issue.
- Custom integration via custom commands (we are experimenting with this at the moment) - this is only possible if inside an issue.
- Reporter access to users (with clean-up) - this would allow issue edits and board drag and drop for example. Where do you request the access? Issue I guess too...
[edit: added some comments to each option]
Comment #3
klausiCan we give all users the reporter role globally so that they can edit and change tags on all issues in all projects?
That would be the same behavior as we have on drupal issues right now.
Comment #4
drummThe triage bot is good at reacting to issues in a certain state, and runs on cron. GitLab.com/gitlab-org has their triage bot rigged up to react to webhooks, so actions are near-instantaneous. Our Drupal integration already handles reacting to webhooks and custom slash commands, so it will be more maintainable.
Regardless, the usual drawbacks of custom slash commands apply. There is no interface other than knowing the right thing to type, it is very much a power-user feature.
#3262293: Grant GitLab “reporter” access to project maintainers with “edit project” or “maintain issues” has some expansion of this role, not any sort of requesting system, other than each project adding maintainers.
We tried this for issue forks, and it went badly. Some part of the GitLab internals created internal queue items at an overwhelming rate as we added people. I don’t expect that GitLab to improve scalability here, as it is a legitimately unusual use case for them.
Comment #5
drummThe way GitLab.com/gitlab-org handles this is a separate site that contributors to manage labels and do other actions, https://contributors.gitlab.com. We have some capability to build the parts we need in Drupal, like we have needed for credit & forks.
Comment #6
catchCould we do this for people who've posted on a gitlab issue though maybe? e.g. you post once without the ability to change labels, but once you've done that, you can.
Comment #7
fjgarlin commentedThat logic (#6) would be doable as we already have the webhooks.
We could add "reporter" role to the repo with a X-month expiration date. I'll let @drumm weigh in on this as there may be some drawbacks.
Comment #8
cmlaraSee my comments in https://www.drupal.org/project/infrastructure/issues/3254602#comment-154...
TLDR: Security concerns related to giving any random person reporter status.
Comment #9
fjgarlin commentedAllow some labels to be settable by anyone: https://gitlab.com/gitlab-org/gitlab/-/work_items/15384
No activity in a few years though
Comment #10
hestenetReposting a comment I made in a thread from the AI initiative team as they start to get used to what this transition means.
Excerpt summarizes multiple issues that could be addressed by the reporter role grant, not just the issue label one in the summary here
#6 and #7 do seem promising if we can carefully review concerns raised in #8
The reporter role grant would be less 'hacky' than:
The fact that GitLab themselves can't convince their product leads of the importance of these features and has to make their own separate UI does not encourage me that we can expect a fix coming from them.
So my preference on next steps would be:
Comment #11
hestenetA TLDR; summary of #8
IMO, the label editing concern is not so much more risky than what d.o issues are like today. We have many duplicate/slightly mispelled/poorly defined labels being created, but we are able to collectively manage the hygiene of this. It's true that people can't arbitrarily change existing labels on D.O, but overall I'd consider this a non-blocker/lesser evil of granting reporter.
However, it looks like the first concern is very legitimate, if this Claude AI summary is accurate...
This can be confirmed: https://docs.gitlab.com/user/project/issues/confidential_issues/#who-can...
The 'Guest' role would be safe, but doesn't have most of the permissions we want.
Sigh.
I think that means we are back to triage bot+slash commands and/or UI built into the fork management/contrib record page.
At least for anything that is a true workflow blocker, and not just a matter of getting used to the norms in GitLab..
Comment #12
dwwI think it'd be cruel to expect maintainers to follow every issue and track the status. Maybe it's 20+ years of practice, but if we can't "crowdsource" the changing of the status as an issue progresses through its lifecycle, and only expect maintainers/committers to see stuff once it reaches "RTBC", we're in big trouble. It'd be clunky and weird to change the issue meta data at the contribution record page, but if that's the only viable option, so be it. triage bot + slash commands sounds more "inline" with how we do stuff now -- add a comment at the issue when you've addressed feedback and set it back to "Needs review", or add a review, point out problems, and add a comment to set to "Needs work", etc. So something like
/status Needs workand if I put that on a comment, some bot will notice and change the label if I don't have an elevated role in the project...Priority I care less about. If only maintainers can change that, so be it. 😉 Folks can comment they think it should be changed, but a maintainer/developer/reporter can actually make the change if agreed. Same for Category, Component, etc.
But status seems like an absolute deal-breaker to me.
Comment #13
dwwMeanwhile, I don't know if moving issues between projects is at all even possible in GitLab. I think we probably have to give up on that workflow entirely, right? If something is "mis-filed" to the wrong project, someone has to copy/paste the relevant bits and start over in a new issue, correct? So if some deprecated module moves out of core, we just "close outdated" all the issues and folks have to start fresh with new issues in the contrib project, huh? Maybe this should be spun off into another issue? The project isn't really a "label" in the GitLab sense, it's a more fundamental property of the issue...
Comment #14
dwwRe: #11: Related (but sort of off topic for this issue), does that mean that all of us the core subsystem maintainers (who are either developer or reporter) are going to be able to view all confidential security issues submitted for core? Seems like it. That's not currently how access to sec.d.o works. I'm generally only added to security issues for "my" parts of core. I don't *think* anyone would mind if subsystem maintainers can see all core sec issues. But if that is or becomes true, it's something we need to be more explicit about in the rules / responsibilities for subsystem maintainers ("and I solemnly swear to keep all confidential security issues strictly confidential", etc).
Comment #15
fjgarlin commentedThe reporter role fixes most of the issues reported above. Maybe we don't need to grant reported role to everyone, but only to certain trusted people within the projects (similar to the "sub system maintainer" role, which only have a subset of responsibilities). 99% of contrib projects will be fine with this, and maybe this is a new role that core could adopt and grant some users ("trusted reporter" or however you want to call it). Anyway, this was just thinking out loud.
Doing integrations and listening to commands is easy. We are already doing it for some commands as a trial. However, we first want to identify the real needs. For example: changing labels - do we need changing all labels or do we just need "rtbc" so maintainers see this?
Comment #16
poker10 commentedRe: #14: Yes, this is an issue - at least for core - where this is not exactly the desired behavior. I think it was discussed briefly in Chicago, but not sure an issue was created for it yet.
Not related to comment 14, but I am curious if the priority of this issue should be at least Major, given bigger projects are migrated now (AI, ..) and this will definitelly slow down contributions (and/or add additional work to maintainers) until resolved.
Comment #17
dwwRe #15: I don't think even the subsystem maintainer community should be expected to track every issue in the core queue to make sure the status is always accurate. I think "everyone" needs to be able to change the status. Sounds like Reporter is going to subvert the point of confidential issues, which would be bad. So we need a safe way for any "guest" to be able to at least change the status label.
Comment #18
poker10 commentedThat is a good question and probably Gitlab has some ways to do a lot of things differently with the same goal (as described here https://www.drupal.org/node/3571934). But I think that if we allow changing one label, then we should probably allow to change all labels, as that is something contributors are used to and ideally we want to keep the contribution workflow as easy and straightforward as possible, so that a lot of tasks are still on contributors (and the responsibility is not moved to maintainers). I personally don't think we should completely switch to the workflow commonly used on GitLab/GitHub - on d.o. we had some benefits towards open contributions and I think that is a big plus for the Drupal community.
Comment #19
dwwps. Also re: #15: I don't want to have to be the only one to track the status of all issues in all my contrib projects, either. 😅 I'm not sure "99% of contrib projects will be fine with this" is accurate, either. 😉 I strongly vote for a generalized solution, across the entire ecosystem, that allows "anyone" to at least toggle the Status label among the per-project defined values.
Comment #20
fjgarlin commented1% of Drupal contrib projects is nearly 400 projects 😅. I don't have the exact numbers handy, but when checking the number of issues per project before the migration, +36K projects have less than 100 issues in total. Most of those have very few maintainers that "own" very few projects. That's what I meant by that 99%. The 1% of Drupal projects that don't fall in this category are probably really important to the ecosystem and we need to provide the right tools/workflow so contribution continues to be easy (or even is accelerated!), but again, even if available, it might not be needed for many other contrib projects.
In any case, what I mean is that we need to identify the real needs here (whether it's RTBC label, or status, or whatever comes out of trying for real the new issues and the workflow and the implications). This is why we have the opt-in phase. Modules that opted in knew that we are in early days and their feedback is critical.
We can build custom commands or add bots, etc. None of them will be as "neat" as the default GitLab experience, which offers autocomplete suggestions. Maybe some needs are worth trying to contribute upstream, maybe some need to be custom, but let's find out what exactly first.
Comment #21
fjgarlin commentedRe labels, and coming back to comment #2 here, to stay focused on the issue.
Fixing upstream in Allow some labels to be settable by anyone would be the best place.
But if that doesn't happen
1. Triage bot, still an option?
2. Custom integration - we could do (no autocomplete):
3. Reporter access seems to have security implications, so probably worth looking at in a different issue
Doing 2 is not a huge effort, but we'll need to document it and we need to know that there is no autocomplete for the command nor the labels, so users will need to know that it's there.
If this is agreed/accepted, it's something that I could work on.
Comment #22
fjgarlin commentedWe were talking "Reporter" a lot, but what about "Planner"?
https://docs.gitlab.com/user/permissions/#default-roles
Comment #23
poker10 commentedAccording to this: https://docs.gitlab.com/user/permissions/#project-planning , planner role is allowed to see confidential issues.
Comment #24
fjgarlin commented#3586372: Allow security team members to make the issue confidential to track information re confidential issues.
We'll continue the focus on labels on this issue.
Comment #25
kristen polThis would be amazing if the community could update labels. This is our biggest pain point at the moment. Thanks everyone!
Comment #26
hestenetI would say we should move forward on option 2 above, @fjgarln.
Although (and I know its more work) I think adding a manage labels tab to the contrib record that uses js to pull in the current label list and allow changing from there would be a lot less prone to errors/multiple redundant comments as people try to use the slash commands.
Comment #27
mradcliffePosting my suggestion here as well, drupalbot (or something like it) could manage removing labels like
state::when an issue is closed after 2 weeks of inactivity.Needing to remember to remove or change state labels when resolving an issue is going to be difficult for people (like me).
Comment #28
fjgarlin commentedRe #26 - I can start working on it. I can start with the commands and start also thinking about the UI. Rather than adding to existing screens I'd rather have tabs. So instead of adding to the contribution record screen (fully managed by a separate module) or the fork management, we could have a "Issue metadata" tab, independent from the others but accessible via the top tabs.
I'd like to have @drumm's thoughts on this too, regarding the commands in #21 and possible UI, in case he has some suggestions.
--
Re #27 - Many projects might not choose to continue using the "state::" labels and use the status fields provided by GitLab.
Comment #29
mradcliffeI thought the (newish) Status fields weren’t going to be used at first? Or are we going to change to that?
Regardless anything that would help automate removing labels that need to be removed from the standard work flow would be great.
I do not think we want to encourage people to deviate from a standard work flow as that will increase the burden for learning contribution for new folk if every project is encouraged to do their own thing.
Comment #30
fjgarlin commentedThe idea is that each maintainer will choose what they want to use. Contrib projects have very different needs depending on the volume of issues, number of contributors, etc.
We want to try what the flow with "standard" GitLab issues feels like, what are the needs/problems/issues, etc, before starting to change and add customizations to our GitLab integration.
Comment #31
fjgarlin commentedAgain, let's try to keep the focus of this issue purely on label management (via UI or custom commands). For other issues feel free to comment on slack or open a new issue, otherwise it's difficult to keep track of things.
Comment #32
mradcliffeSorry, I thought that’s what I was doing by suggesting that drupalbot could be used to manage labels based on work flows per #21 above.
Comment #33
fjgarlin commentedNo worries. We'll work on the basics first and then see if that covers the needs. If we need to iterate or even work on new integrations they can be follow ups. I'll try to get the MVP version of this in this issue.
Comment #34
hestenetComment #35
drummMoving to Drupal.org customizations where the implementation for issue management UI on new.drupal.org and site-wide slash commands will land.
For a UI, we’ll have to think through what else to add for tracking. The basics will be someone adds the label via new.drupal.org, then the issue will be updated with
We’ll want to know who did that, so there will also need to be a note before or after that explaining who did something. We can post that note as either drupalbot, or as the person taking the action. Posting as the person taking the action would probably be best, so crediting is easier. Like any other comment posted by someone in GitLab, they would have edit access to it after posting.