Skip to content

Upstream 16074 - Validate max_length for scm_branch#243

Merged
cigamit merged 1 commit intomainfrom
upstream16074
Feb 28, 2026
Merged

Upstream 16074 - Validate max_length for scm_branch#243
cigamit merged 1 commit intomainfrom
upstream16074

Conversation

@cigamit
Copy link
Copy Markdown
Contributor

@cigamit cigamit commented Feb 28, 2026

Upstream Notes:
Validates max_length for the scm_branch field in the API.

Our team hit a bug where one of them pasted, by mistake, a very long value at the Source control branch field.
The workflow job templates were in "running" state in the AWX UI, but no job was started. It all led to a debugging session and this PR.

@cigamit cigamit requested a review from TheWitness February 28, 2026 03:12
@cigamit cigamit self-assigned this Feb 28, 2026
Copilot AI review requested due to automatic review settings February 28, 2026 03:12
@cigamit cigamit added bug Something isn't working python Pull requests that update python code labels Feb 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds API-side validation to prevent excessively long scm_branch values from being accepted, addressing a workflow launch failure mode where overly long branch strings could leave workflows stuck “running” without starting jobs.

Changes:

  • Add max_length=1024 validation to scm_branch in workflow job template/job serializers.
  • Add max_length=1024 validation to scm_branch in workflow/job launch serializers (including bulk launch).
  • Centralize the behavior across multiple serializers that previously accepted unbounded branch input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread awx/api/serializers.py
Comment thread awx/api/serializers.py
@cigamit cigamit merged commit 402ac0a into main Feb 28, 2026
4 checks passed
@cigamit cigamit deleted the upstream16074 branch February 28, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python Pull requests that update python code

Development

Successfully merging this pull request may close these issues.

3 participants