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

Decision Process Implementation #1680

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

joulei
Copy link

@joulei joulei commented Jan 26, 2023

Co-authored by @mcass19

This a working draft for the decision process implementation.
Our intent is to share this POC with merge and hold to get a first round of feedback.

As of now, it only processes the first voting command.
We're leaving out commented the scheduled job insertions and such.

image

Next steps are:

  • implement voting and updating the scheduled job based on voting results
  • figure out how to solve team changes (i.e., if one team is provided in first voting and later on more people/teams are added to the decision.

Cargo.toml Outdated Show resolved Hide resolved
* Move dependencies only to dev

* Limit to team member when initializing the process

* Display @ on user names in table
parser/src/command/decision.rs Outdated Show resolved Hide resolved
#[postgres(name = "merge")]
Merge,
#[postgres(name = "hold")]
Hold,
Copy link
Member

Choose a reason for hiding this comment

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

I think to start we should try to mostly match rfcbot, which largely supports two resolutions: merge and close. We can extend further in the future though.

Copy link

@mcass19 mcass19 Mar 3, 2023

Choose a reason for hiding this comment

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

Agree on adding close command but we should keep hold as specified in the doc we based our impl: https://lang-team.rust-lang.org/decision_process/examples.html, because it's the way to "pause" the process, wdyt?

In the current code, hold is not doing that either so will need to fix it as well

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with extending the process a little per the proposal, though let's avoid delaying too much as a result.

#[derive(Debug, Eq, PartialEq)]
pub struct DecisionCommand {
pub resolution: Resolution,
pub reversibility: Reversibility,
Copy link
Member

Choose a reason for hiding this comment

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

I would probably drop reversibility from this first iteration -- we'll want it eventually, but we don't need it for the core logic and if we do have it we'll want a way to set it I think...

@@ -273,4 +274,20 @@ CREATE UNIQUE INDEX jobs_name_scheduled_at_unique_index
name, scheduled_at
);
",
"
CREATE TYPE reversibility AS ENUM ('reversible', 'irreversible');
Copy link
Member

Choose a reason for hiding this comment

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

This feels like it'll be needlessly restrictive going forward, and I at least am not familiar enough with postgres types to be confident that we're not adding some mostly one-way door decision here. Can we stick with storing this in just a text field?

It's not clear to me whether we ever actually need to query by this field, in which case just adding it to a single JSON blob we store for these may be better -- then we can even store all of this into issue data, rather than a new table. We should never have so many FCPs they don't fit in memory etc.

Copy link

Choose a reason for hiding this comment

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

Yeah agree, we can add a jsonb data field and store just resolution there for now, and in a future iteration add reversibility and more. Wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

That sounds good to me.

src/github.rs Outdated Show resolved Hide resolved
src/handlers/decision.rs Show resolved Hide resolved
src/handlers/decision.rs Show resolved Hide resolved
src/handlers/decision.rs Outdated Show resolved Hide resolved
@joulei joulei force-pushed the decision-process-impl branch 2 times, most recently from 9c72e82 to 555cb07 Compare March 8, 2024 12:28
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.

4 participants