Git Product home page Git Product logo

runtimes-common's People

Contributors

aaron-prindle avatar aav66 avatar abbytiz avatar balopat avatar belchatek avatar bendory avatar cassand avatar cftorres avatar chingor13 avatar deci-ftw avatar dlorenc avatar donmccasland avatar huyhg avatar hvaara avatar ivannaranjo avatar jinglundong avatar jprzychodzen avatar khajduczenia avatar liyanhui1228 avatar mattmoor avatar msuozzo avatar myelin avatar nkubala avatar ovk6 avatar rafalbiegacz avatar rahulrv1980 avatar sharifelgamal avatar tejal29 avatar tstromberg avatar wgrzelak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

runtimes-common's Issues

docgen tests failing

$ cd docgen
$ bazel test ...
INFO: Found 8 targets and 1 test target...
FAIL: //lib/spec:spec_test (see /private/var/tmp/_bazel_dlorenc/b2b92f6763b6b5aa44d69350c861ed7a/execroot/docgen/bazel-out/local-fastbuild/testlogs/lib/spec/spec_test/test.log).
INFO: Elapsed time: 8.766s, Critical Path: 3.01s
//lib/spec:spec_test                                                     FAILED in 1 out of 2 in 0.1s
  /private/var/tmp/_bazel_dlorenc/b2b92f6763b6b5aa44d69350c861ed7a/execroot/docgen/bazel-out/local-fastbuild/testlogs/lib/spec/spec_test/test.log

Executed 1 out of 1 test: 1 fails locally.

$ cat /private/var/tmp/_bazel_dlorenc/b2b92f6763b6b5aa44d69350c861ed7a/execroot/docgen/bazel-out/local-fastbuild/testlogs/lib/spec/spec_test/test.log

	spec_test.go:34: unknown field "runtimes" in proto.RunInstruction

Support URLs to docker images as parameters to iDiff

Currently iDiff requires the image hashes of two images in order to diff them. It might be useful if users could use the URLs of the images directly as at least one of the images they want to compare will likely be stored in a container registry.

Verify file permissions as part of fileExistenceChecks

It would be great to be able to assert file permissions as part of fileExistenceChecks. Without this, it doesn't do much good to verify that a file exists if it's not readable/writable/executable/etc by the default docker user.

Integration testing: support local, GAE standard/flex, and clustered deployments

We should support deploying sample applications for running integration tests to all environments. This will require use of different APIs and expecting slightly different behavior depending on the environment; for example, writing Stackdriver Logs is a different process in GAE standard vs flex. Test driver should account for that.

Support shell variables

Currently all shell variables, and $() directives, in the commands are replaced by --vars substitutions. We should enable at least an escape path for this.

First, $() should remain unmodified.

Option 1: $VARIABLE should take the --vars substitution value if VARIABLE is defined, or remains unchanged. This confuses a variable intended to used as an env against a --vars substitution.
Option 2: --vars substitutions should begin with underscores to be separate from env variables, for example $_SUBSTITUTION. Unresolved substitutions should result in errors.
Option 3: Don't use shell variable syntax for substitutions.

IMAGE_TAR causes unbound variable failure

Our structure test is failing and we see
./ext_run.sh: line 150: IMAGE_TAR: unbound variable
I see it has "set -u" on so the check of IMAGE_TAR fails if we don't use the "-t" flag.

Remove Docker dependency in iDiff tool

We should try and remove the dependency on having a working Docker daemon on the host machine for the tool. It should be possible to use the Docker Registry API directly to do things like image push/pull and history.

structure_test error: chdir to cwd ("/app") set in config.json failed

I'm seeing this message intermittently. The image being tested, gcr.io/google-appengine/python:latest has /app as a symlink to /home/vmagent/app, so maybe that's a problem? But it's been that way for more than a year.

Error from Kokoro log:

Step #3: 6bcb0d4f1d1d: Pull complete
Step #3: Digest: sha256:eaa3d87858f06447663029e08b6d5166c73d40b9a7b7880e5eea9a57dd762faf
Step #3: Status: Downloaded newer image for gcr.io/gcp-runtimes/structure_test:latest
Starting Step #3
Step #3: container_linux.go:247: starting container process caused "chdir to cwd (\"/app\") set in config.json failed: no such file or directory"
Step #3: docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "chdir to cwd (\"/app\") set in config.json failed: no such file or directory".
Finished Step #3
ERROR
ERROR: build step "gcr.io/gcp-runtimes/structure_test:latest" failed: exit status 127

cloudbuild.yaml: https://github.com/GoogleCloudPlatform/python-runtime/blob/master/cloudbuild.yaml#L14

It also happened while building on my machine yesterday, but I can't remember the specifics, and I can't replicate it locally.

ext_run.sh doesn't handle spaces in $PWD

The flow is like this:

CONFIG_DIR=$(pwd)/.cfg
...
VOLUME_STR="--volumes-from st_container -v $CONFIG_DIR:/cfg"
...
VOLUME_STR=$VOLUME_STR" -v $FULLPATH:/workspace"
...
docker run --rm --entrypoint="$ENTRYPOINT" $VOLUME_STR "$IMAGE_NAME" $CMD_STRING

I will change the script from /bin/sh to /bin/bash and use a bash array to fix this, unless you have an objection to the bash dependency or better idea.

A panic with structure test

It happens when the test fails. Here is the log:

Step #3: Digest: sha256:54d3da62dd1d7b2a5a23c37ab23e113a08d4e1845985947198ec788f23920731
Step #3: Status: Downloaded newer image for gcr.io/gcp-runtimes/structure_test:latest
Starting Step #3
Step #3: === RUN   TestAll
Step #3: 2016/12/07 20:27:51 Running tests for file /workspace/php-nginx.yaml
DEBUG: Reading GCS logfile: 206 (read 2727 bytes)
Step #3: --- FAIL: TestAll (0.02s)
Step #3:        command_test_v1.go:62: COMMAND TEST: php-path
Step #3:        structure_test_v1.go:137: Executing: [which php]
Step #3:        structure_test_v1.go:160: Error running command: exit status 1. Continuing.
Step #3:        structure_test.go:56: Expected string '/opt/php/bin/php' not found in output!
Step #3:        structure_test_v1.go:219: Test php-path exited with incorrect error code! Expected: 0, Actual: 1
Step #3:        command_test_v1.go:62: COMMAND TEST: version
Step #3:        structure_test_v1.go:137: Executing: [php -v]
Step #3:        structure_test_v1.go:160: Error running command: exec: "php": executable file not found in $PATH. Continuing.
Step #3: panic: interface conversion: error is *exec.Error, not *exec.ExitError [recovered]
Step #3:        panic: interface conversion: error is *exec.Error, not *exec.ExitError
Step #3: 
Step #3: goroutine 5 [running]:
Step #3: panic(0x5580e0, 0xc42000ad80)
Step #3:        /usr/local/go/src/runtime/panic.go:500 +0x1a1
Step #3: testing.tRunner.func1(0xc420062180)
Step #3:        /usr/local/go/src/testing/testing.go:579 +0x25d
Step #3: panic(0x5580e0, 0xc42000ad80)
Step #3:        /usr/local/go/src/runtime/panic.go:458 +0x243
Step #3: github.com/GoogleCloudPlatform/runtimes-common/structure_tests.ProcessCommand(0xc420062180, 0x0, 0x0, 0x0, 0xc42000aa80, 0x2, 0x4, 0x1, 0x0, 0x0, ...)
Step #3:        /workspace/gopath/src/github.com/GoogleCloudPlatform/runtimes-common/structure_tests/structure_test_v1.go:164 +0x686
Step #3: github.com/GoogleCloudPlatform/runtimes-common/structure_tests.StructureTestv1.RunCommandTests(0x0, 0x0, 0x0, 0xc42004b880, 0x2, 0x4, 0x0, 0x0, 0x0, 0x0, ...)
Step #3:        /workspace/gopath/src/github.com/GoogleCloudPlatform/runtimes-common/structure_tests/structure_test_v1.go:52 +0x22f
Step #3: github.com/GoogleCloudPlatform/runtimes-common/structure_tests.StructureTestv1.RunAll(0x0, 0x0, 0x0, 0xc42004b880, 0x2, 0x4, 0x0, 0x0, 0x0, 0x0, ...)
Step #3:        /workspace/gopath/src/github.com/GoogleCloudPlatform/runtimes-common/structure_tests/structure_test_v1.go:38 +0xee
Step #3: github.com/GoogleCloudPlatform/runtimes-common/structure_tests.(*StructureTestv1).RunAll(0xc42000cfc0, 0xc420062180, 0xc42002ff28)
Step #3:        <autogenerated>:1 +0x79
Step #3: github.com/GoogleCloudPlatform/runtimes-common/structure_tests.TestAll(0xc420062180)
Step #3:        /workspace/gopath/src/github.com/GoogleCloudPlatform/runtimes-common/structure_tests/structure_test.go:40 +0x187
Step #3: testing.tRunner(0xc420062180, 0x593c48)
Step #3:        /usr/local/go/src/testing/testing.go:610 +0x81
Step #3: created by testing.(*T).Run
Step #3:        /usr/local/go/src/testing/testing.go:646 +0x2ec
Finished Step #3
ERROR
ERROR: build step "gcr.io/gcp-runtimes/structure_test" failed: exit status 2

Improve structure_test bazel rule

RIght now to test a very stripped down image, you have to do something like this:


# Define a tiny binary to run the test
go_binary(
  name = "mytestbinary",
  srcs = "my_test.go"
)

# Create a new image derived from the one you want to test
docker_build(
  name = "my_test_image",
  base = ":the_image_i_want_to_test",
  files = [":mytestbinary"],
)

# Then reference that one in your test
structure_test(
  name = "my_test",
  image = ":my_test_image",
  config = "myconfig.yaml",
)

It would be nicer to remove the need to make the intermediate image. Maybe something like:

structure_test(
  name = "my_test",
  image = ":the_image_i_want_to_test",
  files = ":mytestbinary",
  config = "myconfig.yaml",
)

This would handle either mounting in your test binary or building the intermediate image for the user.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.