Skip to content

Commit

Permalink
Merge branch 'main' into chore/tox-extra
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed Jan 20, 2025
2 parents cf75696 + 0d45021 commit 9ef7141
Show file tree
Hide file tree
Showing 726 changed files with 7,231 additions and 4,521 deletions.
53 changes: 29 additions & 24 deletions .config/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
#
# pip-compile --all-extras --no-annotate --output-file=.config/constraints.txt --strip-extras pyproject.toml
#
# For testing with ansible-core 2.18, please restore the ansible-core lines manually
ansible-builder==3.1.0
ansible-compat==24.10.0
ansible-core==2.16.5
ansible-core==2.17.6 ; python_version < '3.11'
ansible-core==2.18.0 ; python_version > '3.10'
ansible-lint==24.12.2
ansible-runner==2.4.0
attrs==24.2.0
attrs==24.3.0
babel==2.16.0
beautifulsoup4==4.12.3
bindep==2.11.0
Expand All @@ -20,10 +22,10 @@ cairosvg==2.7.1
certifi==2024.12.14
cffi==1.17.1
cfgv==3.4.0
charset-normalizer==3.4.0
click==8.1.7
charset-normalizer==3.4.1
click==8.1.8
colorama==0.4.6
coverage==7.6.9
coverage==7.6.10
coverage-enable-subprocess==1.0
cryptography==44.0.0
csscompressor==0.9.5
Expand All @@ -33,23 +35,24 @@ defusedxml==0.7.1
distlib==0.3.9
distro==1.9.0
dnspython==2.7.0
docutils==0.21.2
exceptiongroup==1.2.2
execnet==2.1.1
filelock==3.16.1
flake8==7.1.1
flake8-docstrings==1.7.0
ghp-import==2.1.0
griffe==1.5.1
griffe==1.5.5
hjson==3.1.0
htmlmin2==0.1.13
identify==2.6.3
identify==2.6.5
idna==3.10
importlib-metadata==8.5.0
iniconfig==2.0.0
jinja2==3.1.4
jinja2==3.1.5
jsmin==3.0.1
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
libtmux==0.39.0
libtmux==0.40.1
linkchecker==10.5.0
lockfile==0.12.2
markdown==3.7
Expand All @@ -60,28 +63,29 @@ markupsafe==3.0.2
mccabe==0.7.0
mdurl==0.1.2
mergedeep==1.3.4
mkdocs==1.6.0
mkdocs==1.6.1
mkdocs-ansible==24.12.0
mkdocs-autorefs==1.2.0
mkdocs-autorefs==1.3.0
mkdocs-gen-files==0.5.0
mkdocs-get-deps==0.2.0
mkdocs-htmlproofer-plugin==1.3.0
mkdocs-macros-plugin==1.3.7
mkdocs-material==9.5.48
mkdocs-material==9.5.50
mkdocs-material-extensions==1.3.1
mkdocs-minify-plugin==0.8.0
mkdocs-monorepo-plugin==1.1.0
mkdocstrings==0.27.0
mkdocstrings-python==1.12.2
mkdocstrings-python==1.13.0
mypy-extensions==1.0.0
nodeenv==1.9.1
onigurumacffi==1.3.0
onigurumacffi==1.4.1
packaging==24.2
paginate==0.5.7
parsley==1.3
pathspec==0.12.1
pbr==6.1.0
pexpect==4.9.0
pillow==11.0.0
pillow==11.1.0
pipdeptree==2.24.0
platformdirs==4.3.6
pluggy==1.5.0
Expand All @@ -91,8 +95,8 @@ pycodestyle==2.12.1
pycparser==2.22
pydocstyle==6.3.0
pyflakes==3.2.0
pygments==2.18.0
pymdown-extensions==10.12
pygments==2.19.1
pymdown-extensions==10.14
pytest==8.3.4
pytest-env==1.1.5
pytest-mock==3.14.0
Expand All @@ -104,32 +108,33 @@ python-dateutil==2.9.0.post0
python-slugify==8.0.4
pyyaml==6.0.2
pyyaml-env-tag==0.1
referencing==0.35.1
referencing==0.36.1
regex==2024.11.6
requests==2.32.3
requirements-parser==0.11.0
resolvelib==1.0.1
rich==13.9.4
rpds-py==0.22.3
ruamel-yaml==0.18.6
ruamel-yaml==0.18.10
ruamel-yaml-clib==0.2.12
six==1.17.0
snowballstemmer==2.2.0
soupsieve==2.6
subprocess-tee==0.4.2
super-collections==0.5.3
termcolor==2.5.0
text-unidecode==1.3
tinycss2==1.4.0
tomli==2.2.1
types-setuptools==75.6.0.20241126
types-setuptools==75.8.0.20250110
typing-extensions==4.12.2
tzdata==2024.2
urllib3==2.2.3
virtualenv==20.28.0
urllib3==2.3.0
virtualenv==20.29.1
watchdog==6.0.0
wcmatch==10.0
webencodings==0.5.1
yamllint==1.35.1
zipp==3.21.0

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ jobs:
fi
- name: Upload coverage data
uses: codecov/[email protected].1
uses: codecov/[email protected].2
with:
name: ${{ matrix.name }}
fail_ci_if_error: true
use_oidc: true # cspell:ignore oidc
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }} # cspell:ignore oidc

- name: Check codecov.io status
if: github.event_name == 'pull_request'
Expand Down
4 changes: 4 additions & 0 deletions src/ansible_navigator/actions/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,12 @@ def _parse_and_merge(self, list_output: str, dump_output: str) -> None:
self._logger.debug("error yaml loading list output: '%s'", str(exc))
return

parsed.pop("GALAXY_SERVERS", None)

regex = re.compile(r"^(?P<variable>\S+)\((?P<source>.*)\)\s=\s(?P<current>.*)$")
for line in dump_output.splitlines():
if not line:
break
extracted = regex.match(line)
if extracted:
variable = extracted.groupdict()["variable"]
Expand Down
9 changes: 7 additions & 2 deletions src/ansible_navigator/configuration_subsystem/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,22 @@ def parse_ansible_cfg(ee_enabled: bool) -> ParseAnsibleCfgResponse:
return response


def parse_ansible_verison() -> tuple[list[LogMessage], list[ExitMessage], dict[str, Any] | None]:
def parse_ansible_verison(
path: Path | None = None,
) -> tuple[list[LogMessage], list[ExitMessage], dict[str, Any] | None]:
"""Parse the output of the ansible --version command.
:param path: The path to the ansible executable
:returns: Log messages, exit messages, and the stdout as a dictionary
"""
messages: list[LogMessage] = []
exit_messages: list[ExitMessage] = []

ansible_cmd = "ansible" if path is None else str(path / "ansible")

command = Command(
identity="ansible_version",
command="ansible --version",
command=f"{ansible_cmd} --version",
post_process=ansible_verison_parser,
)

Expand Down
2 changes: 1 addition & 1 deletion src/ansible_navigator/data/images_dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
FROM ghcr.io/ansible/community-ansible-dev-tools:latest as DEFAULT_EE

# This is also hard coded in tests/fixtures/integration/execution_environment_image/ansible-navigator_set_ee_image.yml
FROM ghcr.io/ansible/creator-base:latest as SMALL_IMAGE
FROM quay.io/fedora/python-313:latest as SMALL_IMAGE

FROM registry.hub.docker.com/library/alpine:latest as PULLABLE_IMAGE
6 changes: 4 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def valid_ce() -> str:
# the habit of getting stuck.
try:
cmd = [engine, "info"]
subprocess.check_output(cmd, stderr=subprocess.STDOUT, timeout=6)
subprocess.check_output(cmd, stderr=subprocess.STDOUT, timeout=10)
except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as exc:
msg = f"Container engine is broken, fail to run: {' '.join(cmd)}: {exc}"
continue
Expand Down Expand Up @@ -381,7 +381,9 @@ def pytest_configure(config: pytest.Config) -> None:
print(f"[NOTE] The environment variable(s) {env_vars} will be restored after the test run")

# look for ansible.cfg
_log, errors, details = parse_ansible_verison()
# use the current interpreter to get the ansible version
bin_dir = Path(sys.executable).parent
_log, errors, details = parse_ansible_verison(path=bin_dir)
if details is None:
err = "\n".join(error.message for error in errors)
pytest.exit(f"Error parsing ansible version:\n{err}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 3

images:
base_image:
name: registry.fedoraproject.org/fedora:38
name: quay.io/fedora/python-313:latest

dependencies:
ansible_core:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "test[builder help-builder with ee clear && ansible-navigator builder --help-builder --ee True --ll debug --mode stdout]",
"name": "test[step0]",
"index": 0,
"comment": "builder help-builder with ee",
"additional_information": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "test[builder help-builder without ee clear && ansible-navigator builder --help-builder --ee False --ll debug --mode stdout]",
"name": "test[step1]",
"index": 1,
"comment": "builder help-builder without ee",
"additional_information": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "test[builder help-builder with interactive with ee clear && ansible-navigator builder --help-builder --ee True --ll debug --mode interactive]",
"name": "test[step2]",
"index": 2,
"comment": "builder help-builder with interactive with ee",
"additional_information": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "test[builder help-builder with interactive without ee clear && ansible-navigator builder --help-builder --ee False --ll debug --mode interactive]",
"name": "test[step3]",
"index": 3,
"comment": "builder help-builder with interactive without ee",
"additional_information": {
Expand Down
Loading

0 comments on commit 9ef7141

Please sign in to comment.