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

Add Cherry pick script guide #593

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

xuemingdi
Copy link
Contributor

  • Please check if the PR fulfills these requirements
  • [*] The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • [*] Docs have been added / updated (for bug fixes / features)

Which issue(s) this PR fixes:

Fixes #
#425

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    docs update

  • What is the current behavior? (You can also link to an open issue here)
    Add auto cherry-pick guidance document for developers #425

  • What is the new behavior (if this is a feature change)?
    Add user guide for cherry pick shell script usage.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    No

  • Other information:
    N.A

@kubeedge-bot kubeedge-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 1, 2024
./cherry_pick_pull.sh upstream/release-3.14 12345 56789
```

If the arguments number less than 2, this script will exit with help information.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If the arguments number less than 2, this script will exit with help information.
If the number of parameters is less than 2, this script will exit with help information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed according to the review comment

Copy link
Member

@fisherxu fisherxu left a comment

Choose a reason for hiding this comment

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

Overall looks good :)

Copy link
Member

@fisherxu fisherxu left a comment

Choose a reason for hiding this comment

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

@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fisherxu

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

The pull request process is described 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

@kubeedge-bot kubeedge-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 5, 2024
This page explains how to use shell script `hack/cherry_pick_pull.sh` in kubeedge/kubeedge repo to cherry pick the patch to release branch.


# Cherry Pick Settings
Copy link
Collaborator

Choose a reason for hiding this comment

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

A little suggestion: ## Cherry Pick Settings is better than # . This way, we can display the catogary on the right and generate links for each part like:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reminding, I have changed.

Copy link
Collaborator

@zhiyingfang2022 zhiyingfang2022 left a comment

Choose a reason for hiding this comment

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

Some small suggestions on format for reference~


```shell
# set GITHUB_USER
export GITHUB_USER = <your-github-user>
Copy link
Collaborator

Choose a reason for hiding this comment

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

export GITHUB_USER=<your-github-user>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, modified already


```shell
# examine whether the hub is installed successfully
which hub
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to add the command to install hub directly here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The installation of the hub command involves handling different platform and various scenarios. Therefore I am concerned that too many hub command installation description might affect the completeness and consistency of the current document. User could gain hub installation instructions easily from the link below.


3. Other environment variables setting

- variable `DRY_RUN` is used to skip `git push` and creating PR steps, This is useful for creating patches to a release branch without making a PR.When DRY_RUN is set the script will leave you in a branch containing the commits you cherry-picked.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- variable `DRY_RUN` is used to skip `git push` and creating PR steps, This is useful for creating patches to a release branch without making a PR.When DRY_RUN is set the script will leave you in a branch containing the commits you cherry-picked.
- The variable `DRY_RUN` is used to skip `git push` and create PR steps, This is useful for creating patches to a release branch without making a PR. When DRY_RUN is set the script will leave you in a branch containing the commits you cherry-picked.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, modified


- variable `DRY_RUN` is used to skip `git push` and creating PR steps, This is useful for creating patches to a release branch without making a PR.When DRY_RUN is set the script will leave you in a branch containing the commits you cherry-picked.

- variable `REGENERATE_DOCS` is used to regenerate documentation for the target branch after picking the specified commits, This is useful when picking commits containing changes to API documentation. **Note**: Set variable `REGENERATE_DOCS` may affect the cherry pick performance.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- variable `REGENERATE_DOCS` is used to regenerate documentation for the target branch after picking the specified commits, This is useful when picking commits containing changes to API documentation. **Note**: Set variable `REGENERATE_DOCS` may affect the cherry pick performance.
- The variable `REGENERATE_DOCS` is used to regenerate documentation for the target branch after picking the specified commits, This is useful when picking commits containing changes to API documentation. **Note**: Set variable `REGENERATE_DOCS` may affect the cherry pick performance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, modified


- variable `REGENERATE_DOCS` is used to regenerate documentation for the target branch after picking the specified commits, This is useful when picking commits containing changes to API documentation. **Note**: Set variable `REGENERATE_DOCS` may affect the cherry pick performance.

- variables `UPSTREAM_REMOTE` (default: upstream) and `FORK_REMOTE` (default: origin) are used to override the default remote names to what you have locally.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- variables `UPSTREAM_REMOTE` (default: upstream) and `FORK_REMOTE` (default: origin) are used to override the default remote names to what you have locally.
- The variables `UPSTREAM_REMOTE` (default: upstream) and `FORK_REMOTE` (default: origin) are used to override the default remote names to what you have locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, modified


# Execution steps

1. execute cherry_pick_pull.sh with parameters, at least include `remote branch` and `pr number` (could be multiple pr numbers)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
1. execute cherry_pick_pull.sh with parameters, at least include `remote branch` and `pr number` (could be multiple pr numbers)
1. Execute cherry_pick_pull.sh with parameters, at least include `remote branch` and `pr number` (could be multiple pr numbers)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, modified

@zhiyingfang2022
Copy link
Collaborator

/lgtm

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 12, 2024
@kubeedge-bot kubeedge-bot merged commit 9ca3fda into kubeedge:master Jul 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants