* Create a new pytest folder for live system testing with normal services (#15688)
* PoC for running dev env tests
* Replace in github actions
* Move folder to better location
* Further streamlining of new test folders
* Consolidate fixture, add writeup docs
* Use star import
* Push the wait-for-job to the conftest
Fix misused project cache identifier (#15690)
Fix project cache identifiers for new updates
Finish test and discover viable solution
Add comment on related task code
AAP-37989 Tests for exclude list with multiple jobs (#15722)
* Tests for exclude list with multiple jobs
Create test for using manual & file projects (#15754)
* Create test for using a manual project
* Chang default project factory to git, remove project files monkeypatch
* skip update of factory project
* Initial file scaffolding for feature
* Fill in galaxy and names
* Add README, describe project folders and dependencies
Add ee cleanup tests
* Adds cleanup tests to the live test.
Fix rsyslog permission error in github ubuntu tests from apparmor (#15717)
* Add test to detect rsyslog config problems
* Get dmesg output
* Disable apparmor for rsyslogd
Make awx/main/tests/live dramatically faster (#15780)
* Make awx/main/tests/live dramatically faster
* Add new setting to exclude list
* Fix rebase issues
* Did not want to backport this
* Feature indirect host counting (#15802)
* AAP-37282 Add parse JQ data and test it for a `job` object in isolation (#15774)
* Add jq dependency
* Add file in progress
* Add license for jq
* Write test and get it passing
* Successfully test collection of `event_query.yml` data (#15761)
* Callback plugin method from cmeyers adapted to global collection list
Get tests passing
Mild rebranding
Put behind feature flag, flip true in dev
Add noqa flag
* Add missing wait_for_events
* feat: try grabbing query files from artifacts directory (#15776)
* Contract changes for the event_query collection callback plugin (#15785)
* Minor import changes to collection processing in callback plugin
* Move agreed location of event_query file
* feat: remaining schema changes for indirect host audits (#15787)
* Re-organize test file and move artifacts processing logic to callback (#15784)
* Rename the indirect host counting test file
* Combine artifacts saving logic
* Connect host audit model to jq logic via new task
* Add unit tests for indirect host counting (#15792)
* Do not get django flags from database (#15794)
* Document, implement, and test remaining indirect host audit fields (#15796)
* Document, implement, and test remaining indirect host audit fields
* Fix hashing
* AAP-39559 Wait for all event processing to finish, add fallback task (#15798)
* Wait for all event processing to finish, add fallback task
* Add flag check to periodic task
* feat: cleanup of old indirect host audit records (#15800)
* By default, do not count indirect hosts (#15801)
* By default, do not count indirect hosts
* Fix copy paste goof
* Fix linter issue from base branch
* prevent multiple tasks from processing the same job events, prevent p… (#15805)
prevent multiple tasks from processing the same job events, prevent periodic task from spawning another task per job
* Fix typos and other bugs found by Pablo review
* fix: rely on resolved_action instead of task, adapt to proposed query… (#15815)
* fix: rely on resolved_action instead of task, adapt to proposed query structure
* tests: update indirect host tests
* update remaining queries to new format
* update live test
* Remove polling loop for job finishing event processing (#15811)
* Remove polling loop for job finishing event processing
* Make awx/main/tests/live dramatically faster (#15780)
* AAP-37282 Add parse JQ data and test it for a `job` object in isolation (#15774)
* Add jq dependency
* Add file in progress
* Add license for jq
* Write test and get it passing
* Successfully test collection of `event_query.yml` data (#15761)
* Callback plugin method from cmeyers adapted to global collection list
Get tests passing
Mild rebranding
Put behind feature flag, flip true in dev
Add noqa flag
* Add missing wait_for_events
* feat: try grabbing query files from artifacts directory (#15776)
* Contract changes for the event_query collection callback plugin (#15785)
* Minor import changes to collection processing in callback plugin
* Move agreed location of event_query file
* feat: remaining schema changes for indirect host audits (#15787)
* Re-organize test file and move artifacts processing logic to callback (#15784)
* Rename the indirect host counting test file
* Combine artifacts saving logic
* Connect host audit model to jq logic via new task
* Document, implement, and test remaining indirect host audit fields (#15796)
* AAP-39559 Wait for all event processing to finish, add fallback task (#15798)
* Wait for all event processing to finish, add fallback task
* Add flag check to periodic task
* feat: cleanup of old indirect host audit records (#15800)
* prevent multiple tasks from processing the same job events, prevent p… (#15805)
prevent multiple tasks from processing the same job events, prevent periodic task from spawning another task per job
* Remove polling loop for job finishing event processing (#15811)
* Make awx/main/tests/live dramatically faster (#15780)
* reorder migrations to allow indirect instances backport
* cleanup for rebase and merge into devel
---------
Co-authored-by: Peter Braun <pbraun@redhat.com>
Co-authored-by: jessicamack <jmack@redhat.com>
Co-authored-by: Peter Braun <pbranu@redhat.com>
* Publish image base on git repo name instead of hard coded to AWX (#15828)
* Fix git credential for devel_image build (#15834)
* Continue if pre-warm cache fail in container build (#15835)
* Use correct devel image for docker-compose (#15836)
* [AAP-39138] - Add DAB Feature Flag common API (#15786)
* Update django-ansible-base reference to ansible-automation-platform/django-ansible-base@stable-2.5
---------
Co-authored-by: Zack Kayyali <zkayyali@redhat.com>
Fixes an issue where schedules were not running at
the correct time.
Details:
DST is Daylights Saving Time
If the rrule dtstart is "in" a DST period (i.e., March to November)
and the current date is outside of the DST, then the fast forwarding
is not correct.
This is because datetime timedeltas do not honor DST boundaries
The Fix:
Convert the rrule dtstart to UTC before doing operations. Then,
convert back to the original timezone at the end.
Signed-off-by: Seth Foster <fosterbseth@gmail.com>
Adds fields client_id and client_secret which
will result in authentication via service account
on console.redhat.com
Signed-off-by: Seth Foster <fosterbseth@gmail.com>
* Fix incorrectly passed keywords with exclude-strings arg to ansible-runner worker cleanup command
* Keep the quotes for each arg and adjust test_receptor
---------
Signed-off-by: Sasa Jovicic <jovicic.sasa@hotmail.com>
Co-authored-by: Sasa Jovicic <jovicic.sasa@hotmail.com>
* Opened PR to test AAP-36522.
* Test pin specific ansible-core version in the run_awx_devel actions.
* Fixed syntax for ansible-core version.
* updated makefile to match syntax for ansible version
* Reverts makefile changes; fixed syntax for upgrade ansible-core action.
* host_metrics date fix
* AAP-36839 Remove excess comments
* fix extra date() conversion
* actual fix
* datetime is a library, use datetime.datetime
---------
Co-authored-by: Andrea Restle-Lay <arestlel@arestlel-thinkpadx1carbongen9.rht.csb>
Fixes a bug where a schedule that was created
to run only once will continue to run repeatedly.
e.g. an rrule with
dtstart 20240730; count 1; freq MINUTELY
This job will run on 20240730, and should never
run again.
However, the next time the schedule
update_computed_fields runs, the dtstart
will fast forward to today's date, and
next_run will be computed from that. This will trigger
the job to run again, which is not intended.
If count is set, we just should not fast forward the
rrule and always calculate next_run based on original
dtstart.
Signed-off-by: Seth Foster <fosterbseth@gmail.com>
the primary fix is to simply add an exception class
to those caught in the except block
This also adds live tests for the general scenario
although this does not hit the new exception type
By stable, we mean future occurrences of the rrule
should be the same before and after the fast forward
operation.
The problem before was that we were fast forwarding to
7 days ago. For some rrules, this does not retain the old
occurrences. Thus, jobs would launch at unexpected times.
This change makes sure we fast forward in increments of
the rrule INTERVAL, thus the new dtstart should be in the
occurrence list of the old rrule.
Additionally, code is updated to fast forward
EXRULE (exclusion rules) in addition to RRULE
---------
Signed-off-by: Seth Foster <fosterbseth@gmail.com>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>