Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add a Parking Lot (Drafts)#53

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
jchampio wants to merge6 commits intopostgres:main
base:main
Choose a base branch
Loading
fromjchampio:dev/parking

Conversation

jchampio
Copy link

@jchampiojchampio commentedMar 10, 2025
edited
Loading

[update 5/25: the name of the feature has been changed to Drafts]

Drafts is a special always-open commitfest for the purpose of holding and testing draft patch submissions. Having such a holding area should make it easier for people to keep track of patchsets they're not quite ready to submit for review. This is one possible implementation of#17.

Internally, Drafts is assigned a static ID of zero. This is chosen because a) it does not overlap with Django's defaultAutoField sequence, which begins at one, and b) it requires no updates to the current URL patterns, which match nonnegative integers.

The Drafts entry has the special statusSTATUS_DRAFT so that it does not conflict with pre-existing coded assumptions on what "open", "future", etc. mean.STATUS_DRAFT CFs are excluded from thenum_cfs count for a patch.

The new/close/draft handler is added to swap patches into Drafts. Patches are then removed by moving them to the next open CF, or by closing as usual.

Prior to this patch:

  • CFs with IDs less than the current in-progress CF could safely be assumed closed,
  • patches only ever moved forward through increasing CF IDs, and
  • the latest CF start date determined a patch's "current" CF.

These assumptions all break under the current model. They have been modified:

  • useSTATUS_CLOSED specifically when deciding whether a CF is closed
  • when moving a patch between CFs, allow for the possibility of an existing entry in the junction table
  • a patch's "current" CF is determined by its latest entry date

Roadmap

  • 0001 and 0002 contain prefactoring patches to reduce the amount of work done in the final commit.
  • 0003 contains migrations for the new statuses.
  • 0004 adds Drafts and related logic.
  • 0005 adds anOpen selector to the filter bar UI.
  • 0006 makes Drafts use theOpen selector by default.

TODO

  • ensure all prior assumptions on CF ID are cleaned up
  • should the default filter be changed for the Parking Lot?
  • figure out how we will clean out old closed items

"""SELECT ps.status, ps.statusstring, count(*)
FROM commitfest_patchoncommitfest poc
INNER JOIN commitfest_patchstatus ps ON ps.status=poc.status
INNER JOIN commitfest_commitfest cf ON cf.id=poc.commitfest_id
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm probably missing something obvious, but why was this join added? Thecf doesn't actually seem to be used.

Copy link
Author

Choose a reason for hiding this comment

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

It's used inpatchlist()here, during personalization. (I'm not a huge fan of the long-distance coupling, but...)

ON CONFLICT (status) DO UPDATE SET statusstring=excluded.statusstring, sortkey=excluded.sortkey;
"""),
migrations.RunSQL(
"DELETE FROM commitfest_patchstatus WHERE status < 1 OR status > 9"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems incorrect? I.e. it won't remove anything afaict.

Copy link
Author

Choose a reason for hiding this comment

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

Ah, I meant to add an explanation to the commit but didn't. This is fully cargo-culted from the last change made tocommitfest_patchstatus:535af6e

If this table doesn't need that much pruning in practice, that's fine and I can remove it. But I can't take a look at the current state of the prod database to really know for sure 😁

Copy link
Author

Choose a reason for hiding this comment

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

(Maybe@mhagander knows why this should or should not be done this time around?)

Copy link
Author

Choose a reason for hiding this comment

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

@JelteF Is it possible to take a look at prod just to confirm that this code is unnecessary? I'm happy to remove it.

Simplify the Activity query now that patch links no longer need acommitfest ID.
The upcoming Drafts commitfest will break the assumption that lowercommitfest IDs are always "in the past".
...for the upcoming Drafts feature.
Drafts is a special always-open commitfest for the purpose of holdingand testing draft patch submissions. Having such a holding area shouldmake it easier for people to keep track of patchsets they're not quiteready to submit for review.Internally, Drafts is assigned a static ID of zero. This is chosenbecause a) it does not overlap with Django's default AutoField sequence,which begins at one, and b) it requires no updates to the current URLpatterns, which match nonnegative integers.The Drafts entry has the special status STATUS_DRAFT so that it does notconflict with pre-existing coded assumptions on what "open", "future",etc. mean. STATUS_DRAFT CFs are excluded from the "num_cfs" count for apatch.The new /close/draft handler is added to swap patches into Drafts.Patches are then removed by moving them to the next open CF, or byclosing as usual.Prior to this patch:- CFs with IDs less than the current in-progress CF could safely be  assumed closed,- patches only ever moved forward through increasing CF IDs, and- the latest CF start date determined a patch's "current" CF.These assumptions all break under the current model. They have beenmodified:- use STATUS_CLOSED specifically when deciding whether a CF is closed- when moving a patch between CFs, allow for the possibility of an  existing entry in the junction table- a patch's "current" CF is determined by its latest entry dateTODO:- ensure all prior assumptions on CF ID are cleaned up
The Drafts CF can theoretically accumulate a large number of closeditems. Add a filter that encompasses all open statuses so that Draftswill be able to use it as a default.
This hides abandoned draft patches unless the user specifically asks tosee them.TODO: Does the behavior of the "Clear" button on the filter UI elementneed to change, or does it actually work the way a user would want forDrafts?
@jchampiojchampio changed the titleAdd a Parking LotAdd a Parking Lot (Drafts)May 25, 2025
@jchampio
Copy link
Author

The most recent force-push changes the name to Drafts and adds a default "Open" filter to the special CF, to try to keep it from being overwhelmed by abandoned entries.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JelteFJelteFJelteF left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@jchampio@JelteF

[8]ページ先頭

©2009-2025 Movatter.jp