Skip to content

Commit

Permalink
Ensure queue validation exception is catched
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet committed Jan 26, 2024
1 parent 6755b41 commit f86a5bd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bert_e/workflow/gitwaterflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@ def _handle_pull_request(job: PullRequestJob):
# the queue.
if job.settings.use_queue:
# validate current state of queues
try:
queues = queueing.build_queue_collection(job)
is_needed = queueing.is_needed(job, wbranches, queues)
except messages.IncoherentQueues as err:
raise messages.QueueOutOfOrder(
active_options=job.active_options) from err
queues = queueing.build_queue_collection(job)
is_needed = queueing.is_needed(job, wbranches, queues)
# Enter the merge queue!
if is_needed:
queues.validate()
try:
queues.validate()
except messages.IncoherentQueues as err:
raise messages.QueueOutOfOrder(
active_options=job.active_options) from err
queueing.add_to_queue(job, wbranches)
message = messages.Queued(
branches=job.git.cascade.dst_branches,
Expand Down

0 comments on commit f86a5bd

Please sign in to comment.