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

Automatic update schema #64

Merged
merged 2 commits into from
Mar 3, 2021

Conversation

yangcao77
Copy link
Collaborator

@yangcao77 yangcao77 commented Feb 25, 2021

What does this PR do?

automate the process to adopt the latest devfile/api pkg, and the latest schema
detail can be found in: devfile/api#358

What issues does this PR fix or reference?

Fixes devfile/api#358

Is your PR tested? Consider putting some instruction how to test your changes

replaceSchemaFile.go Outdated Show resolved Hide resolved
updateApi.sh Outdated Show resolved Hide resolved
updateApi.sh Outdated Show resolved Hide resolved
updateApi.sh Outdated Show resolved Hide resolved
updateApi.sh Outdated
#replace all ` with ' and write to schema file
echo "Write to go file"
go build *.go
./main updateSchema "${schema}" "${SCHEMA_URL}"
Copy link
Member

@maysunfaisal maysunfaisal Mar 1, 2021

Choose a reason for hiding this comment

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

I think we can also put this in our github action, so that every PR is always updated and we dont need to kick off the script.

If there is a breaking change, our tests should catch it. WDYT?

EDIT: nvm, idk how that would look, we need to look into more detail at what other devfile repos are doing

Copy link
Collaborator Author

@yangcao77 yangcao77 Mar 1, 2021

Choose a reason for hiding this comment

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

I was thinking to put it in github action whenever the schema has been updated. However, some schema changes would need library change accordingly, or otherwise would cause failure. We need to discuss more on that if we want to use github action

Copy link
Member

Choose a reason for hiding this comment

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

yeah i see your point, in that case; when the github action opens a PR and the test fails because the new schema introduced breaking change, we can manually update that PR opened by the bot 🤔

@yangcao77 yangcao77 force-pushed the automatic-update-schema branch 5 times, most recently from 9018765 to 2ffe341 Compare March 3, 2021 16:20
Signed-off-by: Stephanie <yangcao@redhat.com>
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maysunfaisal, yangcao77

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:
  • OWNERS [maysunfaisal,yangcao77]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Stephanie <yangcao@redhat.com>
@maysunfaisal
Copy link
Member

/lgtm

@yangcao77 yangcao77 merged commit 1bdfd7a into devfile:master Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants