-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use parametrized os value in workflow #1394
Conversation
We had forgotten to use the parametrized os' value. Now CI fails because we are using ubuntu-specific installation commands. We temporarily mark this PR as a draft and will tackle this later. |
620398b
to
f9dad99
Compare
f9dad99
to
e8c1486
Compare
sudo apt-get update --fix-missing | ||
sudo apt-get autoremove | ||
sudo apt-get autoclean |
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.
These were not necessary for the job.
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 problem is that occassionally an outdated dependency can lead to issues with them not being present.
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.
Though why would we add this in the workflow if this does not affect the CI?
docker = "==5.0.2" | ||
docker = "==6.0.0" |
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.
Update docker
to avoid conflict with pywin32
on Windows.
@@ -11,14 +11,13 @@ open-aea-cli-ipfs = "==1.20.0" | |||
|
|||
[dev-packages] | |||
asn1crypto = "==1.4.0" | |||
atheris = "==2.0.11" |
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.
Remove the atheris
dependency because it is not supported on Windows.
The options would be to:
- Add
atheris
in thesetup.py
with a condition to install only if not on Windows. This however would add an unnecessary dependency to our framework. - Replace
pipenv
withpoetry
which supports "environment markers" and install dev dependency only if not on Windows. We could do this if we reopen [WIP] Chore/poetry #93. - Remove the dependency and let the dev install it if needed. This does not cause any issues since we already have the following logic in the fuzzy tests:
try:
import atheris # type: ignore
except (ImportError, ModuleNotFoundError):
pytestmark = pytest.mark.skip
The best option, for now, would be (3.).
> :information_source: Note: we are using [atheris](https://github.com/google/atheris) in order to perform fuzzy testing. | ||
> The dependency is not listed in the `Pipfile` because it is not supported on Windows. | ||
> If you need to run or implement a fuzzy test, please manually install the dependency. | ||
> If you are developing on Mac, please follow the extra steps described [here](https://github.com/google/atheris#mac). |
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.
Added clarification re the atheris
dependency.
setup.py
Outdated
def _get_docker_dependency() -> str: | ||
""" | ||
Get the `docker-py` dependency, according to the underlying platform. | ||
|
||
If on Windows, we need to install the cutting-edge package version of `docker` directly from the GitHub repository; | ||
as the PyPI distribution of `docker` causes the following conflict: | ||
|
||
docker 5.0.3 depends on pywin32==227; sys_platform == "win32" | ||
open-aea[all] 1.20.0 depends on pywin32==304 | ||
|
||
Instead, at commit docker/docker-py@3f0095a, `setup.py` has an extra that forces pywin32>=304. | ||
""" | ||
return ( | ||
"docker==5.0.3" | ||
if platform.system() != "Windows" | ||
else "docker @ git+https://github.com/docker/docker-py.git@3f0095a7c1966c521652314e524ff362c24ff58c" | ||
) |
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 necessary since we updated docker
.
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.
Same question as above
adb5d73
to
648ca96
Compare
We do this in order to avoid a conflict with `pywin32` on Windows.
It is not supported on Windows, and we also have this logic in our fuzzy tests: ```python try: import atheris # type: ignore except (ImportError, ModuleNotFoundError): pytestmark = pytest.mark.skip ``` Therefore, the best option for now would be to manually install `atheris` if needed.
No need to manually install python on Windows anymore (5172f47) since we are using `actions/setup-python@master`.
# Conflicts: # .spelling
648ca96
to
35772fc
Compare
Codecov ReportBase: 92.73% // Head: 92.73% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #1394 +/- ##
=======================================
Coverage 92.73% 92.73%
=======================================
Files 55 55
Lines 2146 2146
=======================================
Hits 1990 1990
Misses 156 156
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Failing test on macos reports:
I think this variability is expected @Karrenbelt. Let's increase the deadline for Failing |
sudo apt-get update --fix-missing | ||
sudo apt-get autoremove | ||
sudo apt-get autoclean |
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 problem is that occassionally an outdated dependency can lead to issues with them not being present.
base_deps = [ | ||
"open-aea[all]>=1.20.0,<2.0.0", | ||
"pytest==7.0.0", | ||
"open-aea-ledger-ethereum==1.20.0", | ||
_get_docker_dependency(), | ||
"docker==6.0.0", |
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.
@angrybayblade is that compatible with the rest of the plugins etc?
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.
https://github.com/valory-xyz/open-autonomy/blob/main/setup.py#L65
@Adamantios Please update this as well
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.
Also, it would be nice if we can use a range instead of a strict version specifier
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.
Please update this as well
I have:
Line 61 in 38e9505
"docker==6.0.0", |
Also, it would be nice if we can use a range instead of a strict version specifier
We can't:
#1394 (comment)
setup.py
Outdated
def _get_docker_dependency() -> str: | ||
""" | ||
Get the `docker-py` dependency, according to the underlying platform. | ||
|
||
If on Windows, we need to install the cutting-edge package version of `docker` directly from the GitHub repository; | ||
as the PyPI distribution of `docker` causes the following conflict: | ||
|
||
docker 5.0.3 depends on pywin32==227; sys_platform == "win32" | ||
open-aea[all] 1.20.0 depends on pywin32==304 | ||
|
||
Instead, at commit docker/docker-py@3f0095a, `setup.py` has an extra that forces pywin32>=304. | ||
""" | ||
return ( | ||
"docker==5.0.3" | ||
if platform.system() != "Windows" | ||
else "docker @ git+https://github.com/docker/docker-py.git@3f0095a7c1966c521652314e524ff362c24ff58c" | ||
) |
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.
Same question as above
# Conflicts: # autonomy/constants.py # docs/autonomy.md # docs/counter_example.md # docs/guides/quick_start.md # docs/package_list.md # docs/price_oracle_intro.md # docs/simple_abci.md # packages/packages.json # packages/valory/agents/abstract_abci/aea-config.yaml # packages/valory/agents/apy_estimation/aea-config.yaml # packages/valory/agents/counter/aea-config.yaml # packages/valory/agents/hello_world/aea-config.yaml # packages/valory/agents/oracle/aea-config.yaml # packages/valory/agents/register_reset/aea-config.yaml # packages/valory/agents/registration_start_up/aea-config.yaml # packages/valory/agents/simple_abci/aea-config.yaml # packages/valory/agents/test_abci/aea-config.yaml # packages/valory/services/apy_estimation/service.yaml # packages/valory/services/apy_estimation_hardhat/service.yaml # packages/valory/services/counter/service.yaml # packages/valory/services/hello_world/service.yaml # packages/valory/services/oracle_goerli/service.yaml # packages/valory/services/oracle_hardhat/service.yaml # packages/valory/services/oracle_polygon/service.yaml # packages/valory/services/oracle_ropsten/service.yaml # packages/valory/services/oracle_ropsten_cluster/service.yaml # packages/valory/services/register_reset/service.yaml # packages/valory/services/simple_abci/service.yaml # packages/valory/skills/abstract_round_abci/skill.yaml # packages/valory/skills/apy_estimation_abci/skill.yaml # packages/valory/skills/apy_estimation_chained_abci/skill.yaml # packages/valory/skills/hello_world_abci/skill.yaml # packages/valory/skills/liquidity_provision_abci/skill.yaml # packages/valory/skills/liquidity_rebalancing_abci/skill.yaml # packages/valory/skills/oracle_abci/skill.yaml # packages/valory/skills/oracle_deployment_abci/skill.yaml # packages/valory/skills/price_estimation_abci/skill.yaml # packages/valory/skills/register_reset_abci/skill.yaml # packages/valory/skills/registration_abci/skill.yaml # packages/valory/skills/reset_pause_abci/skill.yaml # packages/valory/skills/safe_deployment_abci/skill.yaml # packages/valory/skills/simple_abci/skill.yaml # packages/valory/skills/test_abci/skill.yaml # packages/valory/skills/transaction_settlement_abci/skill.yaml # plugins/aea-test-autonomy/setup.py # setup.py
@settings(deadline=2000, suppress_health_check=[HealthCheck.too_slow]) | ||
@settings(deadline=5000, suppress_health_check=[HealthCheck.too_slow]) |
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.
@settings(deadline=2000, suppress_health_check=[HealthCheck.too_slow]) | ||
@settings(deadline=5000, suppress_health_check=[HealthCheck.too_slow]) |
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.
Proposed changes
Uses the parametrized os value introduced in #1389.
Fixes
n/a
Types of changes
What types of changes does your code introduce? (A breaking change is a fix or feature that would cause existing functionality and APIs to not work as expected.)
Put an
x
in the box that appliesChecklist
Put an
x
in the boxes that apply.main
branch (left side). Also you should start your branch off ourmain
.Further comments
n/a