Skip to content

Honor transitionOneDayEarlier in v1 lifecycle transitions - #2844

Open
maeldonn wants to merge 2 commits into
development/9.4from
bugfix/BB-867/one-day-earlier
Open

maeldonn wants to merge 2 commits into
development/9.4from
bugfix/BB-867/one-day-earlier

Conversation

@maeldonn

@maeldonn maeldonn commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

The v1 eligibility pre-filter and the noncurrent version transition apply compared raw rule days, ignoring transitionOneDayEarlier, so eligible objects were silently skipped while the current version apply stage honors the flag. Compute eligibility with LifecycleDateTime, as the apply stage does.

Issue: BB-867

@bert-e

bert-e commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Hello maeldonn,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue BB-867 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.5.3

  • 9.6.0

Please check the Fix Version/s of BB-867, or the target
branch of this pull request.

Comment thread extensions/lifecycle/tasks/LifecycleTask.js Outdated
Comment thread tests/unit/lifecycle/LifecycleTask.spec.js Outdated
@maeldonn
maeldonn changed the base branch from development/9.5 to development/9.4 September 9, 2026 12:50
@bert-e

bert-e commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Foreign commits detected in source branch

The source branch bugfix/BB-867/one-day-earlier shares history with the following
release line(s), which are not ancestors of development/9.4:

  • development/9.5

  • development/9.6

This typically happens when the feature branch was accidentally based on
commits from a higher release line rather than directly on development/9.4.
Common causes include:

  • Rebasing on a Bert-E integration branch (e.g. a w/ branch) instead of
    directly on development/9.4
  • Branching from a higher development branch instead of development/9.4
  • Merging a higher development branch into the feature branch

How to fix

Create a new branch directly from development/9.4 and cherry-pick your
changes onto it:

git checkout -b <new-branch-name> origin/development/9.4
git cherry-pick <your-commits>

Then open a new pull request from that branch.

If this is a false positive

If your branch is a legitimate backport and was previously merged into one
of the branches above before being extended with new commits, an
administrator can bypass this check with:

@bert-e bypass_source_branch_lineage

@maeldonn
maeldonn force-pushed the bugfix/BB-867/one-day-earlier branch from fe41097 to d65472e Compare September 9, 2026 12:50
@bert-e

bert-e commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue BB-867 contains:

  • 9.5.3

  • 9.6.0

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.4.4

  • 9.5.3

  • 9.6.0

Please check the Fix Version/s of BB-867, or the target
branch of this pull request.

@codecov

codecov Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.62%. Comparing base (1f35ed7) to head (3a9910c).

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
extensions/lifecycle/tasks/LifecycleTask.js 91.85% <100.00%> (+0.29%) ⬆️

... and 5 files with indirect coverage changes

Components Coverage Δ
Bucket Notification 80.27% <ø> (ø)
Core Library 80.82% <ø> (-0.66%) ⬇️
Ingestion 70.72% <ø> (+0.08%) ⬆️
Lifecycle 79.10% <100.00%> (+0.03%) ⬆️
Oplog Populator 85.83% <ø> (ø)
Replication 59.65% <ø> (-0.04%) ⬇️
Bucket Scanner 85.76% <ø> (ø)
@@                 Coverage Diff                 @@
##           development/9.4    #2844      +/-   ##
===================================================
- Coverage            74.88%   74.62%   -0.27%     
===================================================
  Files                  201      201              
  Lines                13761    13757       -4     
===================================================
- Hits                 10305    10266      -39     
- Misses                3446     3481      +35     
  Partials                10       10              
Flag Coverage Δ
api:retry 9.09% <0.00%> (+<0.01%) ⬆️
api:routes 8.91% <0.00%> (+<0.01%) ⬆️
bucket-scanner 85.76% <ø> (ø)
ft_test:queuepopulator 9.13% <0.00%> (-1.84%) ⬇️
ingestion 12.57% <0.00%> (+0.01%) ⬆️
lib 8.87% <0.00%> (+0.01%) ⬆️
lifecycle 19.03% <72.72%> (+<0.01%) ⬆️
notification 1.03% <0.00%> (+<0.01%) ⬆️
oplogPopulator 0.14% <0.00%> (+<0.01%) ⬆️
replication 18.61% <0.00%> (-0.04%) ⬇️
unit 51.70% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@francoisferrand francoisferrand left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if we should really fix this:

  • transitionOneDayEarlier is not really needed, since we can configure the system to transition after 0 day (expireOneDayEarlier is more useful, since the minimum delay for expiration is 1 day)
  • both flags are kind of deprecated, timeProgressionFactor should be used instead
  • while sound in principle (e.g. use getTransitionTimestamp consistently to filter), I fear it may be complicated to insert cleanly in the code, without breaking abstractions levels...

Comment thread extensions/lifecycle/tasks/LifecycleTask.js Outdated
@SylvainSenechal

Copy link
Copy Markdown
Contributor

I wonder if we should really fix this:

  • transitionOneDayEarlier is not really needed, since we can configure the system to transition after 0 day (expireOneDayEarlier is more useful, since the minimum delay for expiration is 1 day)
  • both flags are kind of deprecated, timeProgressionFactor should be used instead
  • while sound in principle (e.g. use getTransitionTimestamp consistently to filter), I fear it may be complicated to insert cleanly in the code, without breaking abstractions levels...

I just saw this comment : I wonder, are these only used for our own testing, or do we have clients using them ?
I know timeProgressionFactor is used in the zenko cucumber tests.

If we can confirm that these 2 expire/transitionOneDayEarlier are only used for easier testing and not by clients, then yeah imo we should leave or deprecate them more actively

@SylvainSenechal

SylvainSenechal commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor
  • transitionOneDayEarlier

in zenko operator, they are called "xxxforTesting" :

transitionsOneDayEarlier := cr.Spec.Backbeat.LifecycleBucketProcessor.TriggerTransitionsOneDayEarlierForTesting
expirationsOneDayEarlier := cr.Spec.Backbeat.TriggerExpirationsOneDayEarlierForTesting
timeProgressionFactor := cr.Annotations[timeProgressionFactorAnnotation]

Probably worth to take a look and see if we can just remove that code and just keep time progression factor 🤔

@SylvainSenechal SylvainSenechal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

discussion, see comments

@maeldonn

maeldonn commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor Author

I reproduced both bugs on my artesca lab, and the fix ended up small, so I kept it. I'll check whether we can remove the deprecated flags and open a follow-up ticket if so.

Edit: removing both env vars looks doable, so I dropped the transitionOneDayEarlier fix from this PR. It now only stops expireOneDayEarlier from shifting transitions.

@bert-e

bert-e commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@maeldonn
maeldonn force-pushed the bugfix/BB-867/one-day-earlier branch from ad0c265 to 155c9fd Compare September 29, 2026 15:13
Comment thread extensions/lifecycle/tasks/LifecycleTask.js Outdated

@francoisferrand francoisferrand left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks simpler indeed, but at the cost of duplication (2 "lifecycleDateTime") and CPU (computing the transition/expiration/current date multiple times, for each rule)... So still not sure it is worth the effort...

Comment thread extensions/lifecycle/tasks/LifecycleTask.js Outdated
Comment thread extensions/lifecycle/tasks/LifecycleTask.js
Comment thread extensions/lifecycle/tasks/LifecycleTask.js Outdated
Comment thread extensions/lifecycle/tasks/LifecycleTask.js
Comment thread extensions/lifecycle/tasks/LifecycleTask.js Outdated
Comment thread extensions/lifecycle/tasks/LifecycleTask.js Outdated
The v1 eligibility pre-filter and the noncurrent version transition
apply compared raw rule days, ignoring transitionOneDayEarlier, while
arsenal's getApplicableRules honors it. Eligible objects were skipped
by the v1 pre-filter, and noncurrent versions were not transitioned
early, also on the v2 task which reuses the same apply check. Compute
transition times with LifecycleDateTime, as getApplicableRules does.

Issue: BB-867
Transition times were compared with getCurrentDate(), which is shifted
by expireOneDayEarlier, so that flag moved transitions one day earlier
too: noncurrent version transitions on both v1 and v2 tasks, and the
v1 eligibility pre-filter. With both flags set, the shifts stacked.
Compare transition times with the real clock, as arsenal's
getApplicableRules does.

Issue: BB-867

This branch has not been deployed

No deployments
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.

4 participants