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

Internal: Ensure Behat tests abort if updates fail with requirements errors #3690

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

Kingdutch
Copy link
Member

Problem

Drush requires the -y flag to run in automated environments because it prompts with the list of available updates. However it also does an update requirements check which gets skipped by the same -y option.

This means that our update path in the CI doesn't fail if there are requirements errors (even though it should, because it causes errors later in tests that are hard to debug) and our tests against fixture dumps for specific update scenarios also don't fail.

Solution

Until Drush provides a better solution in
drush-ops/drush#5806. We manually go through the update output and errors if the key sentence for requirements errors is spotted.

Issue tracker

Internal no issue

Theme issue tracker

[Required if applicable] Paste a link to the drupal.org theme issue queue item, either from socialbase or socialblue. If any other issue trackers were used, include links to those too.

How to test

Definition of done

Before merge

  • Code/peer review is completed
  • All commit messages are clear and clean. If applicable a rebase was performed
  • All automated tests are green
  • Functional/manual tests of the acceptance criteria are approved
  • All acceptance criteria were met
  • New features or changes to existing features are covered by tests, either unit (preferably) or behat
  • Update path is tested. New hook_updates should respect update order, right naming convention and consider hook_post_update code
  • Module can be safely uninstalled. Update/implement hook_uninstall and make sure that removed configuration or dependencies are removed/uninstalled
  • This pull request has all required labels (team/type/priority)
  • This pull request has a milestone
  • This pull request has an assignee (if applicable)
  • Any front end changes are tested on all major browsers
  • New UI elements, or changes on UI elements are approved by the design team
  • New features, or feature changes are approved by the product owner

After merge

  • Code is tested on all branches that it has been cherry-picked
  • Update hook number might need adjustment, make sure they have the correct order
  • The Drupal.org ticket(s) are updated according to this pull request status

Screenshots

Release notes

Change Record

Translations

@Kingdutch Kingdutch added status: needs review This pull request is waiting for a requested review prio: medium type: repository Improvements to working with the repository (e.g. templates, README files, or workflows) team: guardians labels Jan 10, 2024
@Kingdutch Kingdutch added this to the 13.0.0 milestone Jan 10, 2024
Copy link

mergeable bot commented Jan 10, 2024

Thanks for contributing towards Open Social! A maintainer from the @goalgorilla/maintainers group might not review all changes from all teams/contributors. Please don't be discouraged if it takes a while. In the meantime, we have some automated checks running and it might be that you will see our comments with some tips or requests to speed up the review process. 😊

Drush requires the -y flag to run in automated environments because it
prompts with the list of available updates. However it also does an
update requirements check which gets skipped by the same -y option.

This means that our update path in the CI doesn't fail if there are
requirements errors (even though it should, because it causes errors
later in tests that are hard to debug) and our tests against fixture
dumps for specific update scenarios also don't fail.

Until Drush provides a better solution in
drush-ops/drush#5806. We manually go through
the update output and errors if the key sentence for requirements errors
is spotted.
@Kingdutch Kingdutch force-pushed the feature/check-update-success-in-behat branch from e9e2a77 to 0f786ec Compare January 10, 2024 10:01
@Kingdutch
Copy link
Member Author

This change is small, limited to our CI and will be actually tested by improving the current failure in #3678 so merging this without review.

@Kingdutch Kingdutch merged commit 268a1f0 into main Jan 10, 2024
186 of 187 checks passed
@Kingdutch Kingdutch deleted the feature/check-update-success-in-behat branch January 10, 2024 10:50
@ronaldtebrake ronaldtebrake modified the milestones: 13.0.0, 13.0.0-alpha1 Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio: medium status: needs review This pull request is waiting for a requested review team: guardians type: repository Improvements to working with the repository (e.g. templates, README files, or workflows)
2 participants