-
Notifications
You must be signed in to change notification settings - Fork 297
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
Force tests in a module to be run by the same worker #2177
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eapolinario
requested review from
wild-endeavor,
kumare3,
pingsutw and
cosmicBboy
as code owners
February 7, 2024 22:13
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2177 +/- ##
==========================================
+ Coverage 80.43% 84.06% +3.62%
==========================================
Files 176 298 +122
Lines 17178 23144 +5966
Branches 3545 3545
==========================================
+ Hits 13817 19455 +5638
- Misses 2732 3101 +369
+ Partials 629 588 -41 ☔ View full report in Codecov by Sentry. |
wild-endeavor
previously approved these changes
Feb 7, 2024
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
eapolinario
force-pushed
the
fix-local-cache-unit-tests
branch
from
February 7, 2024 23:30
a785d9b
to
7484d79
Compare
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
wild-endeavor
approved these changes
Feb 8, 2024
pingsutw
approved these changes
Feb 8, 2024
thank you |
eapolinario
added a commit
that referenced
this pull request
Feb 8, 2024
* Force tests in a module to be run by the same worker Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Put link to pytest-xdist docs. Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Remove flyteidl setup make target Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Set flyteidl lower bound to 1.10.7b4 Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Set a default value for PYTEST_OPTS Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Fix matching of error in test_python_entrypoint Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Disable pytest-xdist temporarily Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Remove default from makefile temporarily Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Move test that touches the local cache to test_local_cache Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Mock environment using mock.patch.dict in test_serialization Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Re-enable pytest-xdist Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Lint Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Move patching of os.environ closer to where it's required Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> * Check that a different key is not usable in test_secrets_manager_default Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> --------- Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> Co-authored-by: Eduardo Apolinario <eapolinario@users.noreply.github.com> Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tracking issue
NA
Why are the changes needed?
flytekit unit tests started failing in the last couple of days due to the use of global shared state in
test_local_cache.py
. Tests are run usingpytest-xdist
and this PR makes it so that we run all tests in the same module in the same workerWhat changes were proposed in this pull request?
We specify
--dist loadscope
to force tests in the same module to be picked by the same pytest worker.I'm also:
setup
make target.How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link