ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.06k stars 3.42k forks source link

AWX 19.1: management jobs with a "days" parameter can not be scheduled at all #10153

Open lemmy04 opened 3 years ago

lemmy04 commented 3 years ago
ISSUE TYPE
SUMMARY

On top of #10152 there is also a bug that makes it impossible to edit a schedule with a "days" parameter.

ENVIRONMENT
STEPS TO REPRODUCE
  1. in management jobs click on "cleanup job details" or "cleanup activity stream"
  2. create or edit the schedule
  3. manually set the start time to some meaningful value, like "01-01-1971T00:00:00"
  4. try to save the job
EXPECTED RESULTS

The job should be saved with the new settings

ACTUAL RESULTS

There is an error: "can't assign to property "days" on "{\"days\":\"30\"}": not an object" and the job is not saved.

nixocio commented 3 years ago

hello @lemmy04, I was not able to reproduce this issue.

With a fresh install from dev environment, I was able to modify the schedules for Management Jobs.

Do you have data - schedules from a previous AWX version? Also what browser are you using?

image
lemmy04 commented 3 years ago

browser: normally firefox, right now chrome because of #9871 - and my AWX has imported data from a previous instance.

jakemcdermott commented 3 years ago

@lemmy04 Those are helpful details, thank you.

Do you see any issues at all when on chrome?

The reason I ask: If the problem is "fixed" when you switch to chrome, then this bug is probably specific to that raw text field that is only used by firefox. We're about to remove that raw text field anyway, so it's likely this bug would be fixed in the process.

lemmy04 commented 3 years ago

I'm getting the "can't assign 30 to..." error in chrome as well.

jakemcdermott commented 3 years ago

D'oh, I thought I was on https://github.com/ansible/awx/issues/10152

^ Do you still see that one on chrome? thanks again

lemmy04 commented 3 years ago

the "can't assign 30 to days" error happens with any browser - firefox, chrome, edge.

markocelan commented 1 year ago

Hi, I solved it by manually removing(set to empty value) the field directly in DB. Field is called 'extra_data' in table 'main_schedule'. After doing that UI shows a default value of 30 days and I can change it and save it.

I believe that escaping of JSON in this field changed in some version which manifested as this bug.

mabashian commented 1 year ago

This will be addressed by https://github.com/ansible/awx/pull/13795