fix(iwooos): prioritize Wazuh posture claim
Some checks failed
CD Pipeline / select-latest-carrier (push) Successful in 1m0s
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m22s
CD Pipeline / revalidate-deploy-carrier (push) Successful in 30s
CD Pipeline / revalidate-post-deploy-carrier (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / select-latest-carrier (push) Successful in 1m0s
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m22s
CD Pipeline / revalidate-deploy-carrier (push) Successful in 30s
CD Pipeline / revalidate-post-deploy-carrier (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -9580,6 +9580,9 @@ async def claim_pending_check_modes(
|
||||
)
|
||||
ORDER BY
|
||||
CASE
|
||||
WHEN candidate.input ->> 'work_item_id'
|
||||
= 'P0-03-WAZUH-MANAGER-POSTURE'
|
||||
THEN -1
|
||||
WHEN candidate.input ->> 'work_item_id' LIKE 'P0-%'
|
||||
THEN 0
|
||||
WHEN candidate.input ->> 'proposal_source'
|
||||
@@ -12022,6 +12025,18 @@ async def run_pending_check_modes_once(
|
||||
0,
|
||||
remaining_limit - len(wazuh_capability_retry_claims),
|
||||
)
|
||||
fresh_claims = (
|
||||
await claim_pending_check_modes(
|
||||
project_id=project_id,
|
||||
limit=min(1, remaining_limit),
|
||||
candidate_max_age_hours=(
|
||||
settings.AWOOOP_ANSIBLE_CHECK_MODE_CANDIDATE_MAX_AGE_HOURS
|
||||
),
|
||||
)
|
||||
if remaining_limit
|
||||
else []
|
||||
)
|
||||
remaining_limit = max(0, remaining_limit - len(fresh_claims))
|
||||
reclaimed_claims = (
|
||||
await claim_stale_pending_check_modes(
|
||||
project_id=project_id,
|
||||
@@ -12123,25 +12138,14 @@ async def run_pending_check_modes_once(
|
||||
fresh_candidate_claim_continues=True,
|
||||
)
|
||||
remaining_limit = max(0, remaining_limit - len(catalog_replay_claims))
|
||||
fresh_claims = (
|
||||
await claim_pending_check_modes(
|
||||
project_id=project_id,
|
||||
limit=remaining_limit,
|
||||
candidate_max_age_hours=(
|
||||
settings.AWOOOP_ANSIBLE_CHECK_MODE_CANDIDATE_MAX_AGE_HOURS
|
||||
),
|
||||
)
|
||||
if remaining_limit
|
||||
else []
|
||||
)
|
||||
claims = [
|
||||
*wazuh_capability_retry_claims,
|
||||
*fresh_claims,
|
||||
*reclaimed_claims,
|
||||
*stdin_boundary_replay_claims,
|
||||
*semantic_catalog_reconciliation_claims,
|
||||
*failed_apply_catalog_replay_claims,
|
||||
*catalog_replay_claims,
|
||||
*fresh_claims,
|
||||
]
|
||||
execution_claims = [*wazuh_break_glass_apply_claims, *claims]
|
||||
completed = 0
|
||||
|
||||
Reference in New Issue
Block a user