Skip to content

MDBF-1225: Use claimed time for obsolete request cutoff#978

Merged
RazvanLiviuVarzaru merged 1 commit into
MariaDB:devfrom
RazvanLiviuVarzaru:fix/cancel-older-claimed-at-cutoff
Jun 25, 2026
Merged

MDBF-1225: Use claimed time for obsolete request cutoff#978
RazvanLiviuVarzaru merged 1 commit into
MariaDB:devfrom
RazvanLiviuVarzaru:fix/cancel-older-claimed-at-cutoff

Conversation

@RazvanLiviuVarzaru

@RazvanLiviuVarzaru RazvanLiviuVarzaru commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This is a fix for: MDBF-1200 :: resolving a timing issue where not all older br's were cancelled.

CancelOlderSameBranchRequests previously used the current buildset submitted_at as the cutoff for deciding which matching buildrequests were older. That is too early for tarball-docker: the newer tarball buildrequest may be queued while the previous tarball is still finishing and triggering downstream buildsets. Those downstream requests can then be submitted after the newer tarball request was queued, so only the subset submitted before that queued timestamp gets cancelled.

Use the current buildrequest claimed_at instead. By the time tarball-docker is running this step, Buildbot has already claimed the buildrequest to create/run the build, so claimed_at is expected to be present and marks the point where the newer tarball actually started being handled by a master.

For candidates, use br.get('submitted_at') from the buildrequest data returned by the /buildrequests query. Buildbot exposes buildrequest claimed_at and submitted_at as the same DateTime type, while buildset submitted_at is converted to an integer epoch value by the buildsets data API. Comparing buildrequest timestamps avoids extra type conversion and avoids mixing the two API representations. The buildset lookup remains only for sourcestamps used by the branch/repository/codebase/revision match.

@RazvanLiviuVarzaru RazvanLiviuVarzaru changed the title Use claimed time for obsolete request cutoff MDBF-1200 fix up: Use claimed time for obsolete request cutoff Jun 23, 2026
CancelOlderSameBranchRequests previously used the current buildset submitted_at as the cutoff for deciding which matching buildrequests were older. That is too early for tarball-docker: the newer tarball buildrequest may be queued while the previous tarball is still finishing and triggering downstream buildsets. Those downstream requests can then be submitted after the newer tarball request was queued, so only the subset submitted before that queued timestamp gets cancelled.

Use the current buildrequest claimed_at instead. By the time tarball-docker is running this step, Buildbot has already claimed the buildrequest to create/run the build, so claimed_at is expected to be present and marks the point where the newer tarball actually started being handled by a master.

For candidates, use br.get('submitted_at') from the buildrequest data returned by the /buildrequests query. Buildbot exposes buildrequest claimed_at and submitted_at as the same DateTime type, while buildset submitted_at is converted to an integer epoch value by the buildsets data API. Comparing buildrequest timestamps avoids extra type conversion and avoids mixing the two API representations. The buildset lookup remains only for sourcestamps used by the branch/repository/codebase/revision match.
@RazvanLiviuVarzaru RazvanLiviuVarzaru force-pushed the fix/cancel-older-claimed-at-cutoff branch from 050be9f to 5830d50 Compare June 25, 2026 07:08
@RazvanLiviuVarzaru RazvanLiviuVarzaru merged commit a821658 into MariaDB:dev Jun 25, 2026
3 checks passed
@RazvanLiviuVarzaru RazvanLiviuVarzaru changed the title MDBF-1200 fix up: Use claimed time for obsolete request cutoff MDBF-1225: Use claimed time for obsolete request cutoff Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants