Skip to content

fix: [AAP-38952] incorrect 'image_url' in tests #381

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

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

kaiokmo
Copy link
Member

@kaiokmo kaiokmo commented Jan 20, 2025

https://issues.redhat.com/browse/AAP-38952

The 'image_url' field is incorrect in the decision_enrivonment tests and it does not correspond to valid OCI image/tag/naming standards.

Proper validation of the image_url field was introduced here [1], and the tests of the collection must reflect it.

[1] ansible/eda-server#1188

The 'image_url' field is incorrect in the decision_enrivonment tests
and it does not correspond to valid OCI image/tag/naming standards.

Proper validation of the image_url field was introduced here [1], and
the tests of the collection must reflect it.

[1] ansible/eda-server#1188
@kaiokmo kaiokmo requested review from zkayyali812, Alex-Izquierdo and a team January 20, 2025 19:32
@github-actions github-actions bot added the bug Something isn't working label Jan 20, 2025
@daparm
Copy link

daparm commented Jan 20, 2025

Thank you for the bug fix regarding image_url for the test integration.

I recently just ran into the same problem since my open PR fails too and I just took a look why it has failed.

That's how I tested it locally:

  1. Without any enhancements:
mkdir -p ansible_collections/ansible/
cd $_
git clone https://github.com/ansible/event-driven-ansible.git
mv event-driven-ansible eda
cd eda
tox -e py311-staging

Resulting in the same error as in the GH Test Workflow:

TASK [decision_environment : Create decision environment] **********************
fatal: [testhost]: FAILED! => {"changed": false, "msg": "HTTP error {'non_field_errors': [\"Image url https://quay.io/repository/ansible/eda-server is malformed; invalid host name: 'https:'\"]}"}
  1. And with removing the protocol from the image_url:
mkdir -p ansible_collections/ansible/
cd $_
git clone https://github.com/ansible/event-driven-ansible.git
mv event-driven-ansible eda
cd eda
_EFFECTED_FILES=$(grep -r 'image_url: "https://' tests/integration/targets/ | awk '{print $1}' | tr -d :)
for i in $_EFFECTED_FILES; do sed -i 's|https://||' $i; done
git add . && git commit -m 'remove https protocol from image_url'
tox -e py311-staging

It runs smoothly:

Result:

[+] Running 13/13
 ✔ Container eda-eda-default-worker-1     Removed                                                                                      1.8s 
 ✔ Container eda-eda-ui-1                 Removed                                                                                      0.7s 
 ✔ Container eda-eda-ws-1                 Removed                                                                                      1.5s 
 ✔ Container eda-podman-1                 Removed                                                                                      0.7s 
 ✔ Container eda-eda-activation-worker-2  Removed                                                                                      1.8s 
 ✔ Container eda-eda-activation-worker-1  Removed                                                                                      1.8s 
 ✔ Container eda-eda-scheduler-1          Removed                                                                                      1.3s 
 ✔ Container eda-eda-webhook-api-1        Removed                                                                                      1.3s 
 ✔ Container eda-eda-api-1                Removed                                                                                      1.4s 
 ✔ Container eda-postgres-1               Removed                                                                                      0.8s 
 ✔ Container eda-redis-1                  Removed                                                                                      0.6s 
 ✔ Network eda_default                    Removed                                                                                      0.3s 
 ✔ Network service-mesh                   Removed                                                                                      0.5s 
  py311-staging: OK (509.93=setup[0.69]+cmd[509.25] seconds)
  congratulations :) (510.08 seconds)

So from my point of view, the proposed fix works great.

Kind regards.

@Alex-Izquierdo Alex-Izquierdo merged commit 3d02e58 into ansible:main Jan 21, 2025
17 checks passed
@Alex-Izquierdo Alex-Izquierdo removed the bug Something isn't working label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants