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

UHF-6542: Added generic hooks to skip/reset migrations #118

Merged
merged 5 commits into from
Jul 10, 2023
Merged

Conversation

tuutti
Copy link
Member

@tuutti tuutti commented Jun 22, 2023

How to install

  • composer require drupal/helfi_api_base:dev-UHF-6542
  • drush cr

How to test

  • Run migration using --interval flag. For example drush migrate:import tpr_service --interval 60 and make sure the migration is run
  • Re-run migration using same command and make sure the migration is skipped
  • Set migration state to importing: drush php-eval "\Drupal::keyValue('migrate_status')->set('tpr_service', 1);"
  • Run migration using --reset-threshold flag. For example drush migrate:import tpr_service --reset-threshold 1232313 and make sure migration fails with [error] Migration tpr_service is busy with another operation: Importing error message
  • Re-run migration using lower threshold, for example drush migrate:import tpr_service --reset-threshold 1 and make sure migration status is reset back to idle

@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2023

Codecov Report

Merging #118 (39412cc) into main (a241d09) will increase coverage by 1.54%.
The diff coverage is 94.87%.

❗ Current head 39412cc differs from pull request most recent head 17c0857. Consider uploading reports for the commit 17c0857 to get more accurate results

@@             Coverage Diff              @@
##               main     #118      +/-   ##
============================================
+ Coverage     62.64%   64.19%   +1.54%     
- Complexity      439      464      +25     
============================================
  Files            64       65       +1     
  Lines          1558     1631      +73     
============================================
+ Hits            976     1047      +71     
- Misses          582      584       +2     
Impacted Files Coverage Δ
src/Entity/Form/MenuLinkFormTrait.php 0.00% <0.00%> (ø)
src/Logger/JsonLog.php 100.00% <ø> (ø)
src/Plugin/Filter/LinkConverter.php 90.56% <ø> (ø)
src/Plugin/migrate/source/HttpSourcePluginBase.php 29.57% <0.00%> (ø)
src/EventSubscriber/MigrationSubscriber.php 87.50% <66.66%> (+0.26%) ⬆️
src/Environment/EnvironmentResolver.php 97.40% <83.33%> (-1.23%) ⬇️
src/Commands/MigrateHookCommands.php 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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