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

addition of auto-branching process as part of github action #14385

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

omkarkhatavkar
Copy link

@omkarkhatavkar omkarkhatavkar commented Mar 13, 2024

Problem Statement

Currently the branching process is manual and it requires to review the files needs to be updated. Also requires attention in details as there are many files changes with respect to multiple branches as well. We need to have some automated solution that will help in the solve this.

Solution

Introducing the Github Action that will help to solve this issue. It will contains the steps that needs to run every time when we needs branching. These are predefined steps and getting documented help to not to miss the some changes

Test Result

I have tested on my own fork and here it is the result

- work_flow trigger:

- non-master branch workflow and PR:
- omkarkhatavkar#267

- master branch workflow and PR:
- omkarkhatavkar#266

@omkarkhatavkar omkarkhatavkar requested a review from a team as a code owner March 13, 2024 11:50
@omkarkhatavkar omkarkhatavkar added the No-CherryPick PR doesnt need CherryPick to previous branches label Mar 13, 2024
Copy link
Member

@JacobCallahan JacobCallahan left a comment

Choose a reason for hiding this comment

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

This will be great to have! Just a couple of small things.

.github/workflows/auto_branching.yml Outdated Show resolved Hide resolved
.github/workflows/auto_branching.yml Show resolved Hide resolved
@omkarkhatavkar omkarkhatavkar force-pushed the auto_branching branch 2 times, most recently from 7f98f81 to 07fe479 Compare March 15, 2024 11:10
@omkarkhatavkar omkarkhatavkar force-pushed the auto_branching branch 2 times, most recently from 90224e1 to 3b9ff90 Compare March 18, 2024 07:08
Copy link
Member

@JacobCallahan JacobCallahan left a comment

Choose a reason for hiding this comment

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

ACK. No blockers for merge, but there is a missing newline at the end of the file.

Copy link
Member

@jyejare jyejare left a comment

Choose a reason for hiding this comment

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

ACK pending comments / questions!

.github/workflows/auto_branching.yml Outdated Show resolved Hide resolved
.github/workflows/auto_branching.yml Outdated Show resolved Hide resolved
.github/workflows/auto_branching.yml Show resolved Hide resolved
.github/workflows/auto_branching.yml Show resolved Hide resolved
.github/workflows/auto_branching.yml Show resolved Hide resolved
git config --local user.name "GitHub Action"
branch_name="auto-branching-${{ github.event.inputs.target_branch }}-$(date '+%s')"
git checkout -b "$branch_name"
git add setup.py ./tests/foreman ./robottelo/* ./requirements.txt ./.github/* ./conf/robottelo.yaml.template
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not add everything changed?

Suggested change
git add setup.py ./tests/foreman ./robottelo/* ./requirements.txt ./.github/* ./conf/robottelo.yaml.template
git add .

Copy link
Author

Choose a reason for hiding this comment

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

it's often safer to use the explicit approach to avoid accidentally including unintended changes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In any case, it'll open up a PR for us to review and merge, and if we encounter any accidentally or unintended changes in it, we can manually mitigate them, right?

Copy link
Author

Choose a reason for hiding this comment

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

I don't think so it is right approach git add .. I personally never do that on my local machine even. @jyejare @JacobCallahan do you feel the same ?

Copy link
Member

Choose a reason for hiding this comment

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

git add -u only adds file those which are already part of vc and not those are new. So in any case if we add a new file now or later then it would be missed.

So its better to be explicit here.

.github/workflows/auto_branching.yml Show resolved Hide resolved
.github/workflows/auto_branching.yml Show resolved Hide resolved
.github/workflows/auto_branching.yml Show resolved Hide resolved
.github/workflows/auto_branching.yml Show resolved Hide resolved
.github/workflows/auto_branching.yml Outdated Show resolved Hide resolved
.github/workflows/auto_branching.yml Show resolved Hide resolved
@omkarkhatavkar omkarkhatavkar force-pushed the auto_branching branch 4 times, most recently from 57dff63 to 730302e Compare April 3, 2024 05:58
Copy link
Member

@jyejare jyejare left a comment

Choose a reason for hiding this comment

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

ACK with Gauravs comments to be resolved.

@jyejare
Copy link
Member

jyejare commented Apr 4, 2024

@Gauravtalreja1 Feel free to merge when you are good.

@jyejare jyejare merged commit 844c249 into SatelliteQE:master Apr 5, 2024
7 checks passed
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants