Skip to content

fcp merge: allow all known users to start team-specific FCPs#352

Merged
Mark-Simulacrum merged 1 commit into
rust-lang:masterfrom
RalfJung:fcp-with-team
Jun 6, 2026
Merged

fcp merge: allow all known users to start team-specific FCPs#352
Mark-Simulacrum merged 1 commit into
rust-lang:masterfrom
RalfJung:fcp-with-team

Conversation

@RalfJung

@RalfJung RalfJung commented May 24, 2026

Copy link
Copy Markdown
Member

Helps with #312 for the case of fcp merge team. The issue remains unfixed for a plain fcp merge.

This PR allows everyone who is on any team to start FCP for any team with the "named team" syntax. IMO this is fine, we trust the people we have on teams so it's not worth checking whether the poster is on one of the teams included in the FCP. Note that already before this PR, anyone who is on a team that is mentioned in a label is allowed to start FCP for any team.

Note that I only build-tested this, I don't have a setup to actually run the bot.

Comment thread src/github/nag.rs
if all_team_members.iter().find(|&u| u == &author).is_none() {
// FIXME: post an error message in the issue.
info!("poll requester ({}) is not a known user", author.login);
return Ok(());

@RalfJung RalfJung May 24, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it enough to just return Err(DashError(CommentableError(...))) here to get a proper error message?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so -- not entirely sure, but my guess is that the right thing is to leave a comment inline here via:

                let comment = RfcBotComment::new(&issue, CommentType::Error { message });
                comment.post(None)?;

But it's not entirely obvious to me how that gets de-duped when rfcbot re-polls comments for additional processing. Maybe that's handled above this function (I sort of hope so...).

I'm personally OK merging without it, IIUC we don't currently return a comment error saying we failed to run the fcp because the person didn't have permissions to do so?

@RalfJung RalfJung Jun 3, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't currently return a comment error saying we failed to run the fcp because the person didn't have permissions to do so?

Yeah we don't, and that has led to a lot of confusion over the years because the bot regularly thinks people don't have permission when they really should. This is the underlying cause of #312.

But indeed we don't have to fix that in this PR.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Just testing...

@rust-rfcbot fcp merge T-lang

@Mark-Simulacrum

Copy link
Copy Markdown
Member

And presumably this would work...

@rust-rfcbot fcp merge T-infra

@Mark-Simulacrum

Copy link
Copy Markdown
Member

@rust-rfcbot fcp merge infra

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Ah, I think I need the labels on the issue still? I'll avoid spamming further but in any case from the commands above it seems like it's at least not a regression to not give output as comments; the in-logs output from those is all "command author (Mark-Simulacrum) doesn't appear in any relevant subteams" -- probably because there are no relevant subteams right now (no labels on this PR).

@Mark-Simulacrum Mark-Simulacrum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll go ahead and approve this. I'll merge it when I have more time to debug any issues that come up (probably this weekend).

@Mark-Simulacrum
Mark-Simulacrum merged commit bd7312d into rust-lang:master Jun 6, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

Seems to work: rust-lang/rust#156999 (comment)

@RalfJung

RalfJung commented Jun 7, 2026

Copy link
Copy Markdown
Member Author

Team member @Mark-Simulacrum has proposed to merge this.

We should probably adjust that text.^^

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 this pull request may close these issues.

2 participants