Skip to content

ramp - Versioning:3.1#7183

Merged
Shivs11 merged 6 commits intoversioning-3.1from
ss/ramping
Jan 30, 2025
Merged

ramp - Versioning:3.1#7183
Shivs11 merged 6 commits intoversioning-3.1from
ss/ramping

Conversation

@Shivs11
Copy link
Copy Markdown
Member

@Shivs11 Shivs11 commented Jan 29, 2025

What changed?

  • Ramping PR for versioning-3.1
  • now, if a ramping version becomes current, the ramp will be unset.

Why?

  • Versioning-3.1

How did you test it?

  • Added more functional tests
  • Existing suite

Potential risks

  • None, going to feature.

Documentation

Is hotfix candidate?

No

@Shivs11 Shivs11 marked this pull request as ready for review January 29, 2025 23:18
@Shivs11 Shivs11 requested a review from a team as a code owner January 29, 2025 23:18
@Shivs11 Shivs11 changed the title ramp:working prototype ramp - Versioning:3.1 Jan 29, 2025
Copy link
Copy Markdown
Contributor

@carlydf carlydf left a comment

Choose a reason for hiding this comment

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

really close! just left a few comments

// tell new ramping version it's ramping
rampUpdateArgs := &deploymentspb.SyncVersionStateUpdateArgs{
RoutingUpdateTime: updateTime,
RampingSinceTime: updateTime,
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.

RampingSinceTime is a bit weird, because if the ramp % is changing but the ramping version is staying the same, RampingSinceTime will not change, because the time when the version started ramping is still the same.

I would make a variable called newRampingSinceTime and do:

newRampingSinceTime = updateTime // if this version is newly ramping
if prevRampingVersion == newRampingVersion { // this version was already ramping
  newRampingSinceTime = d.State.RoutingInfo.RampingVersionUpdateTime
}

// update local state
d.State.RoutingInfo.RampingVersion = newRampingVersion
d.State.RoutingInfo.RampingVersionPercentage = args.Percentage
d.State.RoutingInfo.RampingVersionUpdateTime = updateTime
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.

If the RampingVersion stayed the same, d.State.RoutingInfo.RampingVersionUpdateTime should not change

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.

possibly update d.State.RoutingInfo.RampingVersionPercentageUpdateTime

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In my latest commit, d.State.RoutingInfo.RampingVersionUpdateTime now works correctly - I have not made the addition to percentage yet due to a opinion I had which I pasted on our slack thread

if d.State.RoutingInfo.CurrentVersion == d.State.RoutingInfo.RampingVersion {
d.State.RoutingInfo.RampingVersion = ""
d.State.RoutingInfo.RampingVersionPercentage = 0
d.State.RoutingInfo.RampingVersionUpdateTime = nil
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.

this should be updateTime not nil

RoutingInfo: &deploymentpb.RoutingInfo{
RampingVersion: "", // no ramping info should be set
RampingVersionPercentage: 0, // no ramping info should be set
RampingVersionUpdateTime: nil, // no ramping info should be set
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.

this should be the same as CurrentVersionUpdateTime, not nil

RegisterWorkerInDeployment = "register-task-queue-worker" // for Worker Deployment Version wf
SyncVersionState = "sync-version-state" // for Worker Deployment Version wfs
SetCurrentVersion = "set-current-version" // for Worker Deployment wfs
SetRampingVersion = "set-worker-deployment-ramping-version" // for Worker Deployment wfs
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.

Nit: maybe make the string be "set-ramping-version" to match "set-current-version" above

if prevRampingVersion == newRampingVersion { // the version was alread ramping, user changing ramp %
rampingSinceTime = d.State.RoutingInfo.RampingVersionUpdateTime
} else {
rampingSinceTime = timestamppb.New(workflow.Now(ctx)) // version ramping for the first time
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.

Suggested change
rampingSinceTime = timestamppb.New(workflow.Now(ctx)) // version ramping for the first time
rampingSinceTime = routingUpdateTime // version ramping for the first time

@Shivs11 Shivs11 merged commit 5be3cbb into versioning-3.1 Jan 30, 2025
@Shivs11 Shivs11 deleted the ss/ramping branch January 30, 2025 21:37
ShahabT pushed a commit that referenced this pull request Feb 4, 2025
## What changed?
<!-- Describe what has changed in this PR -->
- Ramping PR for versioning-3.1
- now, if a ramping version becomes current, the ramp will be unset.

## Why?
<!-- Tell your future self why have you made these changes -->
- Versioning-3.1

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
- Added more functional tests
- Existing suite

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
- None, going to feature.

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No
ShahabT pushed a commit that referenced this pull request Feb 5, 2025
## What changed?
<!-- Describe what has changed in this PR -->
- Ramping PR for versioning-3.1
- now, if a ramping version becomes current, the ramp will be unset.

## Why?
<!-- Tell your future self why have you made these changes -->
- Versioning-3.1

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
- Added more functional tests
- Existing suite

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
- None, going to feature.

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No
ShahabT pushed a commit that referenced this pull request Feb 5, 2025
## What changed?
<!-- Describe what has changed in this PR -->
- Ramping PR for versioning-3.1
- now, if a ramping version becomes current, the ramp will be unset.

## Why?
<!-- Tell your future self why have you made these changes -->
- Versioning-3.1

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
- Added more functional tests
- Existing suite

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
- None, going to feature.

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No
ShahabT pushed a commit that referenced this pull request Feb 6, 2025
## What changed?
<!-- Describe what has changed in this PR -->
- Ramping PR for versioning-3.1
- now, if a ramping version becomes current, the ramp will be unset.

## Why?
<!-- Tell your future self why have you made these changes -->
- Versioning-3.1

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
- Added more functional tests
- Existing suite

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
- None, going to feature.

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No
ShahabT pushed a commit that referenced this pull request Feb 6, 2025
## What changed?
<!-- Describe what has changed in this PR -->
- Ramping PR for versioning-3.1
- now, if a ramping version becomes current, the ramp will be unset.

## Why?
<!-- Tell your future self why have you made these changes -->
- Versioning-3.1

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
- Added more functional tests
- Existing suite

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
- None, going to feature.

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No
ShahabT pushed a commit that referenced this pull request Feb 6, 2025
## What changed?
<!-- Describe what has changed in this PR -->
- Ramping PR for versioning-3.1
- now, if a ramping version becomes current, the ramp will be unset.

## Why?
<!-- Tell your future self why have you made these changes -->
- Versioning-3.1

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
- Added more functional tests
- Existing suite

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
- None, going to feature.

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No
ShahabT pushed a commit that referenced this pull request Feb 6, 2025
## What changed?
<!-- Describe what has changed in this PR -->
- Ramping PR for versioning-3.1
- now, if a ramping version becomes current, the ramp will be unset.

## Why?
<!-- Tell your future self why have you made these changes -->
- Versioning-3.1

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
- Added more functional tests
- Existing suite

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
- None, going to feature.

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No
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.

2 participants