Commit Graph

62 Commits

Author SHA1 Message Date
beeankha
675286c1ac Enable ?page_size=1 in URL to fetch correct objects on schedules endpoint 2021-03-29 11:52:20 -04:00
Ryan Petrello
c2ef0a6500 move code linting to a stricter pep8-esque auto-formatting tool, black 2021-03-23 09:39:58 -04:00
Ryan Petrello
bf1d93168b fix an rrule bug that causes improper HOURLY/MINUTELY calculation
see: https://github.com/ansible/awx/issues/8071
2020-09-18 12:06:07 -04:00
Ryan Petrello
6bd5053ae8 remove the limitation on (very) old DTSTART values for schedules 2020-04-03 10:59:35 -04:00
Ryan Petrello
5f2e1c9705 fix a tz parsing bug 2019-10-16 09:46:18 -04:00
AlanCoding
40f9d0b512 More precise handling of schedule computed fields no-ops
Do not set a next_run value for disabled schedules
Bail if no fields are changed
Do not update related template if its fields did not change

Change call pattern to schedule.update_computed_fields()
in doing so, fix bug where template does not pick up schedule
  due to schedules next_run not being saved

Handle the case (also a bug) where template was not updated
  when schedule was deleted
2019-05-23 08:13:37 -04:00
Vismay Golwala
4af54517d2 Update standalone schedule name uniqueness combining it with unified job template.
Signed-off-by: Vismay Golwala <vgolwala@redhat.com>
2019-02-13 12:46:28 -05:00
AlanCoding
fbf6315a8c remove star imports in tasks and non-base models 2019-02-12 19:50:30 -05:00
Ryan Petrello
f223df303f convert py2 -> py3 2019-01-15 14:09:01 -05:00
Ryan Petrello
c695ba2e10 fix flake8 2018-10-24 10:11:53 -04:00
Ryan Petrello
39cb1cb60c fix a nuanced parsing bug in naive UNTIL= parsing 2018-05-16 09:35:04 -04:00
Ryan Petrello
c52eb0f327 provide a naive UNTIL= datestamp for schedules for UI convenience 2018-05-09 15:51:52 -04:00
Ryan Petrello
056933e33e refactor naive UNTIL= coercion 2018-05-09 15:00:48 -04:00
Ryan Petrello
00ae91dace slight cleanup and refactor of Schedule.timezone property 2018-05-08 08:28:51 -04:00
Ryan Petrello
441e5cc9c2 allow naive UNTILs to be specified for schedule rrules 2018-05-07 13:00:01 -07:00
Ryan Petrello
fbe2391b86 provide the timezone so that the UI doesn't have to
this will also ensure that UI doesn't use a different front end library
that will yield different results than the underlying Python code
2018-05-07 13:00:01 -07:00
Ryan Petrello
21d629531f remove an RRULE parsing bug fix that landed upstream in python-dateutil
related: a2a246a834
2018-03-26 18:02:52 -04:00
Ryan Petrello
44adab0e9e bump python-dateutil to latest
this change provides support for numerous bug fixes, along with
support for parsing TZINFO= from rrule strings

related: https://github.com/ansible/ansible-tower/issues/823
related: https://github.com/dateutil/dateutil/issues/614
2018-03-12 12:20:03 -04:00
Ryan Petrello
887f16023a improve detection of expensive DTSTART RRULE values 2018-02-08 08:54:30 -05:00
Ryan Petrello
0a8df7fde2 work around a bug in dateutil that incorrectly parses Z dates
related: https://github.com/dateutil/dateutil/issues/349
2018-02-01 15:51:59 -05:00
Ryan Petrello
6753f1ca35 adhere to RFC5545 regarding UNTIL timezones
If the "DTSTART" property is specified as a date with UTC time or a date with
local time and time zone reference, then the UNTIL rule part MUST be specified
as a date with UTC time.
2018-01-29 12:42:31 -05:00
Ryan Petrello
6f0c937236 don't allow distant DTSTART values for schedules; it's slow
see: https://github.com/ansible/ansible-tower/issues/7869
2018-01-29 10:16:03 -05:00
Ryan Petrello
9857c8272e add more tests for weird timezone/DST boundaries in schedules
see: https://github.com/ansible/awx/pull/1024
2018-01-22 14:57:57 -05:00
Ryan Petrello
15906b7e3c support TZID= in schedule rrules
this commit allows schedule `rrule` strings to include local timezone
information via TZID=NNNNN; occurrences are _generated_ in the local
time specific by the user (or UTC, if e.g., DTSTART:YYYYMMDDTHHMMSSZ)
while Schedule.next_run, Schedule.dtstart, and Schedule.dtend will be
stored in the UTC equivalent (i.e., the scheduler will still do math on
"what to run next" based on UTC datetimes).

in addition to this change, there is now a new API endpoint,
`/api/v2/schedules/preview/`, which takes an rrule and shows the next
10 occurrences in local and UTC time.

see: https://github.com/ansible/ansible-tower/issues/823
related: https://github.com/dateutil/dateutil/issues/614
2018-01-22 11:50:00 -05:00
AlanCoding
80a2d10742 fix bug when creating system job schedule 2017-12-20 15:30:57 -05:00
Matthew Jones
9dbcc5934e Merge remote-tracking branch 'tower/release_3.2.2' into devel 2017-12-13 12:25:47 -05:00
AlanCoding
1c8217936d Bug fixes from integration ran on launchtime branch
Make error message for muti-vault validation more
consistent with historical message
2017-12-08 13:46:38 -05:00
AlanCoding
34a8e0a9b6 Feature: saved launchtime configurations
Consolidate prompts accept/reject logic in unified models
Break out accept/reject logic for variables
Surface new promptable fields on WFJT nodes, schedules

Make schedules and workflows accurately reject variables
  that are not allowed by the prompting
  rules or the survey rules on the template

Validate against unallowed extra_data in system job schedules
Prevent schedule or WFJT node POST/PATCH with unprompted data
Move system job days validation to new mechanism
Add new psuedo-field for WFJT node credential
Add validation for node related credentials
Add related config model to unified job
Use JobLaunchConfig model for launch RBAC check

Support credential overwrite behavior with multi-creds
  change modern manual launch to use merge behavior
Refactor JobLaunchSerializer, self.instance=None
Modularize job launch view to create "modern" data
Auto-create config object with every job
Add create schedule endpoint for jobs
2017-12-08 13:38:54 -05:00
AlanCoding
67867cf0c8 flake8: comply with new E722 rule 2017-12-01 12:16:44 -05:00
AlanCoding
90f63774f4 flake8: comply with new E722 rule 2017-10-23 14:36:48 -04:00
Chris Meyers
41ae7b5120 validate schedule extra_data
related to #4779

* Ensure days is a non-negative integer
* Ensure that extra_data is a json payload
2017-07-21 10:46:44 -04:00
Bill Nottingham
f8515857b2 Remove assorted references to Tower.
Reword and remove references to Tower so they don't need parameterized.
2017-07-05 16:42:47 -04:00
Ryan Petrello
95ea370e5e add API versioning for /api/v2/ 2017-03-30 15:11:12 -04:00
Matthew Jones
71c600cad0 more missing punctuation 2016-12-06 13:18:34 -05:00
Matthew Jones
eebdd13aa1 Updating schedules help text 2016-12-06 11:39:08 -05:00
AlanCoding
339661a6a5 New method to monkeypatch JSONField 2016-11-14 16:35:56 -05:00
Wayne Witzel III
5faa21b72d add group_name to channel data 2016-09-27 18:39:14 -04:00
Wayne Witzel III
4c8aaf1aed converting from socketio to channels websocket 2016-09-27 18:39:07 -04:00
Akita Noek
6ea99583da Mass active flag code removal 2016-03-15 09:29:55 -04:00
Chris Church
60224cdbe4 Update Django to 1.8 and DRF to 3.3, add new Django migrations, update serializers/pagination/metadata, update browsable API styling. 2016-02-02 17:48:04 -05:00
John Mitchell
32d1c0e4db fixed copyright date 2015-06-11 16:10:23 -04:00
Matthew Jones
b3da3b34a3 Changing some legal headers for python source files 2015-05-29 12:10:39 -04:00
Matthew Jones
6a18a50d99 Fixing flake8 errors, this should be almost all of them! 2015-02-11 16:42:55 -05:00
Matthew Jones
103929c9ee Allow passing variables with schedules to support extra data on system jobs 2014-10-17 14:41:00 -04:00
Matthew Jones
e35a530dbb Rename from schedule_change to schedule_changed to fit our socketio motif. 2014-07-18 13:24:38 -04:00
Matthew Jones
e72728b38c Add schedule based socket.io events for AC-1333 2014-06-10 15:58:57 -04:00
Matthew Jones
ac94c11fd7 Adjust inventory computed field calculations to happen in the celery context 2014-04-30 14:38:08 -04:00
Matthew Jones
f06dde4fa3 Fix AC-1202... when marking a schedule as inactive also mark it as disabled. When filtering schedules for what should run make sure we exclude inactive schedules also 2014-04-17 10:14:53 -04:00
Matthew Jones
69583a1b07 Import socketio service work and updates to documentation and setup procedures 2014-04-16 15:27:04 -04:00
Chris Church
e8b0d7451e AC-1182 Handle a schedule rrule that results in zero occurrences. 2014-04-15 13:24:06 -04:00