-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Prow presubmit job to build mlkube.io container. #4951
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
* This job is supposed to build a Docker container with the CRD. Once this works we will add another job to actually run the tests. * We create a new image to be used by this job. * The image needs docker so that we can do a Docker build.
prow/config.yaml
Outdated
ports: | ||
# TODO(jlewi): Do we need this port? | ||
- containerPort: 9999 | ||
hostPort: 9999 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the port is for node affinity since they shares a git cache, you probably don't need it here.
prow/config.yaml
Outdated
env: | ||
- name: GOOGLE_APPLICATION_CREDENTIALS | ||
value: /etc/service-account/service-account.json | ||
# TODO(jlewi): Do we need privileged mode in order to run Docker? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you probably need to figure out kubernetes/kubernetes#1806, have you tried locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried running my container locally using docker run but not running on K8s. Going to try it on my test prow cluster soon.
/assign |
prow/config.yaml
Outdated
secretName: service-account | ||
- name: docker | ||
hostPath: | ||
path: /var/run/docker.sock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @ixdy, I think we don't intend to allow jobs access to the host docker socket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BenTheElder Can you suggest an alternative approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jlewi what I've been doing is using bazel to build/push the image instead, not sure if that's feasible to you
* Need to specify namespace, resync_period and some other values or the config won't be parseable.
* Add pre and postsubmit jobs for mlkube. * Remove the periodic job; I don't think we want that.
* Fix conflict with mlkube-e2e periodic job.
* We probably want this and the testgrid requires it.
@krzyzacy This is ready for another look but there are are some test failures I could use help with. verify_test is complaining that there is no test-grid associated with my presubmit job. //jobs:config_test is failing complaining about duplicate projects. I added an entry here because otherwise the //prow/config:go_default_test failed complaining
but it looks like my fix might have caused other problems. |
jobs/config.json
Outdated
@@ -9907,6 +9907,27 @@ | |||
"UNKNOWN" | |||
] | |||
}, | |||
"mlkube-build-presubmit": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll need an equivalent one for mlkube-build-postsubmit
jobs/config.json
Outdated
"--extract=gke", | ||
"--gcp-cloud-sdk=gs://cloud-sdk-testing/ci/staging", | ||
"--gcp-node-image=gci", | ||
"--gcp-project=mlkube-testing", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the presubmit error you need to add something to https://github.com/kubernetes/test-infra/blob/master/jobs/config_test.py#L681-L791
I think we don't want to allow sock mapping on prow pods. We should either use bazel to build docker images, or we need to implement some docker-in-docker service in prow. |
This reverts commit 7507edb. If we load all presubmits we end up with failures due to other presubmits with no testgroup.
hit by #4989 |
…ubmit tests. * All tests should be Prow jobs; delete jobs/config.json entry for the periodic job. * All jobs should use the same container image for the tests. * Create dashboard tabs on the bigdata dashboard. Remove tabs from the apps dashboard.
@krzyzacy This is ready for another review.
|
jobs/config_test.py
Outdated
# using this project there will just be one entry. | ||
'mlkube-build-presubmit': 'mlkube-*', | ||
'mlkube-build-postsubmit': 'mlkube-*', | ||
'ci-kubernetes-e2e-mlkube-gke': 'mlkube-*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now you probably don't need this block. The test basically scans duplicated projects from config.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
testgrid/config/config.yaml
Outdated
test_group_name: mlkube-build-postsubmit | ||
- name: mlkube-build-presubmit | ||
description: Presubmit tests of TfJob CRD running on stable GKE. | ||
test_group_name: mlkube-build-presubmit | ||
notifications: | ||
- summary: Please configure this skeleton dashboard and remove this notification | ||
context_link: https://github.com/kubernetes/test-infra/tree/master/testgrid/config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(probably can delete this notification now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Thanks. |
prow/config.yaml
Outdated
secretName: service-account | ||
- name: docker | ||
hostPath: | ||
path: /var/run/docker.sock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the sock map here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -2489,6 +2489,31 @@ presubmits: | |||
hostPath: | |||
path: /mnt/disks/ssd0 | |||
|
|||
jlewi/mlkube.io: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hummm, I feel like our bot might not have access to your repo, you might want to configure somewhere around https://github.com/kubernetes/test-infra/blob/master/prow/plugins.yaml#L5-L11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I also think I need to configure webhooks on my repo but I'll do that after this PR is done.
* Configure trigger plugin for mlkube.io repo.
it's a good start and probably we have more stuff need to configure. we'll see how this goes :-) /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlewi, krzyzacy The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@jlewi: I updated Prow config for you!I updated Prow plugins config for you! In response to this:
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. |
Thanks |
(whoops, forgot to ask you to squash 😂 ) |
this works we will add another job to actually run the tests.