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: UHF-XXXX: Fix failing tests by fixing dependency-related errors. #1517

Merged
merged 5 commits into from
Oct 23, 2024

Conversation

jiisuominen
Copy link
Contributor

@jiisuominen jiisuominen commented Oct 22, 2024

UHF-XXXX

Some of the latest refactorings created a circular dependency that wasn't issue when make fresh was run, but make new failed with missing services error.

This breaks automatic testing because the dump cannot be created when make new fails.

What was done

  • Fixed circular dependency by refactoring Event handling to separate module and updating all code to use the new module.
  • This fixes the make new issue, but make fresh fails because the new module is not installed yet when something needs it.
  • I did build the testing artifact with this branch, and the fact that the tests action finishes fine, shows that this fixes the underlying issue with make new.
  • Don't really know how Sonar finds the refactoring to be a duplicate code, but it is what it is.

How to install

  • Make sure your instance is up and running on correct branch.
    • git checkout UHF-0000_insert_correct_branch
    • make fresh
  • Run make drush-cr
  • image
    No matter what I do, make fresh fails with above error.

I've tried clearing caches in different places, but nothing seems to fix this. When the process fails with above error, one can make shell into the container and run drush deploy there manually. This finishes the process and everything works.

How to test

  • Run make new, see that site gets installed
  • Run make fresh, probably will fail with the error above
  • Make shell -> drush cr && drush deploy, watch process finish just fine.
  • Check that code follows our standards

Copy link

sonarcloud bot commented Oct 23, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
71.2% Duplication on New Code (required ≤ 30%)

See analysis details on SonarCloud

@jiisuominen jiisuominen merged commit 4eca6e9 into develop Oct 23, 2024
2 of 3 checks passed
@jiisuominen jiisuominen deleted the feature/UHF-XXXX-depencency-issues branch October 23, 2024 06:50
hyrsky added a commit that referenced this pull request Nov 26, 2024
* UHF-10354: new cron entrypoint (#1506)

* UHF-10354: Remove base.sh

* UHF-10354: Remove migrate-hearings.sh

* UHF-10343: Updating the liikunta_suunnistuskartta_avustus forms texts (#1513)

* UHF-10343: Update liikunta_suunnistuskartta_avustus forms texts to new version

* UHF-10343: Fix issue with application search where the search button and the clear the search button have no spacing in between

* UHF-10343: Fix issue with unneccessary wrapper around the application search form styles

* UHF-10248: Run tests against automatic updates (#1516)

* UHF-10131: sentry (#1515)

* UHF-10131: Repurpose grants_logger module for sentry logging

* UHF-10131: Fix typo

* UHF-10131: Code deduplication

* UHF-10131: Capture exceptions

* UHF-10131: Remove comment

* feat: UHF-XXXX: Fix failing tests by fixing dependency-related errors. (#1517)

* Refactor events to custom module to get installation to succeed
* Make some services use lazyloading with events service.
* Add update hook & make sure drush deploy is run 1st.
* PHPCS
* Try to clear caches after importing DB to no avail.

* fix: Disable pubsub (#1518)

* must be completely commented out (#1519)

* UHF-10276: Replace old dialog.js implementation from forms (#1511)

* UHF-10276: Replace the dialog.js functionality with custom dialog

* UHF-10276: Fix translations, style the close button on the dialog

* UHF-10276: Add focus trap for the dialog

* UHF-10276: Refactor dialog and survey styles together

* UHF-10276: Add comment about survey similarities

* UHF-10276: Refactor dialog to a separate file so it can be used by other grants modules, refactored dialog.js away from grants_profile, add translations and remove old dialog.js

---------

Co-authored-by: Janne Suominen <[email protected]>

* Removed article permissions (#1522)

* Automatic update (#1520)

* Update configuration

* Revert unwanted changes from configuration

* Revert unwanted changes from configuration

* Update .gitignore

* Removed article permissions

---------

Co-authored-by: Tero Elonen <[email protected]>
Co-authored-by: Janne Suominen <[email protected]>
Co-authored-by: tuutti <[email protected]>

* UHF-10276: Fix translations on webform.form.unsaved.js (#1525)

* UHF-10276: Replace the dialog.js functionality with custom dialog

* UHF-10276: Fix translations, style the close button on the dialog

* UHF-10276: Add focus trap for the dialog

* UHF-10276: Refactor dialog and survey styles together

* UHF-10276: Add comment about survey similarities

* UHF-10276: Refactor dialog to a separate file so it can be used by other grants modules, refactored dialog.js away from grants_profile, add translations and remove old dialog.js

* UHF-10276: Manually trigger translations for the webform.form.unsaved javascript file

* Update configuration (#1523)

* fix: [Snyk] Upgrade @playwright/test from 1.41.2 to 1.48.0 (#1544)

* fix: upgrade @playwright/test from 1.41.2 to 1.48.0

Snyk has created this PR to upgrade @playwright/test from 1.41.2 to 1.48.0.

See this package in npm:
@playwright/test

See this project in Snyk:
https://app.snyk.io/org/city-of-helsinki/project/aed93529-486e-499e-9b12-5815057dc0ec?utm_source=github&utm_medium=referral&page=upgrade-pr

* Update e2e docker image

---------

Co-authored-by: snyk-bot <[email protected]>

* Version bump

* Update core to 10.3.10

---------

Co-authored-by: Santeri Hurnanen <[email protected]>
Co-authored-by: Tero Elonen <[email protected]>
Co-authored-by: tuutti <[email protected]>
Co-authored-by: rpnykanen <[email protected]>
Co-authored-by: hel-platta-automation <[email protected]>
Co-authored-by: Tero Elonen <[email protected]>
Co-authored-by: snyk-bot <[email protected]>
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.

2 participants