Skip to content

Conversation

ziegenberg
Copy link
Contributor

@ziegenberg ziegenberg commented Jul 18, 2025

I removed a check for old branches from check_upgrade_savepoints. Because of the move to public with the changes in MDL-83424, the check wasn't working anymore as intended.

I also activated a check already in the code to verify that there is not more than one upgrade function, and ran phpcbf on the file with Moodle code standards.

It's save to assume that this script will not be used for any Moodle
version below 3.0, so let's remove old code accordingly.

Signed-off-by: Daniel Ziegenberg <[email protected]>
…check_upgrade_savepoints

Signed-off-by: Daniel Ziegenberg <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.22%. Comparing base (c1677c0) to head (cf13867).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #363   +/-   ##
=======================================
  Coverage   25.22%   25.22%           
=======================================
  Files          72       72           
  Lines        3271     3271           
=======================================
  Hits          825      825           
  Misses       2446     2446           
Flag Coverage Δ
check_upgrade_savepoints 0.45% <ø> (ø)
checkstyle_manipulations 0.00% <ø> (ø)
compare_databases 2.35% <ø> (ø)
continuous_manage_queues_validation 1.37% <ø> (ø)
define_excluded 1.10% <ø> (ø)
detect_conflicts 1.46% <ø> (ø)
diff_extract_changes 0.00% <ø> (ø)
git_sync_two_branches 2.01% <ø> (ø)
grunt_process 2.96% <ø> (ø)
illegal_whitespace 2.59% <ø> (ø)
list_valid_components 0.00% <ø> (ø)
mustache_lint 2.81% <ø> (ø)
mustache_lint_plugins 1.31% <ø> (ø)
php_lint 1.22% <ø> (ø)
prepare_npm_stuff 1.49% <ø> (ø)
remote_branch_reporter 0.00% <ø> (ø)
setup 0.00% <ø> (ø)
thirdparty_check 1.55% <ø> (ø)
travis-branch-checker 0.00% <ø> (ø)
upgrade_external_backup 1.62% <ø> (ø)
verifications 0.00% <ø> (ø)
verify_commit_messages 2.59% <ø> (ø)
versions_check_set 5.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ziegenberg ziegenberg changed the title Refactor check upgrade savepoint Refactor check_upgrade_savepoint after MDL-83424 Jul 21, 2025
@andrewnicols
Copy link
Contributor

Hi Daniel,

Can you please break this out into multiple commits -- one for each change and especially separating out the phpcbf one. It's impossible to review this in a meaningful way.

You haven't explained the removal of the maturity constants

@ziegenberg
Copy link
Contributor Author

Hi @andrewnicols,

thx for the review.

Hi Daniel,

Can you please break this out into multiple commits -- one for each change and especially separating out the phpcbf one. It's impossible to review this in a meaningful way.

You haven't explained the removal of the maturity constants

This are already three commits:

  1. Remove check for old branch from check_upgrade_savepoints (a860058)
  2. Added check to verify there is not more than one upgrade function to check_upgrade_savepoints (20d5053)
  3. Run phpcbf on check_upgrade_savepoints with moodle code standards (cf13867)

The removal of the maturity constant is explained in the body of the first commit: "It's safe to assume that this script will not be used for any Moodle version below 3.0, so let's remove old code accordingly."

Greetings,
Daniel

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.

3 participants