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

ci: improve import path action #2104

Merged
merged 1 commit into from
Jul 18, 2022
Merged

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Jul 17, 2022

Related to: #1709

What is the purpose of the change

After testing #2094 more, I realized that there are 3 issues:

  1. A pull request opened from the manual action does not trigger CI
    • There was a security limitation related to a supported token
    • To work around this, I changed the GitHub action to this. It supports using PAT token that mitigates the security limitation
    • Pull requests now trigger CI correctly
  2. Proto files and proto scripts were not updates
    • To fix this, added logic to the shell script, finding and replacing import paths in the proto files and scripts, running make proto-gen at the end
  3. Did not have support of updating multiple branches at once because the same branch was always used as base of the pull request
    • Now, the branch name has a randomized suffix, allowing to update both main and, for example, v10 concurrently

Testing and Verifying

Ran this change several times on the fork and it worked as expected:

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? no
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? no
  • How is the feature or change documented? not applicable

@p0mvn p0mvn marked this pull request as ready for review July 17, 2022 16:32
@p0mvn p0mvn requested a review from a team July 17, 2022 16:32
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

utACK

@p0mvn p0mvn merged commit dcc82d7 into main Jul 18, 2022
@p0mvn p0mvn deleted the roman/improve-import-path-action branch July 18, 2022 02:47
@p0mvn p0mvn added the A:backport/v11.x backport patches to v11.x branch label Aug 13, 2022
mergify bot pushed a commit that referenced this pull request Aug 13, 2022
(cherry picked from commit dcc82d7)

# Conflicts:
#	.github/workflows/import_paths.yml
#	scripts/replace_import_paths.sh
p0mvn added a commit that referenced this pull request Aug 13, 2022
p0mvn added a commit that referenced this pull request Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v11.x backport patches to v11.x branch T:build T:CI
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants