-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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(CI): prevent the e2e test from running on 0.XX-stable branches #35667
Conversation
this should work typo needs to be in a different place we should only filter the e2e part no need for this anymore now it should work one more time, with gusto try a fix it's java pattern matchin stricter final touches
@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Base commit: 1b7127b |
Doesn't this mean that we don't run JS tests at all in the If that's the case, what about changing the e2e script so that, if there is a By doing that, Verdaccio will work as if it was a workspace and we could retain JS test on stable as well. WDYT? |
No, it's only a logical condition for You can also see it in the screenshot, that the normal Javascript tests run and are green. |
Ok, so we skip only the e2e test which are not providing value, right now. |
😢 |
So, the e2e part is kind of misleading, but the unique bit about this script is that it runs tests against a newly initialized app. E.g. it is where we test that a new app typechecks. |
The reason Verdaccio is used here is so that tests can be run simulating a real installation from an npm registry. There is a seprate bit using file copies, but it does some surprising stuff which can cause some tests to hang because of differences compared to a real app init. |
TLDR: The script does provide some unique coverage. So, I am a little weary of removing this, unless it is needed to unblock the release (then maybe we could just disable in the stable branch)? |
That's essentially what the PR is doing right? |
Sorry, I meant checking the change to disable only into the stable branch, then working to fix the underlying issue on main. That way we can remove the coverage specifically for 0.71-stable, but prevent us from accidentally bringing the debt forward to future stable branches. |
ok so just to be clear, y'all basically just suggesting to "retarget" this PR so that it's local to 0.71 and then in main the work will be tackled differently? To be clear, the verdaccio stuff will never work on -stable branches because we remove the workspace section of the root package.json, and we won't be able to change that until we finish all the monorepo work I think. This is why I'm doing the commit against main branch, I reckon that this "workaround" will need to be in place for 0.72 too at least. |
I wonder if my latest change might solve this problem? If this occurs when we execute Now we can iterate through each package inside |
could be, actually! Should we try to cherry pick this into 0.71-stable, push up the commit and see if CI is green? if that's the case we could close this PR off... |
Update on all of this - I've spent a bit more time and I wanted to share the learnings:
We can pick this up in Jan btw, and fix for 0.71.1, no rush. |
Summary
Because of the usual ✨dark magic✨ that we do 'cause RN is not a proper monorepo (usual link react-native-community/discussions-and-proposals#480), one of the side effects is that
test_js
andtest_js_prev_lts
insta-crash whenever they run in a-stable
branch because of therun_e2e
job, that runs verdaccio and verdaccio needs the workspace, but the workspace is not there because of the aforementioned ✨dark magic✨This PR fixes that by not allowing said command to be run when we are in 0.XX-stable branches. (TIL that under the hood CircleCI wants Java regex)
Once merged, we can cherry-pick in
0.71-stable
.Changelog
[INTERNAL] [FIXED] - prevent the e2e test from running on 0.XX-stable branches
Test Plan
I used this PR for testing: #35665
here's a screenshot of when things work (no E2E command run):
here's how it looks when they don't (E2E runs and crashes):
You can also verify that the condition is correct by throwing this sample code in an online Java ide: