Skip to content
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

Integrate resources API in Controller #14896

Merged
merged 7 commits into from
Mar 1, 2024

Conversation

jessicamack
Copy link
Member

SUMMARY

Integrate resources API from django-ansible-base.

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API
AWX VERSION

ADDITIONAL INFORMATION

@github-actions github-actions bot added component:api dependencies Pull requests that update a dependency file labels Feb 19, 2024
models are not the source of truth in AWX
@dmzoneill dmzoneill marked this pull request as draft February 20, 2024 11:43
@dmzoneill
Copy link
Member

Converted to draft whilst CI checks are being resolved.

@AlanCoding
Copy link
Member

Those CI check failures look very related to the construction of the resources API, it would be really good to get to the bottom of them.

I also want to ask if you've done manual testing of these endpoints? For instance, did you hit the issues ansible/django-ansible-base#145, ansible/django-ansible-base#147, or ansible/django-ansible-base#146. If this needs more upstream work in DAB I want to get that characterized and issues filed.

@newswangerd
Copy link
Member

newswangerd commented Feb 21, 2024

This is strange. It seems like the service ID is not getting generated correctly by the migrations.

2024-02-19T15:44:31.1984008Z   File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/ansible_base/resource_registry/models/resource.py", line 13, in short_service_id
2024-02-19T15:44:31.1984153Z     return service_id().split('-')[0]
2024-02-19T15:44:31.1984773Z   File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/ansible_base/resource_registry/models/service_id.py", line 26, in service_id
2024-02-19T15:44:31.1984931Z     _service_id = str(ServiceID.objects.first().pk)
2024-02-19T15:44:31.1985146Z AttributeError: 'NoneType' object has no attribute 'pk'

Do you get anything for the service ID in your developer environment?

from ansible_base.resource_registry.models.service import ServiceID
print(ServiceID.objects.all())

@AlanCoding
Copy link
Member

A first-pass fix for these checks is proposed at jessicamack#1

@jessicamack jessicamack marked this pull request as ready for review February 29, 2024 19:47
@jessicamack jessicamack merged commit 8876043 into ansible:devel Mar 1, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:api dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants