-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore(tests): Refactor tests to support easily invoking AL2023 based runtimes #7064
base: develop
Are you sure you want to change the base?
Conversation
cache: | ||
- C:\ProgramData\chocolatey\bin -> appveyor.yml | ||
- C:\ProgramData\chocolatey\lib -> appveyor.yml | ||
|
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.
out of curiosity, why did we removed the caching part here?
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 doesn't work for a couple of reasons:
- The cache works by specifying a cached directory, and file to watch to invalidate the cache. We don't have a file named
appveyor.yml
, so the cache will never be invalidated correctly. - Its not enough to just watch the chocolatey directories as some tools we install via chocolatey dump their files in other locations. For example, we install JDK 21 via chocolatey, but the runtime is saved into
C:\Program Files\...
, while the binaries and chocolatey metadata is saved in the chocolatey folders. This causes a "desync" and will cause the job to fail.
We're going to disable it for now since this needs some more investigation/work before turning it back on.
@@ -523,6 +509,11 @@ class TestBuildCommand_PythonFunctions_WithoutDocker(BuildIntegPythonBase): | |||
use_container = False | |||
|
|||
def test_with_default_requirements(self): | |||
# lucashuy: temporarily set docker check here | |||
# until we refactor this set of tests | |||
if IS_WINDOWS and not SKIP_DOCKER_TESTS and not runtime_supported_by_docker(self.runtime): |
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.
I thought we are getting rid of runtime_supported_by_docker
and using pytest.mark
instead? Do we still need this function check here?
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 part of the code hasn't been touched yet , saving that for the next PR so that this one doesn't become too bloated in size. We'll need to keep this here for now.
I had removed the check in the base test class, but had not updated these tests yet. Hence why it suddenly appeared here.
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.
Ah, this particular check might be unecessary, let me remove it since this integ test isn't suppose to require an invoke anyways. Let me revisit the usage of this check in this PR and remove any that is not required.
Which issue(s) does this change fix?
None
Why is this change necessary?
Our Windows testing environment does not have the latest version of Docker installed inside of it, causing issues when invoking AL2023 based runtime images. This results in skipping the AL2023 based runtime tests specifically for Docker.
How does it address the issue?
Splits up the test cases that use Docker and test the new AL2023 based runtime images into two. AL2023 based tests are then marked with a
pytest
marker to make them easily toggle-able within thepytest
command.The two tests will be running the same testing parameters and assert conditions.
The goal at the end of this (follow up PR to address the other tests), is to remove the
runtime_supported_by_docker()
method, and to instead have two separate test methods marked bypytest
decorators.What side effects does this change have?
None.
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make pr
passesmake update-reproducible-reqs
if dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.