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

fix initial revision for policy posts & improve seed error reporting #1201

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

Oaphi
Copy link
Member

@Oaphi Oaphi commented Sep 16, 2023

This PR (followup for #1175) addresses the root cause of seeded posts not having an initial revision: owner user is required for the create_initial_revision validation callback to run successfully. I opted to assign the seeded posts to the system (-1) user as it seems the most fitting (let me know if y'all want me to guard against not finding the system user - I've cut the corner here as not having the system user at this point means something's very wrong already).

The PR also includes some error reporting improvements:

  • Validation status when creating posts should be checked before reporting success (some of the seeded posts such as "Privacy Policy" fail the min title length validation, should be addressed by Skip min title validation for help/policy posts #1197);
  • Seeds now collect the number of errored posts and report it after the run wraps up among other stats;

@Oaphi Oaphi added area: ruby Changes to server-side code complexity: easy Issues that should take limited effort to resolve/fix/build. labels Sep 16, 2023
@Oaphi Oaphi self-assigned this Sep 16, 2023
@Oaphi Oaphi force-pushed the oaphi/posts-seeds-fixes branch from 99f6393 to e269c95 Compare September 16, 2023 05:40
@Oaphi Oaphi marked this pull request as ready for review September 16, 2023 05:50
@Oaphi Oaphi requested a review from Taeir September 16, 2023 05:51
@cellio cellio requested a review from a team October 2, 2023 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ruby Changes to server-side code complexity: easy Issues that should take limited effort to resolve/fix/build.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants