Skip to content

Conversation

@MrFreezeex
Copy link
Contributor

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Restore the behavior before commit 95d19f2 to not force the message to an empty string if the tasks slice is empty. This broke the Prune=confirm features that set a message but get overwritten here. Also add a Prune=confirm unit test to prevent further regression.

@MrFreezeex MrFreezeex requested a review from a team as a code owner January 9, 2026 18:07
@bunnyshell
Copy link

bunnyshell bot commented Jan 9, 2026

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@MrFreezeex
Copy link
Contributor Author

Hi again @agaudreault 👋, while investigating why #23370 unit test was not working I discovered this regression in master linked to an improvement you made a few weeks ago in this PR: #25668

rumstead
rumstead previously approved these changes Jan 12, 2026
Copy link
Member

@rumstead rumstead left a comment

Choose a reason for hiding this comment

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

LGTM


func (sc *syncContext) setRunningPhase(tasks syncTasks, isPendingDeletion bool) {
if tasks.Len() == 0 {
sc.setOperationPhase(common.OperationRunning, "")
Copy link
Member

Choose a reason for hiding this comment

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

Running should not preserve the last message. Instead, it should by able based on the list of task to determine the message that the sync is waiting for applications to be pruned. In this case, it might not receive the correct list of task if it is empty.

Copy link
Member

@agaudreault agaudreault Jan 12, 2026

Choose a reason for hiding this comment

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

You should investigate what sets the message to "Waiting for pruning confirmation" and move the logic to setRunningPhase. You will also need to investigate what calls setRunningPhase with an empty list of task.

IMO, not setting the operation to Running in the setRunningPhase is incorrect. There is a unit test missing that should validate that setRunningPhase sets the phase to running if tasks is empty.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah ok I see, is something my last push what you would be looking for then?

@MrFreezeex MrFreezeex force-pushed the fix-empty-task-message branch from 127b5f3 to d805a32 Compare January 12, 2026 20:33
setRunningPhase was overwriting the message when it receives an empty
list of tasks while we were setting the message before setRunningPhase
was called which broke the prune confirmation message since commit
95d19f2.

This moves the message logic in setRunningPhase with the rest of the message
logic and remove the tasks filtering when the sync is pending to allow
retrieving the pruning tasks and construct the message indicating to
wait for pruning confirmation.

Also add a unit test covering this recently broken behavior

Signed-off-by: Arthur Outhenin-Chalandre <[email protected]>
@MrFreezeex MrFreezeex force-pushed the fix-empty-task-message branch from d805a32 to 7ef43a9 Compare January 12, 2026 20:34
@MrFreezeex MrFreezeex changed the title fix(engine): preserve message in setRunningPhase when task list is empty fix(engine): correctly set prune confirmation message in setRunningPhase Jan 12, 2026
@rumstead rumstead dismissed their stale review January 12, 2026 20:46

dismiss

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.

3 participants