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 workflow to sync dashboard crds automatically #205

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

maroroman
Copy link
Contributor

@maroroman maroroman commented Mar 8, 2023

Resolves: #200
Prerequisite: opendatahub-io/odh-dashboard#996

Description

This PR awaits a dispatch from another workflow (https://github.com/maroroman/odh-dashboard/blob/239d23cd54addf29b88789d7a0b38f9a4dcc6313/.github/workflows/dispatch_on_crd_change.yaml) in the odh-dashboard repo and automatically creates a PR with these changes.

How Has This Been Tested?

This PR was tested using https://github.com/nektos/act to locally verify that the workflow is sending the dispatch correctly.

To test this in real conditions, a fork of the operator and dashboard is required:

  1. Create a pull request in the odh-dashboard fork that changes a file in /manifests/crd folder
  2. Merge the PR into the main branch of the fork
  3. Verify that the action has been triggered
  4. Verify dispatch reached opendatahub-operator fork sync workflow and has triggered it.

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@openshift-ci
Copy link

openshift-ci bot commented Mar 8, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

run: |
cd ${{ github.workspace }}/config/crd/dashboard-crds
svn checkout --force https://github.com/opendatahub-io/odh-dashboard/branches/main/manifests/crd
svn revert -R ./crd
Copy link
Member

Choose a reason for hiding this comment

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

@maroroman Not exactly sure on how the svn revert command working here? Is it reverting any uncommited changes?

Can we instead just remove the existing version of crds and replace them with odh-dashboard/branches/main/manifests/crd ?

Copy link
Contributor Author

@maroroman maroroman Mar 28, 2023

Choose a reason for hiding this comment

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

That is what the command should do, as far as I know, when I looked it up and tested it the revert command with the -R argument "reverts" the state of the folder to whatever has been checked out. So this basically overwrites whatever is in the crd folder with the crd changes in the dashboard.

Edit: There is also svn update, as shown here: https://stackoverflow.com/questions/36383634/svn-overwrite-a-specific-file-from-svn

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay I replaced the checkout and revert command with a better svn export command. I have verified that it works locally. Could you please retry your test @VaishnaviHire?

@maroroman maroroman changed the base branch from feature/update-sdk to master March 31, 2023 09:45
@VaishnaviHire
Copy link
Member

/lgtm

@VaishnaviHire
Copy link
Member

/retest

@openshift-ci openshift-ci bot removed the lgtm label Apr 14, 2023
@openshift-ci
Copy link

openshift-ci bot commented Apr 14, 2023

@maroroman: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/operator-e2e 5a00c2b link true /test operator-e2e
ci/prow/unit-tests 5a00c2b link true /test unit-tests
ci/prow/opendatahub-manifests-e2e 0e1f6c3 link false /test opendatahub-manifests-e2e

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Member

@VaishnaviHire VaishnaviHire left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Apr 14, 2023
@openshift-ci
Copy link

openshift-ci bot commented Apr 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: VaishnaviHire

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

@openshift-merge-robot openshift-merge-robot merged commit 9676c4b into opendatahub-io:master Apr 14, 2023
VaishnaviHire added a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Feb 29, 2024
…revert

Revert "DSC, DSCI: add validating webhook (opendatahub-io#711)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature/update-sdk] Add github workflow to sync Dashboard CRDs
3 participants