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 migrate command #1495

Merged
merged 15 commits into from
Apr 27, 2020
Merged

Fix migrate command #1495

merged 15 commits into from
Apr 27, 2020

Conversation

knagaitsev
Copy link
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
Member

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

@jamesgeorge007
Copy link
Member

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

});
};

// some tests don't work if the input option is an empty string
Copy link
Member

Choose a reason for hiding this comment

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

Good catch 👏

@knagaitsev
Copy link
Contributor Author

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

Copy link
Member

@alexander-akait alexander-akait left a comment

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
Member

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

@knagaitsev
Copy link
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
Copy link
Member

rishabh3112 commented Apr 25, 2020

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
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
Member

I think we have racing

@webpack-bot
Copy link

@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
Contributor Author

Let me try a few things with how runPromptWithAnswers works.

@knagaitsev
Copy link
Contributor Author

knagaitsev commented Apr 25, 2020

@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
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