-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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(jest-changed-files): improve changedFilesWithAncestor
command pattern for Mercurial SCM
#12322
Conversation
If it's flaky instead of failing we should add |
might need to skip if jasmine or something, it doesn't support retries |
Worth to try. Let’s see if it helps. By the way, I was comparing versions of OS and |
Codecov Report
@@ Coverage Diff @@
## main #12322 +/- ##
==========================================
- Coverage 67.26% 67.26% -0.01%
==========================================
Files 330 330
Lines 17352 17352
Branches 5071 5071
==========================================
- Hits 11672 11671 -1
- Misses 5648 5649 +1
Partials 32 32
Continue to review full report at Codecov.
|
mercurial
test on CImercurial
related tests on CI
@@ -20,7 +20,7 @@ const adapter: SCMAdapter = { | |||
|
|||
const args = ['status', '-amnu']; | |||
if (options && options.withAncestor) { | |||
args.push('--rev', `min((!public() & ::.)+.)^`); | |||
args.push('--rev', `min((!public() & ::.)+.)`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting! I've never used mercurial before, but since the test assert on this I guess the change is correct? 🙂
Was set to use ^
in #7880. I seem to have complained there about failing test, tho 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My first time with Mercurial, to be honest. That caret symbol might be needed, but seems like this is the trouble maker. Possibly Execa is somehow escaping it.
I'll land in it v28 just to be safe (although I trust the tests). Will start landing for v28 probably tomorrow |
@@ -20,7 +20,7 @@ const adapter: SCMAdapter = { | |||
|
|||
const args = ['status', '-amnu']; | |||
if (options && options.withAncestor) { | |||
args.push('--rev', `min((!public() & ::.)+.)^`); | |||
args.push('--rev', 'min((not public() and ancestors(.))^ or .^)'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ^
is left in place, but not at the end. Also I replaced !
, &
, +
with not
, and
, or
. Might be these are less problematic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjesun @quark-zju dunno if any of you are still at FB (I know Miguel is not, at least 🙂), but does this change make sense to you? Could you verify it?
Less weird syntax (and of course fixes a test, at least with mercurial 6), but I've never written a mercurial command in my life, so I have no frame of reference to know if this is the correct fix or not 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be this is not the same thing with ^
moved inside min()
. But leaving ^
at the end of command throws abort: empty revision range
locally and in CI. Strange.
@mrazauskas should we enable the tests (with retry?) that passes without your change separately from changing the behaviour (even if correcting it)? |
You mean to split this PR? New one just to enable working tests (with retry, possibly) and to leave this PR just for that correction. Sounds good for me. |
Yep! |
mercurial
related tests on CImercurial
related test
Seems like I fixed the command, but now test is failing. Current command Mercurial docs: "x^ – Equivalent to x^1, the first parent of each changeset in x." I added Alternatively Just to say, I have never used Mercurial. Came to all this by reading docs (this is most useful part). |
Seems like the solution to this problem was already suggested by @quark-zju here: #8653 (comment) Works locally. Let’s see what CI thinks. |
mercurial
related testchangedFilesWithAncestor
pattern for Mercurial SCM
@SimenB This PR is rebased and cleaned up. I implemented the change suggested by experienced developer. Should be safe to land it in v28. |
changedFilesWithAncestor
pattern for Mercurial SCMchangedFilesWithAncestor
command pattern for Mercurial SCM
@SimenB Just to remind. I don’t need it, just wanted to fix the test. All could also stay as is, since nobody is complaining (; |
hah, forgot. should've added it to the milestone 😅 |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Closes #8653
A changed files test for Mercurial SCM is failing locally and on CI with "abort: empty revision range" error. It may be a good idea to improve the command pattern implementing the suggestion by @quark-zju from #8653 (comment)
Also it seems like that test can run on CI. No need to keep it disabled. Nice!
One ofmercurial
related tests is from time to time failing in CI. I got curious to look at it. Interestingly all otherhg
tests in the same test file are disabled on CI with rather convincing comment. Would it make sense to skip the last one too?(Hm.. The comment if rather outdated. It also might sense to enable all tests on GitHub and to see what happens.)It isn’t best idea to disable tests, of course. There must be a good reason. More green CI runs, perhaps? Is this one good enough? Not sure..Just thinking out loud.Test plan
Green CI