-
Notifications
You must be signed in to change notification settings - Fork 110
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
SNOW-874787: Prevent future flakiness of packaging tests #967
SNOW-874787: Prevent future flakiness of packaging tests #967
Conversation
valid_packages = self._get_available_versions_for_packages( | ||
package_names=[v[0] for v in package_dict.values()], | ||
package_table_name=package_table, | ||
validate_package=validate_package, | ||
) | ||
|
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.
As the code now sits in a utility function, it can be patched easily.
The goal here is to patch _get_available_versions_for_packages for certain package inputs (sktime, scikit-fuzzy) so that they are seen as custom packages forever (regardless of whether they are eventually added to Anaconda)
def get_available_versions_for_packages_patched(session): | ||
# Save a reference to the original function | ||
original_function = session._get_available_versions_for_packages | ||
sentinel_version = "0.0.1" |
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 sentinel version will be returned for sktime and scikit_fuzzy, if either of those packages are present.
IS_IN_STORED_PROC, | ||
reason="Subprocess calls are not allowed within stored procedures", | ||
) | ||
def test_add_requirements_unsupported_usable_by_sproc(session, resources_path): |
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.
This test is moved into test_packaging.py
from test_stored_procedure.py
file as it references the scikit-fuzzy
package
Codecov Report
@@ Coverage Diff @@
## main #967 +/- ##
=======================================
Coverage 98.37% 98.37%
=======================================
Files 51 51
Lines 9180 9183 +3
Branches 1665 1666 +1
=======================================
+ Hits 9031 9034 +3
Misses 59 59
Partials 90 90
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
# TODO: Use the database from fully qualified UDF name | ||
if not session.get_current_database(): |
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.
do you want to take care of the todo?
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.
Not sure what the TODO is about, it was in the codebase prior to my changes.
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes #NNNN
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.