-
Notifications
You must be signed in to change notification settings - Fork 136
Conversation
@@ -0,0 +1,2 @@ | |||
build --workspace_status_command=./hack/print-workspace-status.sh |
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.
Can you remove this file from the PR?
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.
@philwo hmm but without it, bazel test //...
won't work without explicitly specifying that parameter. That doesn't seem user-friendly to me.
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.
+1 this is fine
@mattmoor Can you suggest a reviewer for this? It looks good to me, not sure if a maintainer of rules_k8s wants to have another look. |
173359d
to
50f909a
Compare
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
50f909a
to
5cb53d4
Compare
CLAs look good, thanks! |
- Make cluster and container registry configurable via workspace status - Add retries so k8s operations don't flake when they time out - Move test helpers to their own shell script - Add a service.yaml for hellohttp so we can expose it for testing - Add service k8s_object to BUILDs so test deployments are exposed for testing - Fix print statements in hellogrpc servers so assertions work - Clean up sed changes to source files in trap so git is clean after a run - Remove incomplete todocontroller test from .travis.yml - Update CONTRIBUTING with information on how to run tests
5cb53d4
to
d0e472d
Compare
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, some of these best practices sort of popped up after this repo came about, so it's good to see them getting applied. Some comments inline.
@@ -0,0 +1,2 @@ | |||
build --workspace_status_command=./hack/print-workspace-status.sh |
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.
+1 this is fine
- ./examples/todocontroller/e2e-test.sh py | ||
# Commented out because this test is incomplete and doesn't pass | ||
# TODO: Fix this test | ||
# - ./examples/todocontroller/e2e-test.sh py |
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'd kind of like to see this fixed before this goes in :(
|
||
* A container registry (e.g. [Google Container Registry](https://cloud.google.com/container-registry)) | ||
* A Kubernetes cluster (e.g. [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine)) | ||
* The host you are running tests from must match the architecture of the Kubernetes nodes (i.e. you cannot run tests on MacOS if your Kubernetes nodes run Linux) |
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.
This is only partially true, for Go you can add a flag to .bazelrc
that will make everything cross-compile to linux/amd64
and things work fine. For Python/Node this is true :-/
(export DOCKER_REPO_OVERRIDE=gcr.io/<your-gcp-project>; | ||
export BUILD_CLUSTER_OVERRIDE=<your-kubernetes-cluster>; | ||
grep e2e-test .travis.yml | sed '/^\s*#/ d' | sed 's/^[ -]*//' | \ | ||
while read -r TEST_CMD; do eval "$TEST_CMD"; done) |
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.
Perhaps instead, we should add a top-level script that Travis calls :)
function edit() { | ||
./examples/hellogrpc/${LANGUAGE}/server/edit.sh "$1" | ||
} | ||
|
||
function update() { | ||
bazel build examples/hellogrpc/${LANGUAGE}/server:staging.replace | ||
bazel-bin/examples/hellogrpc/${LANGUAGE}/server/staging.replace |
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.
This was to test the .replace
flow :(
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.
If todocontroller
comes back, we can add it there (no service)
|
||
**Requirements** | ||
|
||
* [Node.js](https://nodejs.org/en/download/). |
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.
If we upgrade to a newer version of rules_nodejs
can we remove node as a system dependency? The newer version appear to pull in node and yarn in a toolchain-like way.
Thanks for the PR! Will you please respond to the feedback thus far and push an update? |
/cc @mattmoor |
I'll have time to circle back and update this pull request in a few weeks. We're in the middle of building applications using our fork of rules_k8s, and I don't have the bandwidth to change two things at once. |
Hi Ben, we replaced travis with prow for running integration tests in CI. Is this still relevant? |
@fejta yes, the integration tests themselves are broken and will not pass without this PR regardless of how you ran them |
I do not think that is true at head. #158 passed integration tests: https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/bazelbuild_rules_k8s/158/pull-rules-k8s-e2e/15/ |
Oh neat, that's great! It wasn't true when I created this PR. |
run