Skip to content

Reject overlapping package jobs for the same project - #659

Open
MUFFANUJ wants to merge 1 commit into
nebari-dev:ux-rework-devfrom
MUFFANUJ:rejectDupPacJobs
Open

MUFFANUJ wants to merge 1 commit into
nebari-dev:ux-rework-devfrom
MUFFANUJ:rejectDupPacJobs

Conversation

@MUFFANUJ

Copy link
Copy Markdown
Member

Reference Issues or PRs

Fixes #658.

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Documentation

Access-centered content checklist

Text styling

  • The content is written with plain language (where relevant).
  • If there are headers, they use the proper header tags (with only one level-one header: H1 or # in markdown).
  • All links describe where they link to (for example, check the Nebari website).
  • This content adheres to the Nebari style guides.

Non-text content

  • All content is represented as text (for example, images need alt text, and videos need captions or descriptive transcripts).
  • If there are emojis, there are not more than three in a row.
  • Don't use flashing GIFs or videos.
  • If the content were to be read as plain text, it still makes sense, and no information is missing.

Any other comments?

Package add and remove requests now return 409 Conflict when the same project already has a pending or running package job. The check runs inside the job admission transaction, so concurrent requests can create only one job. It reuses the conflict check from environment install and uninstall. Other projects can still submit jobs, and rejected requests can be retried after the active job finishes.

The HTTP regression test verifies that concurrent requests with different package lists produce one 202 Accepted and one 409 Conflict, and that retrying the rejected request succeeds after the active job finishes. The test reproduced the original bug and passed 20 runs with race detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant