This contains commands to demo the fix in this patch:
Postgres documents the types of locking it uses here:
https://www.postgresql.org/docs/current/explicit-locking.html
{ | |
"count": 1, | |
"next": null, | |
"previous": null, | |
"results": [ | |
{ | |
"id": 14, | |
"type": "user", | |
"url": "/api/v2/users/14/", | |
"related": { |
{ | |
"child_models": { | |
"awx.instancegroup": {}, | |
"shared.organization": { | |
"awx.credential": {}, | |
"awx.executionenvironment": {}, | |
"awx.inventory": {}, | |
"awx.jobtemplate": {}, | |
"awx.notificationtemplate": {}, | |
"awx.project": {}, |
$ cargo run --release | |
info: syncing channel updates for '1.76-x86_64-unknown-linux-gnu' | |
info: latest update on 2024-02-08, rust version 1.76.0 (07dca489a 2024-02-04) | |
info: downloading component 'cargo' | |
info: downloading component 'clippy' | |
info: downloading component 'rust-std' for 'aarch64-apple-darwin' | |
info: downloading component 'rust-std' for 'wasm32-wasi' | |
info: downloading component 'rust-std' for 'x86_64-apple-darwin' | |
info: downloading component 'rust-std' | |
info: downloading component 'rustc' |
{ | |
"count": 55, | |
"next": "/api/v2/organizations/33/access_list/?page=2", | |
"previous": null, | |
"results": [ | |
{ | |
"id": 1, | |
"type": "user", | |
"url": "/api/v2/users/1/", | |
"related": { |
system_administrator | |
instancegroup.admin_role | |
credential.admin_role | |
organization.admin_role | |
workflowjobtemplate.admin_role | |
project.admin_role | |
instancegroup.use_role | |
instancegroup.read_role | |
credential.use_role | |
credential.read_role |
This contains commands to demo the fix in this patch:
Postgres documents the types of locking it uses here:
https://www.postgresql.org/docs/current/explicit-locking.html
awx=# \d main_organization; | |
Table "public.main_organization" | |
Column | Type | Collation | Nullable | Default | |
-------------------------------------+--------------------------+-----------+----------+---------------------------------- | |
id | integer | | not null | generated by default as identity | |
created | timestamp with time zone | | not null | | |
modified | timestamp with time zone | | not null | | |
description | text | | not null | | |
name | character varying(512) | | not null | | |
created_by_id | integer | | | |
diff --git a/awx/api/views/__init__.py b/awx/api/views/__init__.py | |
index 609e88e155..141820ce73 100644 | |
--- a/awx/api/views/__init__.py | |
+++ b/awx/api/views/__init__.py | |
@@ -2745,6 +2745,11 @@ class WorkflowJobNodeList(ListAPIView): | |
serializer_class = serializers.WorkflowJobNodeListSerializer | |
search_fields = ('unified_job_template__name', 'unified_job_template__description') | |
+ def get_queryset(self): | |
+ parent = self.get_parent_object() |
SELECT "main_unifiedjob"."id", | |
"main_unifiedjob"."polymorphic_ctype_id", | |
"main_unifiedjob"."modified", | |
"main_unifiedjob"."description", | |
"main_unifiedjob"."created_by_id", | |
"main_unifiedjob"."modified_by_id", | |
"main_unifiedjob"."name", | |
"main_unifiedjob"."execution_environment_id", | |
"main_unifiedjob"."old_pk", | |
"main_unifiedjob"."emitted_events", |