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

[feature] Lang Agenda — Proposed FCPs: include concerns and FCP notes #1596

Merged

Conversation

chazkiker2
Copy link
Contributor

@chazkiker2 chazkiker2 commented Mar 23, 2022

Description

See an example of the new lang agenda (with updated FCP details) in this HackMD

@chazkiker2
Copy link
Contributor Author

@rustbot claim

src/github.rs Outdated Show resolved Hide resolved
@chazkiker2 chazkiker2 marked this pull request as ready for review March 23, 2022 02:33
@chazkiker2
Copy link
Contributor Author

r? @nikomatsakis @Mark-Simulacrum

Concerned about a couple things:

  1. See this comment: https://github.com/rust-lang/triagebot/pull/1596/files#r832791113
  2. Seems like I trip GitHub's rate limit within just a handful of runs — may have just been b/c I was running locally over and over but it could also be a problem
  3. Would love your guidance @Mark-Simulacrum on the "where everything lives" aspect of this... feels like the engineering could be improved quite a bit

src/github.rs Outdated Show resolved Hide resolved
src/github.rs Outdated Show resolved Hide resolved
src/github.rs Outdated
let initiating_comment_html_url =
format!("{}#issuecomment-{}", issue.html_url, fk_initiating_comment,);
let init_comment = issue
.get_comment(&client, fk_initiating_comment.try_into()?)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should I just make IssueDecorators.fpc_details.fk_initiating_comment a usize from the get-go?

src/github.rs Show resolved Hide resolved
Comment on lines +8 to +9
- [**Tracking Comment**]({{issue.fcp_details.bot_tracking_comment_html_url}}): {{issue.fcp_details.bot_tracking_comment_content}}
- [**Initiating Comment**]({{issue.fcp_details.initiating_comment_html_url}}): {{issue.fcp_details.initiating_comment_content}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wondering what happens if issue.fcp_details is passed in as None

@nikomatsakis
Copy link
Contributor

Seems like I trip GitHub's rate limit within just a handful of runs — may have just been b/c I was running locally over and over but it could also be a problem

That's not great. That said, I typically run this script once per week...

...still, I wonder if there's a way to combine this into a single graphql query or something.

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

Overall, seems kind of like I expected! Left some nits and questions.

src/agenda.rs Outdated Show resolved Hide resolved
src/github.rs Outdated Show resolved Hide resolved
src/github.rs Outdated Show resolved Hide resolved
src/github.rs Outdated Show resolved Hide resolved
src/github.rs Outdated
);
let bot_tracking_comment_content = quote_reply(&fcp.status_comment.body);
let fk_initiating_comment = fcp.fcp.fk_initiating_comment;
let initiating_comment_html_url =
Copy link
Contributor

Choose a reason for hiding this comment

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

probably orthogonal, but I'm surprised we don't use some library for this sort of thing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

are you referring to accessing the comment link or to the quote_reply function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unrelated but I'm similarly surprised we're using a home-baked parser rather than a command line library (like clap) to take in commands — surely wouldn't be too hard to treat a github comment like command line input

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant something like https://crates.io/crates/octocrab

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is kind of interesting, especially b/c octocrab is in here, but nothing in src/github.rs seems to use it

triagebot/src/handlers.rs

Lines 250 to 255 in 2a37c45

pub struct Context {
pub github: GithubClient,
pub db: crate::db::ClientPool,
pub username: String,
pub octocrab: Octocrab,
}

src/github.rs Show resolved Hide resolved
@Mark-Simulacrum
Copy link
Member

@chazkiker2 Can you say if this seems ready to go on your end? My feeling is that we should probably go ahead and merge presuming it mostly works, and then if there's bugs to be fixed or rate limiting etc we can either revert or fix those depending on complexity.

@chazkiker2
Copy link
Contributor Author

@Mark-Simulacrum shoot — sorry, kinda lost track of this.

If you think the include_fcp_details param is fine where it is for now as per this comment, then I think this is pretty much ready to move forward even though I feel like it's not quite as refined as I wish it were...

@Mark-Simulacrum
Copy link
Member

Yeah, it seems a little messy, but since we don't have obvious next steps we can probably merge. With #1599 there might be simplification possible but seems also a little difficult to put a finger on.

I'll merge this tomorrow to let some of the changes I merged today go live first, I think.

@chazkiker2
Copy link
Contributor Author

@Mark-Simulacrum okay sounds like a decent plan :). sorry for the slowness!

@chazkiker2
Copy link
Contributor Author

@Mark-Simulacrum btw i don’t think i have merge access on this repo, so feel free to merge in whenever you’re ready

@Mark-Simulacrum Mark-Simulacrum merged commit 0fc41f5 into rust-lang:master Apr 13, 2022
@chazkiker2 chazkiker2 deleted the feature/proposed-fcp-details branch April 13, 2022 22:44
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.

lang agenda: include concerns and FCP notes
3 participants