java-docs-samples icon indicating copy to clipboard operation
java-docs-samples copied to clipboard

fix(samples): Clean up stale Video Stitcher slates

Open irataxy opened this issue 2 years ago • 2 comments

The project has run out of quota on slates (3), most likely due to b:246797639. This PR adds a mechanism to name test slates with a creation timestamp since the API does not reveal creation time. Before applicable test runs, test slates more than 3 hours old are deleted.

This first commit deletes all old test slates, even those that have not been named with a creation timestamp. A subsequent commit will enable the timestamp naming and selective deletion.

  • [X] Please merge this PR for me once it is approved.

irataxy avatar Sep 15 '22 19:09 irataxy

Please IM me if need quota help. Though @meltsufin may be a project owner now, so you may wish to check with him first.

lesv avatar Sep 19 '22 02:09 lesv

Java 11 & 17 fail - looking at Java 17

So, this test is running in at least 3 VMs at the same time. Is it possible that there is some kind of race condition?

******************** TESTING PROJECTS ********************
btlr run --max-cmd-duration=40m **/pom.xml --git-diff origin/main... . -- /tmpfs/src/github/java-docs-samples/.kokoro/tests/run_test_java.sh
Collecting directories that match pattern...230 collected.
Checking for changes with "git diff"... [0 of 230 complete].
Running command(s)... [0 of 1 complete].
#
# media/stitcher
#

[0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /tmpfs/docker/overlay2/49327a2836e42868f6fd9eeff8120d07bd68d2bc894cc8bfb50613109081d9c8/merged/sys/fs/cgroup/cpuset.
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 62.584 s <<< FAILURE! - in com.example.stitcher.CreateLiveSessionTest
[ERROR] com.example.stitcher.CreateLiveSessionTest.test_CreateLiveSession  Time elapsed: 62.484 s  <<< ERROR!
com.google.api.gax.rpc.DeadlineExceededException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 59.986173943s. [closed=[], open=[[remote_addr=videostitcher.googleapis.com/173.194.203.95:443]]]
	at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:94)
	at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:41)
	at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:86)
	at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:66)


[ERROR] com.example.stitcher.CreateLiveSessionTest.test_CreateLiveSession  Time elapsed: 62.486 s  <<< ERROR!
com.google.api.gax.rpc.NotFoundException: io.grpc.StatusRuntimeException: NOT_FOUND: Resource 'projects/java-docs-samples-testing/locations/us-central1/slates/my-slate-1663600065' was not found
	at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:90)
	at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:98)
	at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:66)
	at com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.onFailure(GrpcExceptionCallable.java:97)

	Suppressed: com.google.api.gax.rpc.AsyncTaskException: Asynchronous task failed
		at com.google.api.gax.rpc.ApiExceptions.callAndTranslateApiException(ApiExceptions.java:57)
		at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112)
		at com.google.cloud.video.stitcher.v1.VideoStitcherServiceClient.deleteSlate(VideoStitcherServiceClient.java:2192)
		at com.example.stitcher.DeleteSlate.deleteSlate(DeleteSlate.java:49)
		at com.example.stitcher.CreateLiveSessionTest.tearDown(CreateLiveSessionTest.java:93)

lesv avatar Sep 19 '22 22:09 lesv