profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/minherz/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

minherz/copyright-inserter 2

VSCode extension that inserts a copyright header into editing file

minherz/gke_node_labeling 2

Assign Cloud labels to GKE nodes based on Kubernetes metadata

minherz/community 0

This repository holds the content submitted to https://cloud.google.com/community. Files added to the tutorials/ will appear at https://cloud.google.com/community/tutorials.

minherz/cookbook 0

Collection of Minio recipes

minherz/docker-bench-security 0

The Docker Bench for Security is a script that checks for dozens of common best-practices around deploying Docker containers in production.

minherz/foobar 0

Google game

minherz/ingress-nginx 0

NGINX Ingress Controller for Kubernetes

minherz/jamm 0

This application allows to mute microphone and disable camera in all currently active Google Meet sessions.

minherz/k8s-cert-exam-environ 0

Scripts to build a Kubernetes (v20) two nodes cluster using kubeadm and GKE. The cluster is intended for learning toward Linux Foundation Kubernetes certification exams.

Pull request review commentGoogleCloudPlatform/cloud-ops-sandbox

feat(terraform):separating rating service main tf file to multiple for readability and consistency

+/**+ * Copyright 2020 Google LLC

nit: should be 2021

Ayelet41

comment created time in 21 minutes

Pull request review commentGoogleCloudPlatform/cloud-ops-sandbox

feat(terraform):separating rating service main tf file to multiple for readability and consistency

+/**+ * Copyright 2020 Google LLC

nit: should be 2021

Ayelet41

comment created time in 20 minutes

Pull request review commentGoogleCloudPlatform/cloud-ops-sandbox

feat(terraform):separating rating service main tf file to multiple for readability and consistency

+/**+ * Copyright 2020 Google LLC

nit: should be 2021

Ayelet41

comment created time in 21 minutes

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentGoogleCloudPlatform/cloud-ops-sandbox

feat(terraform): use var instead of static vars + update terraform readme

 variable "app_version" {   description = "Cloud Operations Sandbox's Version. If wasn't set will be 0." } +#GKE Services Cluster+variable "gke_cluster_name" {+  default     = "cloud-ops-sandbox"+  description = "GKE Hipstershop default cluster name."

nit: it is just a "GKE Hipster shop cluster name". The default here only the value 'cloud-ops-sandbox

Ayelet41

comment created time in 24 minutes

PullRequestReviewEvent

Pull request review commentGoogleCloudPlatform/cloud-ops-sandbox

feat(terraform): changing bucket var to dynamically assign

 terraform { data "terraform_remote_state" "state" {   backend = "gcs"   config = {-    bucket = var.bucket_name+    bucket = "${var.project_id}-bucket"

do we mandate defining the bucket name this way? it is OK if we reduce the burden from the user but it seems a potential point of collision when re-using the project without cleaning the state from the bucket.

Ayelet41

comment created time in 29 minutes

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

PR opened googleapis/java-logging

feat: Implement auto population of the HttpRequest from the current HTTP context

Implement population of the HttpRequest instance using information from the currently available HTTP context. Implement the HTTP context for the Spring framework web applications. Add (missing) protocol field to the HttpRequest class.

Fixes #687

+276 -47

0 comment

15 changed files

pr created time in 4 hours

push eventgoogleapis/java-logging

gcf-owl-bot[bot]

commit sha 5a8cedfcd30b59c0630edb5769c850bc26467bb3

fix(java): java 17 dependency arguments (#1266) (#724)

view details

gcf-owl-bot[bot]

commit sha a289c08000475d5b36bfd7d7db79937f8ab82c1b

build: upgrade Java microgenerator to v2.2.1 (#726) * build: upgrade Java microgenerator to v2.2.1 # v2.2.1 ## Bug Fixes - gax batching regression (#863) (3a6f168) # v2.2.0 ## Features - Add REST AIP-151 LRO suport (cb1b534) - enable self signed JWT for http (#850) (aba0ec0) - Implement DIREGAPIC LRO annotations (#832) (d7b29e0) - REGAPIC initial implementation (#824) (fdcfe70) - REGAPIC Multitransport implementation (grpc+rest) (#833) (445daf4) ## Bug Fixes - [bazel] fix rest transport handling in assembly rule (#835) (92f7c1c) - DIREGAPIC LRO generated tests logic (#838) (8ae8e6f) - fix diregapic-lro logic (#834) (957f69a) PiperOrigin-RevId: 405492216 Source-Link: https://github.com/googleapis/googleapis/commit/4381242ee4d8c0694ae1188520e9ac1a72edf817 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8d1ecc73009d949803fe1745f4617546a8cb74fc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGQxZWNjNzMwMDlkOTQ5ODAzZmUxNzQ1ZjQ2MTc1NDZhOGNiNzRmYyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

view details

WhiteSource Renovate

commit sha 63986beed4d8fe4d73ce2ca784d265c021a8a1ca

chore(deps): update dependency com.google.cloud:libraries-bom to v24 (#728) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `23.1.0` -> `24.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/compatibility-slim/23.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/confidence-slim/23.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-logging).

view details

minherz

commit sha 6fd2cd7c2e47c81e8aece844a58f6791ead06bea

chore: resolve warnings in tests

view details

minherz

commit sha 3c75683e53d1700faa66963721c3f22d5d828948

chore: fix warnings in the code

view details

minherz

commit sha 3d206c660a455738b3d6f7abf6600326f939b3e5

chore: fixing formatting and method docs

view details

minherz

commit sha 16be6dcfb1842b0040a603bc00a45cb641cc579d

feat: populate HttpRequest from current HTTP context add interface to populate HttpRequest from the current available HTTP context implement HTTP context for Spring framework add missing 'protocol' field to HttpRequest

view details

push time in 4 hours

push eventgoogleapis/java-logging

minherz

commit sha a6e663aad48f87234ab2b337605d4466905a56b1

chore: fix warnings in the code

view details

minherz

commit sha e728e865241ecc427dbf4c5dc77df6b52fc96858

chore: fixing formatting and method docs

view details

minherz

commit sha 38fe01b9b978b1ca818c024fa3f62a581f42f761

feat: populate HttpRequest from current HTTP context add interface to populate HttpRequest from the current available HTTP context implement HTTP context for Spring framework add missing 'protocol' field to HttpRequest

view details

push time in 4 hours

issue closedgoogleapis/java-logging

Issues with `TransportChannel` not getting closed in gax-java library usage

Environment details

  1. Google Cloud Logging Client for Java
  2. OS type and version: macOS Big Sur
  3. Java version: AdoptOpenJDK 15.0.2
  4. logging version(s): 2.3.1

Steps to reproduce

On instantiating instances of the Logging service multiple times in a row, a RuntimeException is thrown in the gRPC library

Code example

 try (Logging logging = LoggingOptions.getDefaultInstance().getService()) {
    LogEntry entry = LogEntry
                .newBuilder( ... ).build()
    // build `entry`
    logging.write(Collections.singleton(entry));
    logging.flush();
}

Run this code multiple times in a row and it will eventually throw the error, in my experience.

Stack trace

java.lang.RuntimeException: ManagedChannel allocation site at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init>(ManagedChannelOrphanWrapper.java:93) 
~[grpc-core-1.38.0.jar!/:1.38.0] at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:53) 
~[grpc-core-1.38.0.jar!/:1.38.0] at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:44) 
~[grpc-core-1.38.0.jar!/:1.38.0] at io.grpc.internal.ManagedChannelImplBuilder.build(ManagedChannelImplBuilder.java:615) 
~[grpc-core-1.38.0.jar!/:1.38.0] at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:261) 
~[grpc-core-1.38.0.jar!/:1.38.0] at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:360) 
~[gax-grpc-1.65.0.jar!/:1.65.0] at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.access$1800(InstantiatingGrpcChannelProvider.java:81) 
~[gax-grpc-1.65.0.jar!/:1.65.0] at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider$1.createSingleChannel(InstantiatingGrpcChannelProvider.java:231) 
~[gax-grpc-1.65.0.jar!/:1.65.0] at com.google.api.gax.grpc.ChannelPool.create(ChannelPool.java:72) 
~[gax-grpc-1.65.0.jar!/:1.65.0] at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:241) 
~[gax-grpc-1.65.0.jar!/:1.65.0] at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:219) 
~[gax-grpc-1.65.0.jar!/:1.65.0] at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:199) 
~[gax-1.65.0.jar!/:1.65.0] at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:133) 
~[gax-1.65.0.jar!/:1.65.0] at com.google.cloud.logging.spi.v2.GrpcLoggingRpc.<init>(GrpcLoggingRpc.java:142) 
~[google-cloud-logging-2.3.1.jar!/:2.3.1] at com.google.cloud.logging.LoggingOptions$DefaultLoggingRpcFactory.create(LoggingOptions.java:61) 
~[google-cloud-logging-2.3.1.jar!/:2.3.1] at com.google.cloud.logging.LoggingOptions$DefaultLoggingRpcFactory.create(LoggingOptions.java:55) 
~[google-cloud-logging-2.3.1.jar!/:2.3.1] at com.google.cloud.ServiceOptions.getRpc(ServiceOptions.java:560) 
~[google-cloud-core-1.95.0.jar!/:1.95.0] at com.google.cloud.logging.LoggingOptions.getLoggingRpcV2(LoggingOptions.java:129) 
~[google-cloud-logging-2.3.1.jar!/:2.3.1] at com.google.cloud.logging.LoggingImpl.<init>(LoggingImpl.java:120) 
~[google-cloud-logging-2.3.1.jar!/:2.3.1] at com.google.cloud.logging.LoggingOptions$DefaultLoggingFactory.create(LoggingOptions.java:46) 
~[google-cloud-logging-2.3.1.jar!/:2.3.1] at com.google.cloud.logging.LoggingOptions$DefaultLoggingFactory.create(LoggingOptions.java:41) 
~[google-cloud-logging-2.3.1.jar!/:2.3.1] at com.google.cloud.ServiceOptions.getService(ServiceOptions.java:540) 
~[google-cloud-core-1.95.0.jar!/:1.95.0] at [ redacted internal calls ]
~[na:na] at java.base/java.lang.Thread.run(Thread.java:832) 
~[na:na]

Any additional information below

There was a previous error very similar to this that was resolved in https://github.com/googleapis/java-logging/pull/212, but I think there is still some similar code with a TransportChannel that is not getting closed. The previous fix made sure that the TransportChannel here (https://github.com/googleapis/java-logging/blob/master/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java#L110) was getting closed, but there is another code path where a ClientContext is getting created here: https://github.com/googleapis/java-logging/blob/master/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java#L142

In the creation of the ClientContext, it creates its own TransportChannel that I think is not being closed in our usage here in java-logging. See the code in the gax-java codebase here: https://github.com/googleapis/gax-java/blob/master/gax/src/main/java/com/google/api/gax/rpc/ClientContext.java#L199

Hope this helps, thanks!

closed time in a day

gabriel-sada

issue commentgoogleapis/java-logging

Issues with `TransportChannel` not getting closed in gax-java library usage

hi Gabriel, I am closing this issue for now. Feel free to re-open this issue when you have a working example that is reproducing the described behavior.

gabriel-sada

comment created time in a day

issue closedgoogleapis/java-logging

Question : Catch Async Exception of Logging write()

I'm using google cloud logging library version 1.58.0 when i call asynchronous logging write :

Logging logging = LoggingOptions.getDefaultInstance().getService(); 
LogEntry logEntry = LogEntry.newBuilder(Payload.StringPayload.of(message))
                    .setLogName(logName)
                    .setLabels(labelMap)
                    .setSeverity(logLevel)
                    .setResource(MonitoredResource.newBuilder("global").build())
                    .build();
logging.write(Collections.singleton(logEntry));

i got this exception

java.lang.RuntimeException: com.google.cloud.logging.LoggingException: io.grpc.StatusRuntimeException: {SOMETHING_ERROR}: {SOMETHING_ERROR_MESSAGE}.
	at com.google.cloud.logging.LoggingImpl$7.onFailure(LoggingImpl.java:616) ~[google-cloud-logging-1.58.0.jar:1.58.0]
	at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:68) [api-common-1.7.0.jar:na]
	at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1052) [guava-26.0-android.jar:na]

is it possible to catch this type of exception ? i need to put fallback mechanism of logging when google cloud logging can't be used.

closed time in a day

noxymon

issue commentgoogleapis/java-logging

Question : Catch Async Exception of Logging write()

I am closing the issue for now. Feel free to re-open it any clarifications are required.

noxymon

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentGoogleCloudPlatform/cloud-ops-sandbox

fix: broken website links

 The URLs in this message tell you where to find the results of the installation:  ### Recovering from session timeout Should your Cloud Shell session timeout due to user inactivity, you will need to launch the custom Cloud Shell image to access the `sandboxctl` command.-Click the--![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)--button from the [Cloud Operations Sandbox homepage](https://cloud-ops-sandbox.dev/) to restart the custom Cloud Shell+Click the [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](/) button on the [Cloud Operations Sandbox homepage](/) to restart the custom Cloud Shell

just to make sure, both links lead to the same (home) page, right? maybe we can make the button not clickable picture? maybe it is possible to change its look in a way that it seems less clickable?

daniel-sanche

comment created time in a day

issue commentgoogleapis/java-logging

broken Cloud Run envitonment test

I've run a test and can confirm that the snippet used in the env test produces the error when launched in Cloud Run environment:

java.lang.RuntimeException: com.google.cloud.logging.LoggingException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 35.137359943s.

This does not happened when launching a snippet from the Quickstart sample. I have updated the gpaste that now let you execute the working snippet (from Quickstart sample) in the / (root) path and the env test snippet in the /env path.

daniel-sanche

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentgoogleapis/java-logging

feat: Extend a set of options in WriteOption to allow defining the log location as custom project, folder, organization or billing account

 private static WriteLogEntriesRequest writeLogEntriesRequest(       LoggingOptions serviceOptions,       Iterable<LogEntry> logEntries,       Map<Option.OptionType, ?> options) {-    String projectId = serviceOptions.getProjectId();     WriteLogEntriesRequest.Builder builder = WriteLogEntriesRequest.newBuilder();-    String logName = LOG_NAME.get(options);+    String projectId = null;++    LogName logName =+        getLogName(+            serviceOptions.getProjectId(), LOG_NAME.get(options), LOG_DESTINATION.get(options));+     if (logName != null) {-      builder.setLogName(LogName.ofProjectLogName(projectId, logName).toString());+      builder.setLogName(logName.toString());+      projectId = logName.getProject();

This line leads to breaking the legacy behavior when this value of the project id is passed to LogEntry.toPbFunction(). As we established the set of WriteOption in the write() arguments is used to define arguments for the entries.write API call. However, these parameters are used only when the LogEntry item(s) do not have fully qualified log name. This log name is constructed by toPb() function and uses the logName and (new added) destination properties of the LogEntry item. It means that if the item has logName property set but missing the destination property the expected (legacy) behavior would be to construct it with the "default" project id (which is retrieved from LoggingOption). This changes modifies the behavior. IMO, it will be hard to document the new behavior. Which is more important, many developers will not read it but their existing code will behave differently.

losalex

comment created time in a day

PullRequestReviewEvent

Pull request review commentgoogleapis/java-logging

feat: Extend a set of options in WriteOption to allow defining the log location as custom project, folder, organization or billing account

 public void testWriteLogEntriesWithSeverityFlushEnabled() {    @Test   public void testWriteLogEntriesWithOptions() {-    Map<String, String> labels = ImmutableMap.of("key", "value");-    WriteLogEntriesRequest request =-        WriteLogEntriesRequest.newBuilder()-            .putAllLabels(labels)-            .setLogName(LOG_NAME_PB)-            .setResource(MONITORED_RESOURCE.toPb())-            .addAllEntries(-                Iterables.transform(-                    ImmutableList.of(LOG_ENTRY1, LOG_ENTRY2), LogEntry.toPbFunction(PROJECT)))-            .build();-    WriteLogEntriesResponse response = WriteLogEntriesResponse.newBuilder().build();-    EasyMock.expect(loggingRpcMock.write(request)).andReturn(ApiFutures.immediateFuture(response));-    EasyMock.replay(rpcFactoryMock, loggingRpcMock);-    logging = options.getService();-    logging.write(-        ImmutableList.of(LOG_ENTRY1, LOG_ENTRY2),-        WriteOption.logName(LOG_NAME),-        WriteOption.resource(MONITORED_RESOURCE),-        WriteOption.labels(labels));+    test_write_log_entries_with_destination(+        PROJECT, LOG_NAME_PB, LogDestinationName.project(PROJECT));+  }++  @Test+  public void testWriteLogEntriesWithProjectOverrideOptions() {+    test_write_log_entries_with_destination(+        PROJECT_OVERRIDE, LOG_NAME_OVERRIDE_PB, LogDestinationName.project(PROJECT_OVERRIDE));

There should not be an override of the project id functionality. Please check the use of logName parameter in the entries.write request.

losalex

comment created time in a day