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

feat: show expired WG/RG drafts at WG/RG Documents page #4252

Merged
merged 5 commits into from Jul 26, 2022

Conversation

smyslov
Copy link
Contributor

@smyslov smyslov commented Jul 23, 2022

This commit addresses issue #3078 (and #3171, which is duplicate).
The idea is that a new community filter rule type is introduced - this rule filters expired drafts for a particular group. Chairs can add this rule or remove it as well as they can add any other type of filtering rule.
The rule is pretty simple, but there are some post-processing in group/view.py. In particular:

  • drafts that have "draft-iesg" state "dead" are not shown
  • drafts that have "draft-stream-ietf" or "draft-stream-irtf" state "dead" are not shown
  • expired drafts, that are only related to the group are not shown

Commit includes two migration files - ietf/community/migrations/0008_add_group_exp_rule.py was created automatically by makemigration and ietf/community/migrations/0009_add_group_exp_rule_to_groups.py was written manually. The latter updates database adding new rule to every WG/RG. This file can be dropped if we don't want this rule to silently appear in every WG/RG.
Commit also modifies tests to include testing this type of rule.

@rjsparks
Copy link
Member

I think this is taking a very reasonable approach.

We need tests of the new concept though. The setup that tests the WG document page should build some docs that are expired (and some that are dead) and make sure the right thing happens when the new rule is both present and absent.

if rule_type in ['group', 'group_rfc', 'area', 'area_rfc']:
restrict_state("draft", "rfc" if rule_type.endswith("rfc") else "active")
if rule_type in ['group', 'group_rfc', 'area', 'area_rfc', 'group_exp']:
restrict_state("draft", "rfc" if rule_type.endswith("rfc") else "expired" if rule_type.endswith("exp") else "active")
Copy link
Member

Choose a reason for hiding this comment

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

This will be hard for future contributors to trust (what's the precedence of each if?). Requires a moderate python-steeping to know.
I think it would be better to make this more verbose and split the computation of the wanted state slug to multiple lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, will try to split.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made the changes you requested - splited the complex condition into two "if" statements and added the tests for both community and group tests (the latter is needed because of some post-filtering, which doesn't show expired drafts if they are dead). I also fixed a logical error - extraneous check whether the "draft" slug is in "auth-rm" or "ietf-rm" (as far as I understand this can never happen when the "draft" is "expired"). Correct me if I'm wrong - the states of the document are cumbersome and I didn't find clear explanation of their relations. I also fixed the last minute error when I renamed auto-generated migration files and forgot to also change "dependencies' in the latter of them. I think the PR is ready for merging.

@rjsparks
Copy link
Member

@larseggert, @evyncke This includes a migration to add this community rule to all active rg/wg. Any groups that don't want expired drafts to show on their group/document pages would need to remove the rule. Is that acceptable to the IESG?

fix dependency on migration file name
Simplify condition statements
@larseggert
Copy link
Collaborator

larseggert commented Jul 25, 2022

I don't have a strong feeling here. We got to pick one default, and enabling it seems OK to me.

@evyncke
Copy link
Contributor

evyncke commented Jul 25, 2022

Same opinion as Lars' one: let's display expired I-D by default with this rule. Moreover, the changed behaviour will be visible to the WG, i.e., then chairs / AD can update to their taste.

@smyslov smyslov requested a review from rjsparks July 26, 2022 07:30
@rjsparks rjsparks merged commit a5f27b0 into ietf-tools:main Jul 26, 2022
@smyslov smyslov deleted the exp-drafts branch July 26, 2022 18:48
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants