Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Conversation

Sita04
Copy link
Contributor

@Sita04 Sita04 commented Mar 15, 2022

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

If you write sample code, please follow the samples format.

@Sita04 Sita04 requested a review from a team as a code owner March 15, 2022 08:43
@generated-files-bot
Copy link

generated-files-bot bot commented Mar 15, 2022

Warning: This pull request is touching the following templated files:

  • .kokoro/presubmit/samples.cfg
  • samples/snapshot/pom.xml
  • samples/snippets/pom.xml

@snippet-bot
Copy link

snippet-bot bot commented Mar 15, 2022

Here is the summary of changes.

You are about to add 5 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added api: securitycenter Issues related to the googleapis/java-securitycenter API. samples Issues that are directly related to samples. labels Mar 15, 2022
Copy link

@catherinerosesantos catherinerosesantos left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few comments.

Copy link

@Shabirmean Shabirmean left a comment

Choose a reason for hiding this comment

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

I've reviewed this PR as part of the onboarding process to become a java-samples reviewer. @kurtisvg can you shadow review my reviews on this PR?

Copy link

@Shabirmean Shabirmean 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 the changes. It seems like some tests are failing. PTAL!

@Sita04 Sita04 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 24, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 24, 2022
@Sita04 Sita04 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 25, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 25, 2022
@Sita04 Sita04 added the owlbot:ignore instruct owl-bot to ignore a PR label Mar 25, 2022
@suztomo
Copy link
Member

suztomo commented Apr 4, 2022

Memo:

com.google.api.gax.rpc.PermissionDeniedException: io.grpc.StatusRuntimeException: PERMISSION_DENIED: The caller does not have permission
	at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:53)
	at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:72)
	at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:60)
	at com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.onFailure(GrpcExceptionCallable.java:97)
	at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:68)
	at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1133)
	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
	at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1277)
	at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038)
	at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:808)
	at io.grpc.stub.ClientCalls$GrpcFuture.setException(ClientCalls.java:564)
	at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:534)
	at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
	at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
	at com.google.api.gax.grpc.ChannelPool$ReleasingClientCall$1.onClose(ChannelPool.java:455)
	at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:463)
	at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:427)
	at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:460)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:562)
	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:743)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:722)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
	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.securitycenter.v1.SecurityCenterClient.createBigQueryExport(SecurityCenterClient.java:4167)
		at com.google.cloud.examples.securitycenter.snippets.bigqueryexport.CreateBigQueryExport.createBigQueryExport(CreateBigQueryExport.java:83)
		at com.google.cloud.examples.securitycenter.snippets.BigQueryExportIT.setUp(BigQueryExportIT.java:76)
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.lang.reflect.Method.invoke(Method.java:498)

From .kokoro/presubmit/samples.cfg :

  • GOOGLE_CLOUD_PROJECT: java-docs-samples-testing
  • GOOGLE_APPLICATION_CREDENTIALS: secret_manager/java-docs-samples-service-account
  • SECRET_MANAGER_KEYS: java-docs-samples-service-account,java-scc-samples-secrets

@suztomo
Copy link
Member

suztomo commented Apr 4, 2022

Would "SECRET_MANAGER_KEYS" work for multiple keys? (The environment variable is plural but I'm not sure)

Screen Shot 2022-04-04 at 11 11 57 AM

@Neenu1995
Copy link
Contributor

The kokoro configuration looks correct. It will work with multiple keys.

@Sita04 Sita04 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 26, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 26, 2022
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Apr 27, 2022
@Sita04 Sita04 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 27, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 27, 2022
Copy link

@Shabirmean Shabirmean left a comment

Choose a reason for hiding this comment

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

LGTM!