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

CW-172: "Unpublish on two issues" mechanism causes old betas to become unrecoverable #3103

Closed
hobovsky opened this issue Nov 18, 2023 · 17 comments
Labels
jira-escalated Escalated to engineering Jira board by Andela team

Comments

@hobovsky
Copy link

hobovsky commented Nov 18, 2023

Motivated by this post (but discovered some time ago already, but I cannot find any report):

To force new authors to curate their kata better, the mechanism has been introduced which causes beta kata to be auto-unpublished when they collect two issues during 24h (?) curation period after being published. The mechanism was meant to reduce the amount of newly published, bad kata, which can be fixed by authors and republished. However, it affects also old kata, when author is long gone, and there is no one to republish them.

To reproduce:

  1. Find an old beta kata.
  2. Do anything what causes update of its "modified" timestamp: approve a pending translation, create and approve a fork with a fix, edit it with kata editor and republish, etc.
  3. Raise an issue or two on it (depending if it already has a pending issue or not), or use the "recalculate stats" mender action (if the kata has at least two issues).

At this point, the kata gets unpublished and moved to draft state. If its author is inactive, the kata cannot be recovered.

The effect is deemed to be undesired, because initially it was meant to handle only new kata, while their authors are still around, ready to react to issues.

@Blind4Basics
Copy link

Blind4Basics commented Nov 25, 2023

another case here...: https://www.codewars.com/kata/55a9a6ffd7f21d7d000000e5/discuss

Author gone since 2015 / got unpublished with my issue...


edit: on the other hand, this one didn't get pushed to draft while dfhwze also raised an issue on it while both kata already add an old issue... => ??

@VanessaGreene VanessaGreene changed the title "Unpublish on two issues" mechanism causes old betas to become unrecoverable CW-172: "Unpublish on two issues" mechanism causes old betas to become unrecoverable Nov 28, 2023
@VanessaGreene
Copy link
Contributor

Escalated to CW-172

@kazk kazk reopened this Dec 6, 2023
@kazk kazk added the jira-escalated Escalated to engineering Jira board by Andela team label Dec 6, 2023
@kazk
Copy link
Member

kazk commented Dec 6, 2023

This was introduced in June 2022:

Recently published kata (within the past 48h) is now automatically unpublished if it has 2 unresolved issues.
#2600 (comment)

We overlooked that the "last published at" timestamp is modified by actions other than the original author publishing the kata. Not sure what's best to do. I don't want to change this and affect other stuff, nor add a new field just to track when the original author published the kata.

If its author is inactive, the kata cannot be recovered.

Can you (a mod) publish the draft kata from the editor? Maybe I'm overlooking something, but I don't think I see anything preventing that. Note that we don't allow publishing draft kata with unresolved issues, as proposed in #2598, so the "Publish" button should be disabled until the issues are resolved.

@Kacarott
Copy link

Kacarott commented Dec 6, 2023

Attempting to republish a draft with no issues initially looked like it was working, but then I found myself on a page "You do not have permissions to view this page", and the publish did not work.

@hobovsky
Copy link
Author

hobovsky commented Dec 6, 2023

Can you (a mod) publish the draft kata from the editor? Maybe I'm overlooking something, but I don't think I see anything preventing that.

I think it's never been possible?

I just tried and got the same result as Kacarott: the Publish button is clickable, but after clicking it I end up with "You do not have permissions to view this page" and kata state seems to be not changed.

@kazk
Copy link
Member

kazk commented Dec 7, 2023

Thanks for checking. It took me forever to find why mods can save, but not publish a draft kata you don't own 🤦‍♂️

I'll make these kata recoverable by allowing the mods to publish them like admins.

@hobovsky
Copy link
Author

hobovsky commented Dec 7, 2023

Would love to see the if which caused this :D

@Kacarott
Copy link

Kacarott commented Dec 7, 2023

Will this also allow mods to publish even with open issues? This behaviour happens when some recently updated kata gets some new issues, so it would be nice to be able to directly republish without having to close the issues, republish, then re-open the issues. (especially if adding the issues again would revert it back to draft again lol)

@hobovsky
Copy link
Author

hobovsky commented Dec 7, 2023

When you close the issues, publish the draft, and re-raise the issues, the kata will get unpublished again :D (unless you merge the pending issues into one).

@kazk
Copy link
Member

kazk commented Dec 7, 2023

Will this also allow mods to publish even with open issues?

No, everything else stays the same. But I'm open to suggestions.

I forgot exactly why we decided to disable publishing with unresolved issues, but can't you confirm that the issue is resolved, close the issue, then republish? Isn't that what the author is doing?

@Blind4Basics
Copy link

Blind4Basics commented Dec 7, 2023

can't you confirm that the issue is resolved, close the issue, then republish? Isn't that what the author is doing?

That's what's currently happening, yes.

I forgot exactly why we decided to disable publishing with unresolved issues

There were mostly 2 reasons (maybe I forgot some others, tho):

  • Most (newbie) authors will insta-republish if they can, even without solving the issues, so the kata will definitely get retired even if it has potential. This "delay" makes the beta process less destructive for authors, and less upsetting for beta testers.
  • At some point in the past, this also was an anti-troll-kata/author measure.

@Kacarott
Copy link

Kacarott commented Dec 7, 2023

In most cases when a kata is unpublished, the original author will still be active, and they have easy access to their own kata and are usually the main person responsible for fixing the issues, so it works out well. But in the case where a kata is old and the author long gone, then theoretically mods can fix the issues and then resolve and republish, but it means that the responsibility for fixing the kata lies mostly on the mods, and in the time until its fixed, no one has easy access to the kata, they have to save the url somewhere.

I think it would be a lot more convenient if mods could republish even with open issues, because it allows old kata to still be accessed by other community members who might be interested in fixing it, and it also allows the kata to be republished quickly, before the link is lost.

@Blind4Basics
Copy link

Blind4Basics commented Dec 7, 2023

I think it would be a lot more convenient if mods could republish even with open issues, because it allows old kata to still be accessed by other community members who might be interested in fixing it, and it also allows the kata to be republished quickly, before the link is lost.

Adding a condition to the unpublishing so that it doesn't happen when more than 2 issues are opened would avoid to auto-unpublish the old ones, maybe?

@kazk
Copy link
Member

kazk commented Dec 7, 2023

The change to allow mods to publish drafts was deployed, but I'm still thinking about republishing with unresolved issues and old betas with inactive authors.

Even if we allow the mods to republish with open issues, the kata will be unpublished whenever the current condition is met. I thought maybe we can check the date when the author last signed in, but that doesn't mean anything if they've lost interest in maintaining the kata.

Maybe we can add a way to flag a kata as "abandoned by author" and use it for special casing. If a kata is flagged as "abandoned", we won't auto-unpublish and allow mods to republish with open issues.

@hobovsky
Copy link
Author

hobovsky commented Dec 7, 2023

Maybe another metric could be kata age? Not 48h after "last published at", but (for example) 48h or 5 days or a week after "first published"? Kata seem to have such property because it is visible in "STATS" section of kata details? Or after first non-author solution, or attempt? This way, old kata would not get auto-unpublished regardless of the author's activity.

@kazk
Copy link
Member

kazk commented Dec 8, 2023

Good idea. Let's include when the kata was first published, and only consider unpublishing if the kata was first published at most a week ago. I think it still makes sense to only unpublish if the kata was last published within 48 hours. For example, don't unpublish if the kata had survived 3 days before 2 issues were opened.

Current condition:

total_unresolved_issues >= 2 && last_published_at >= 2.days.ago

New condition:

published_at >= 1.week.ago && total_unresolved_issues >= 2 && last_published_at >= 2.days.ago

@kazk
Copy link
Member

kazk commented Dec 8, 2023

Deployed the change

@kazk kazk closed this as completed Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira-escalated Escalated to engineering Jira board by Andela team
Projects
None yet
Development

No branches or pull requests

5 participants