-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Remove deprecated field update_on_project_update #12366
Remove deprecated field update_on_project_update #12366
Conversation
proj = src.source_project | ||
if proj and proj.update_on_launch == False: | ||
proj.update_on_launch = True | ||
proj.save(update_fields=['update_on_launch']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only change that might be somewhat consequential to the user. I would probably put a warning level log here. This is also a big item for the release notes.
We may be able to remove the SCM launch type awx/awx/main/models/unified_jobs.py Line 536 in 0df3c65
If not, I would advocate that we change it to deprecated. Inventory updates from before the migration could still validly have this status. |
Even if we do nothing on that Lines 1604 to 1606 in 0df3c65
|
A more minor deletion would be here: awx/awx/main/models/inventory.py Line 1307 in a3e2931
The condition |
@@ -1655,8 +1591,6 @@ def pre_run_hook(self, inventory_update, private_data_dir): | |||
sync_task = project_update_task(job_private_data_dir=private_data_dir) | |||
sync_task.run(local_project_sync.id) | |||
local_project_sync.refresh_from_db() | |||
inventory_update.inventory_source.scm_last_revision = local_project_sync.scm_revision | |||
inventory_update.inventory_source.save(update_fields=['scm_last_revision']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it may need something added back in. Jobs have an scm_revision
field to track which revision it ran. We may want to add back in a similar field for inventory updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be better to have InventorySource.scm_revision
to be consistent with Job.scm_revision
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hitting some similar questions in #12356. Jobs and inventory updates logically should have a multitude of things in common (like this) but it was never fully thought out. My short answer is "yes", it should be consistent, but the broader UI impact and things probably need to get some thought.
awx/main/migrations/0164_remove_inventorysource_update_on_project_update.py
Show resolved
Hide resolved
079ae3e
to
1d3a91b
Compare
a9ea31f
to
0522233
Compare
SUMMARY
remove deprecated fields
update_on_project_update
andscm_last_revision
for InventorySourcerelated #12206
todo: fix up / remove QA tests
ISSUE TYPE
COMPONENT NAME
AWX VERSION