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 Github Actions CI for charm operators #1407

Merged
merged 1 commit into from
Jan 5, 2021

Conversation

knkski
Copy link
Contributor

@knkski knkski commented Dec 4, 2020

What this PR does / why we need it:

Adds Github Actions CI for charm operators, to ensure that there's no breakages / regressions

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

Adds new bundle for CI purposes that points at the latest tags instead of particular revisions.

Release note:

NONE

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution @knkski!
I left comments.

run: |
set -eux
./scripts/v1beta1/build.sh -r docker.io/kubeflowkatib -t latest
for image in katib-ui katib-controller katib-db-manager; do
Copy link
Member

Choose a reason for hiding this comment

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

Do you need to update other images also?
For example: docker.io/kubeflowkatib/file-metrics-collector ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually took out the usage of ./scripts/v1beta/build.sh, as building all of those images took up too much disk space.

I was thinking about only building the images as they get included in testing, and right now the only test is a simply connectivity test. I'm going to be working on expanding that, but wanted to keep it simple initially.

@@ -0,0 +1,83 @@
name: Charmed Katib
Copy link
Member

Choose a reason for hiding this comment

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

Should you name this file test-microk8s.yml ?
I don't see that this action is running on this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the name of the file to match this name. As far as why it's not showing up, do you have to enable actions in settings or anything? I'm not sure exactly why it's not showing up.

Copy link
Member

Choose a reason for hiding this comment

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

- name: Install dependencies
run: |
set -eux
sudo snap install microk8s --classic
Copy link
Member

Choose a reason for hiding this comment

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

Since you are not using any pre-existing GitHub actions (e.g. uses: actions/checkout@v2) to install microk8s, does GitHub actions have any advantages compare to Travis ?
What do you think @gaocegege @johnugeorge @knkski ?

Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/helm/kind-action We can use this action, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated it to use the balchua/microk8s-actions@v0.2.1 action. I have a slight preference for github actions due to the UI being better about scrolling through large amounts of output, but can switch to Travis CI if desired.

@gaocegege
Copy link
Member

ping @andreyvelich

/lgtm

@andreyvelich
Copy link
Member

/hold
Hold for the GitHub actions activation.
Check this: #1407 (comment).

Builds images locally with `latest` tag, and includes new bundle for
testing purposes that sets operator docker images to `latest` as well
instead of a particular revision.
@knkski
Copy link
Contributor Author

knkski commented Dec 8, 2020

Pushed up an update that bumped the version of balchua/microk8s-actions from v0.2.1 to v0.2.2

@Bobgy
Copy link

Bobgy commented Dec 9, 2020

https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository

The page doesn't load atm, I'll take a look later.
A constant reminder, whenever you are blocked for configuring the repo, you should consider whether moving to your own org is a better option for your project.

@Bobgy
Copy link

Bobgy commented Dec 10, 2020

I don't think I need to change anything.

By default, GitHub Actions is enabled on all repositories and organizations.

so is katib repo

@andreyvelich
Copy link
Member

I don't think I need to change anything.

By default, GitHub Actions is enabled on all repositories and organizations.

so is katib repo

Thank you for helping with this!
@Bobgy So In the Katib settings in the Action permissions you are able to see that we allow all actions ?
Like this:
Screenshot 2020-12-10 at 18 56 02

@andreyvelich
Copy link
Member

@knkski In the meantime, can you try to create PR on your local master branch from you branch on the forked Katib repository ?
Then, we can check if actions will be triggered correctly.
Like I did here: andreyvelich#3.

@knkski
Copy link
Contributor Author

knkski commented Dec 10, 2020

Created knkski#2 to test in the meantime

@andreyvelich
Copy link
Member

@knkski Thanks!
Btw, @yuzisun how did you enable GitHub actions for the KFServing ?
Have you changed any repo settings before creating the workflow ?

@yuzisun
Copy link
Member

yuzisun commented Dec 10, 2020

@knkski Thanks!
Btw, @yuzisun how did you enable GitHub actions for the KFServing ?
Have you changed any repo settings before creating the workflow ?

we added a few secrets in the settings for publishing image and pypi, these are the workflows here we added and they worked.

@andreyvelich
Copy link
Member

Thanks @yuzisun, it's strange why KFServing and Katib have various GitHub actions policies.

@Bobgy
Copy link

Bobgy commented Dec 11, 2020

Yes, it shows all actions are enabled

@andreyvelich
Copy link
Member

I believe GitHub actions should be activated once we merge this PR.
Check this: kubeflow/training-operator#1196 (review).
/hold cancel
/retest

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich, knkski

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

@k8s-ci-robot k8s-ci-robot merged commit 7901c43 into kubeflow:master Jan 5, 2021
@knkski knkski deleted the add-charm-ci branch January 27, 2021 18:56
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.

6 participants