Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 0 desired routing count in endpoint edit page #2768

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

yomybaby
Copy link
Member

@yomybaby yomybaby commented Oct 23, 2024

Changes:

This PR modifies the ServiceLauncherPageContent component to use the nullish coalescing operator (??) instead of the logical OR operator (||) when setting the desiredRoutingCount value. This ensures that a value of 0 for endpoint?.desired_session_count is respected rather than defaulting to 1.

Rationale:

The previous implementation using || would treat 0 as a falsy value, causing it to default to 1. By using ??, we now correctly handle cases where desired_session_count is explicitly set to 0, while still defaulting to 1 when the value is null or undefined.

Impact:

This change allows users to set a desired_session_count of 0 for endpoints, which may be necessary for certain service configurations or management scenarios.

Copy link

graphite-app bot commented Oct 23, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @yomybaby and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added the size:XS ~10 LoC label Oct 23, 2024
@yomybaby yomybaby marked this pull request as ready for review October 23, 2024 02:18
@yomybaby yomybaby force-pushed the fix/routing-count-in-endpoint-editor branch 2 times, most recently from 58f92c0 to 0a3e496 Compare October 23, 2024 02:22
Copy link

github-actions bot commented Oct 23, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 5.09% 348/6833
🔴 Branches 4.65% 218/4692
🔴 Functions 2.97% 67/2256
🔴 Lines 4.99% 333/6674

Test suite run success

93 tests passing in 12 suites.

Report generated by 🧪jest coverage report action from 3e45cde

Copy link
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

graphite-app bot commented Oct 23, 2024

Merge activity

**Changes:**

This PR modifies the `ServiceLauncherPageContent` component to use the nullish coalescing operator (`??`) instead of the logical OR operator (`||`) when setting the `desiredRoutingCount` value. This ensures that a value of `0` for `endpoint?.desired_session_count` is respected rather than defaulting to `1`.

**Rationale:**

The previous implementation using `||` would treat `0` as a falsy value, causing it to default to `1`. By using `??`, we now correctly handle cases where `desired_session_count` is explicitly set to `0`, while still defaulting to `1` when the value is `null` or `undefined`.

**Impact:**

This change allows users to set a `desired_session_count` of `0` for endpoints, which may be necessary for certain service configurations or management scenarios.
@yomybaby yomybaby force-pushed the fix/routing-count-in-endpoint-editor branch from 0a3e496 to 3e45cde Compare October 23, 2024 02:28
@graphite-app graphite-app bot merged commit 3e45cde into main Oct 23, 2024
5 checks passed
@graphite-app graphite-app bot deleted the fix/routing-count-in-endpoint-editor branch October 23, 2024 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS ~10 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants