Skip to content

Conversation

@chethanac15
Copy link

Description

This PR implements the feature requested in issue #112 to record the start time and end time for every canary batch in Rollout.

Changes Made

  • Added BatchStartTime field to BatchReleaseCanaryStatus in both v1alpha1 and v1beta1
  • Added CurrentStepStartTime and CurrentStepEndTime fields to Rollout CanaryStatus
  • Implemented timing logic in BatchRelease executor to track batch start times
  • Updated Rollout controller to sync timing information from BatchRelease
  • Added proper conversion functions for API version compatibility
  • Included comprehensive documentation

Benefits

  • Users can now track how long each canary batch takes to complete
  • Enables better monitoring and alerting based on batch timing
  • Helps identify performance issues or bottlenecks in specific batches
  • Provides audit trail for deployment timing

Testing

  • ✅ Build verification passed
  • ✅ Unit tests passed
  • ✅ Backward compatibility maintained
  • ✅ API validation successful

Related Issue

Fixes #112

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@kruise-bot kruise-bot requested review from FillZpp and zmberg August 8, 2025 17:31
@kruise-bot
Copy link

Welcome @chethanac15! It looks like this is your first PR to openkruise/rollouts 🎉

- Add BatchStartTime field to BatchReleaseCanaryStatus in both v1alpha1 and v1beta1
- Add CurrentStepStartTime and CurrentStepEndTime fields to Rollout CanaryStatus
- Set BatchStartTime when a batch enters UpgradingBatchState
- Reset BatchStartTime when moving to next batch or restarting
- Sync timing information from BatchRelease to Rollout status
- Update conversion functions to handle new timing fields
- Regenerate deepcopy files

This addresses issue openkruise#112 to track start and end times for every canary batch/step.

Signed-off-by: Chethan A C <[email protected]>
Signed-off-by: Chethan A C <[email protected]>
@chethanac15 chethanac15 force-pushed the feature/canary-batch-timing branch from e7160da to 7bebb24 Compare August 9, 2025 10:15
@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from zmberg by writing /assign @zmberg in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] need record the starttime and endtime for every canary batch in Rollout

3 participants