Skip to content

refactor: rename stopOrDelete parameter for better readability#5692

Open
shubhtrek wants to merge 1 commit into
kubernetes-sigs:mainfrom
shubhtrek:refactor/port-forward-params
Open

refactor: rename stopOrDelete parameter for better readability#5692
shubhtrek wants to merge 1 commit into
kubernetes-sigs:mainfrom
shubhtrek:refactor/port-forward-params

Conversation

@shubhtrek
Copy link
Copy Markdown

This PR improves readability in the port forwarding API by renaming the confusing stopOrDelete parameter to justStop.

Changes Made
Renamed stopOrDelete → justStop
Updated all related call sites and references
Kept existing functionality unchanged

Testing
Verified the project builds successfully
Confirmed port forwarding behavior works as expected

#5691

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 16, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: shubhtrek / name: Shubh Pingale (0c93203)

@k8s-ci-robot k8s-ci-robot requested review from ashu8912 and illume May 16, 2026 11:39
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @shubhtrek!

It looks like this is your first PR to kubernetes-sigs/headlamp 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/headlamp has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shubhtrek
Once this PR has been reviewed and has the lgtm label, please assign yolossn for approval. For more information see the Code Review Process.

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

Details 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

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 16, 2026
@illume illume requested a review from Copilot May 16, 2026 14:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves readability around the frontend port-forward stop/delete API by renaming the local boolean parameter from stopOrDelete to justStop while preserving the backend request payload.

Changes:

  • Renamed the stopOrDeletePortForward parameter to justStop.
  • Updated JSDoc and call-site inline parameter comments.
  • Kept the serialized API field as stopOrDelete, matching the backend contract.

CI status and PR commit history were not available in this review context; please confirm checks are passing and the PR history is linear.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
frontend/src/lib/k8s/api/v1/portForward.ts Renames the function parameter and updates documentation while keeping the request body compatible.
frontend/src/components/portforward/index.tsx Adds inline comments at stop/delete call sites to clarify the boolean argument.
frontend/src/components/common/Resource/PortForward.tsx Adds inline comments at resource-level stop/delete call sites to clarify the boolean argument.

Copy link
Copy Markdown
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

Thanks for this.

How about adding a "stop" and a "remove" parameter? Combining the two things is quite confusing.

Probably the name change should be passed all the way through to the backend service.

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants