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 rake error testing the update generator #4980

Conversation

waiting-for-dev
Copy link
Contributor

@waiting-for-dev waiting-for-dev commented Mar 15, 2023

Summary

It looks like the spree:install:migrations task is not available when running through Rails::Generators.invoke, as it context differs from common shell invocation.

We fix that by not trying to run the task on test environment. In the end, it wouldn't be a good idea to copy the migrations at the test suite runtime.

Fixes #4978

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@waiting-for-dev waiting-for-dev requested a review from a team as a code owner March 15, 2023 14:19
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label Mar 15, 2023
@waiting-for-dev waiting-for-dev added backport-v3.2 backport-v3.3 Backport this pull-request to v3.3 labels Mar 15, 2023
It looks like the `spree:install:migrations` task is not available when
running through `Rails::Generators.invoke`, as it context differs from
common shell invocation.

We fix that by not trying to run the task on test environment. In the
end, it wouldn't be a good idea to copy the migrations at the test suite
runtime.

Fixes solidusio#4978
@waiting-for-dev waiting-for-dev force-pushed the waiting-for-dev/fix_missing_rake_task_warning branch from c746f79 to 3bfcac6 Compare March 15, 2023 14:24
@github-actions github-actions bot added the changelog:solidus_backend Changes to the solidus_backend gem label Mar 15, 2023
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@waiting-for-dev waiting-for-dev merged commit ab59d64 into solidusio:master Mar 16, 2023
@waiting-for-dev waiting-for-dev deleted the waiting-for-dev/fix_missing_rake_task_warning branch March 16, 2023 04:25
@github-actions
Copy link

💚 All backports created successfully

Status Branch Result
v3.2
v3.3

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@waiting-for-dev waiting-for-dev removed the changelog:solidus_backend Changes to the solidus_backend gem label Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v3.3 Backport this pull-request to v3.3 changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove rake aborted error running the update generator in specs
3 participants