opendatahub-io / notebooks

Notebook images for ODH
Apache License 2.0
17 stars 59 forks source link

Add new GitHub workflow to sync branches through PR #583

Closed caponetto closed 3 months ago

caponetto commented 3 months ago

https://issues.redhat.com/browse/RHOAIENG-8784

This PR includes a new GitHub workflow to sync two branches through a PR (reference). The user must provide source and target branches as inputs.

Some notes:

Description

How Has This Been Tested?

I added this workflow in a new repository and tested different scenarios.

Merge criteria:

openshift-ci[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/opendatahub-io/notebooks/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
jiridanek commented 3 months ago

Currently, this workflow is manually triggered but we can set this up to run on a schedule for particular branches, if it makes sense.

There is a syncher from @dchourasia at https://github.com/red-hat-data-services/rhods-devops-infra?tab=readme-ov-file#downstream-main-to-rhoai-xy-auto-merge-infra. Maybe we should preferentially use that one?

caponetto commented 3 months ago

@jiridanek IIUC that private repository you've mentioned is more suitable for a set of repositories and to perform an automatic sync between upstream and downstream, without a PR. As the goal of this PR is to provide a simple way to sync two branches within the repository through a PR, I don't see the advantages of doing it in a more complex way.

jiridanek commented 3 months ago

It all depends on what you mean to sync. When you say release branches, I tend to think of https://github.com/red-hat-data-services/notebooks/tree/rhoai-2.8 and not https://github.com/opendatahub-io/notebooks/tree/2023b. I figure you meant the latter?

caponetto commented 3 months ago

The goal is initially to automate PRs like https://github.com/opendatahub-io/notebooks/pull/559 but could be extended to any sync we want to do between two branches within the repository.

jiridanek commented 3 months ago

Can it replace the pull bot, as seen on https://github.com/red-hat-data-services/notebooks/pull/274?

caponetto commented 3 months ago

My fork was messed up with my dependabot tests so I deleted it. I'll open this PR again. EDIT: Here it is: https://github.com/opendatahub-io/notebooks/pull/589

@jiridanek I don't think so. That bot is also meant to cross-repository sync, not only branches within the same repository.