Skip to content

Fix migrate command#1495

Merged
alexander-akait merged 15 commits into
webpack:nextfrom
knagaitsev:hotfix/migrate
Apr 27, 2020
Merged

Fix migrate command#1495
alexander-akait merged 15 commits into
webpack:nextfrom
knagaitsev:hotfix/migrate

Conversation

@knagaitsev

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

fix/tests

Did you add tests for your changes?

Yes (still need to add tests for runPrettier)

I'm not exactly sure how the migrate command is supposed to work. Could someone give an example of a webpack config that it should make modifications to?

If relevant, did you update the documentation?

No

Summary

@jamesgeorge007 Sorry for taking over, just couldn't debug runPromptWithAnswers without using your changes. It seems that execa does not like an empty input string option.

  • Fixes runPromptWithAnswers
  • Fixes migrate
  • Fixes issues with runPrettier

Does this PR introduce a breaking change?

Slightly with how runPrettier works

Other information

@anshumanv

Copy link
Copy Markdown
Contributor

@Loonride one test unusually still fails, doesn't show any log, can you debug?

@jamesgeorge007

Copy link
Copy Markdown
Contributor

I'm not exactly sure how the migrate command is supposed to work. Could someone give an example of a webpack config that it should make modifications to?

You can find everything related to migrate command here

Comment thread test/utils/test-utils.js
@knagaitsev

Copy link
Copy Markdown
Contributor Author

It seems sending a SIGKILL to the process at the end of runPromptWithAnswers made it more stable 🤷‍♀️

@alexander-akait alexander-akait left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/cc @webpack/cli-team please review

anshumanv
anshumanv previously approved these changes Apr 25, 2020
jamesgeorge007
jamesgeorge007 previously approved these changes Apr 25, 2020
@alexander-akait

Copy link
Copy Markdown
Member

hm, ci is not stable in some cases, it is strange

@knagaitsev

Copy link
Copy Markdown
Contributor Author

hm, ci is not stable in some cases, it is strange

whats confusing is it always either seems like a large group of them fail, or none of them fail 🤔

@rishabh3112

rishabh3112 commented Apr 25, 2020

Copy link
Copy Markdown
Contributor

whats confusing is it always either seems like a large group of them fail, or none of them fail 🤔

Others are cancelled when one of them fails. the macOS Node v13 container is the failing one in every PR:(

@knagaitsev

Copy link
Copy Markdown
Contributor Author

Others are cancelled when one of them fails. the macOS Node v13 container is the failing one everywhere :(

Oh that makes more sense thanks

@alexander-akait

Copy link
Copy Markdown
Member

I think we have racing

@webpack-bot

Copy link
Copy Markdown

@rishabh3112 Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@jamesgeorge007 Please review the new changes.

@knagaitsev

Copy link
Copy Markdown
Contributor Author

Let me try a few things with how runPromptWithAnswers works.

@knagaitsev

knagaitsev commented Apr 25, 2020

Copy link
Copy Markdown
Contributor Author

@evilebottnawi 4 test runs good in a row, I think stabilization worked!

What I did was forced runPromptWithAnswers to wait for new stdout before writing the next answer to stdin

@alexander-akait

Copy link
Copy Markdown
Member

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate functionality doesn't work as expected

6 participants