ansible / eda-server

Event Driven Ansible for AAP
Apache License 2.0
59 stars 35 forks source link

feat: add "wait_for_migrations" command #927

Closed Alex-Izquierdo closed 1 month ago

Alex-Izquierdo commented 1 month ago

aap-eda-manage wait_for_migrations -t 60 Replaces https://github.com/ansible/eda-server/pull/925

rooftopcellist commented 1 month ago

@Alex-Izquierdo I just tested this out with my branch and it works as expected, great idea with making this a manage command!

$ oc logs -f eda-activation-worker-8b57696cb-dwzjn -c wait-for-migrations
All migrations are applied.

In the scheduler init container, we see an info message about failing to get the service id, this is expected:

$ oc logs -f eda-scheduler-696588bdc-9njrm -c wait-for-migrations
2024-06-04 13:47:25,438 aap_eda.core.tasking INFO     Failed to get service id
All migrations are applied.

I confirmed that I don't see it in the actual scheduler container logs:

$ oc logs -f eda-scheduler-696588bdc-9njrm
2024-06-04 13:47:46,645 aap_eda.core.management.commands.scheduler INFO     No scheduled jobs. Skipping.
2024-06-04 13:47:46,645 aap_eda.core.management.commands.scheduler INFO     Adding periodic job "aap_eda.tasks.orchestrator.enqueue_monitor_rulebook_processes"
2024-06-04 13:47:46,648 aap_eda.core.management.commands.scheduler INFO     Adding periodic job "aap_eda.tasks.project.monitor_project_tasks"
2024-06-04 13:47:46,649 aap_eda.core.management.commands.scheduler INFO     No scheduled jobs. Skipping.
13:47:46 Registering birth
2024-06-04 13:47:46,650 rq_scheduler.scheduler INFO     Registering birth