text:
E2E Tests: Pin docker image at previous version to fix CI

Context
E2E tests have started to fail this week due to a change to the Docker image.
Summary
This fixes the CI issues where the Docker environment fails to start because of WordPress not being able to be installed, due to the database wordpress not being created. It turns out the Docker image wordpress has been creating this default database all this time, until recently.
This PR downgrades the WP image to 5.6 for now until there is a better way of using the latest image.  Otherwise we would have to to build our own WP image to wait on the mysql container to fully start and create the needed DB.
Note: we're still running the tests against WordPress 5.7. This just downgrades to Docker image, not WordPress.

For switching back to the latest docker image, refer to @pierlon's work on the AMP plugin: https://github.com/ampproject/amp-wp/pull/5980

authors: swissspidy westonruter


text:
can not get wire for go get github.com/google/wire/cmd/wire

use cmd go get github.com/google/wire/cmd/wire. The go get first download the astuil packages ect.
but the golang.org/x/tools/go can't not to access.
so what can i do for use the wire project

I'm having a hard time reproducing your issue. Can you say what echo $GOPATH shows on your system? And paste the exact output of the go get command?

It might be because there's network issues to get that in China. Try download it from the GitHub mirror
go get github.com/golang/tools

Then you can move everything under tools into $GOPATH/src/golang.org/x/tools

Closing due to inactivity. Feel free to reopen if you're unable to resolve.

source: gharchive/issue

authors: ShawnShoper eliben shantuo zombiezen

repo: google/wire

license_type: permissive

license_source: bigquery


text:
CI step "Set toolchain version" is flaky due to network timeouts

Update: #296 doesn't seem to have done the trick. A few more possible approaches:

Retry the entire job in order to give more time for the network issue to resolve itself
Maybe part of the issue is that the connection is bad, and the retry is reusing the bad connection? Maybe we could implement our own manual retry logic?
Maybe we could somehow cache the needed crates so the jobs usually don't have to re-download?

Old text
Over the past few weeks, most full CI runs (currently 149 jobs) have had at least one failure due to Cargo failing to download a package even after 3 retries (the default value for the net.retry configuration option). Hopefully increasing the number of retries will make this less common.
Note that this was previously encountered in #225. #289 made the errors more obvious, but didn't make them any less common.

#296 doesn't seem to have done the trick. A few more possible approaches:

Retry the entire job in order to give more time for the network issue to resolve itself
Maybe part of the issue is that the connection is bad, and the retry is reusing the bad connection? Maybe we could implement our own manual retry logic?
Maybe we could somehow cache the needed crates so the jobs usually don't have to re-download?

Hello @joshlf, I'm interested in implementing the retry logic. Additionally, is the cargo metadata necessary? It appears that the flow only requires retrieving the version and specifying the cargo version.

Awesome, thanks! If I had to make a recommendation, I'd suggest starting with the caching approach; I suspect it's the one that's most likely to be successful. But it may turn out that there's no good way to cache these artifacts across runs of the build.
As for cargo metadata, I left a comment on the PR you put up - its use is necessary in other build steps, so we unfortunately can't get rid of it.

Sure, I'll try to cache it.

Hi @joshlf, I tested the cache on my forked repository, and it worked. However, it doesn't seem to be functioning correctly on this main repository.

How so?

I reviewed the logs of the action job, which initially indicated that the cache was not found. Subsequently, an attempt to save it failed due to the cache's preexisting existence. This failure appears to stem from a delay in GitHub's cache write-back process.

Huh interesting. Does the current version of the PR work despite that issue, or is that a bug we need to fix first before the PR is ready to merge?

I have addressed this in the pull request. 😄

repo: google/zerocopy


text:
[ci] Build/test Windows targets natively

When building and testing Windows targets, use a Windows runner rather than a Linux runner. This allows us to run tests natively - previously, they were only run under Miri. It also allows us to run UI tests on Windows, which we previously skipped.
Closes #1371

@djkoloski This presumably won't actually pass CI because of https://github.com/google/zerocopy/issues/1371.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.71%. Comparing base (b8e1f94) to head (2a53692).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1374   +/-   ##
=======================================
  Coverage   87.71%   87.71%
=======================================
  Files          15       15
  Lines        5138     5138
=======================================
  Hits         4507     4507
  Misses        631      631

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

source: gharchive/pull-request

authors: codecov-commenter joshlf


text:
Missing index in partial error of MutateGoogleAdsResponse

The Problem
I'm trying to write an error handler for mutating BiddingStrategyOperation using GoogleAdsServiceClient.
When trying to modify a non-existing strategy, ErrorUtils can successfully find the Error for the operation.
However, when trying to delete a non-existing strategy, or when trying to delete a strategy referenced by campaigns, ErrorUtils returns 0 errors.
My Debugging
I noticed the response contains errors, but in their location/path, the index was null.
I captured real responses and serialized them into byte[] to be replayed by this snippet:
public class ErrorUtilBug {

    class CapturedResponses {
        final static String DeletingNonExistingPortfolio = "CgIyABrTAQgDEjlSZXNvdXJjZSB3YXMgbm90IGZvdW5kLiwgaW4gb3BlcmF0aW9uIDAsIGF0IHJlc291cmNlX25hbWUakwEKQ3R5cGUuZ29vZ2xlYXBpcy5jb20vZ29vZ2xlLmFkcy5nb29nbGVhZHMudjIuZXJyb3JzLkdvb2dsZUFkc0ZhaWx1cmUSTApKCgI4AxIXUmVzb3VyY2Ugd2FzIG5vdCBmb3VuZC4aGCoWQmlkZGluZ1N0cmF0ZWd5SWQ6IDIzNCIREg8KDXJlc291cmNlX25hbWU=";
        final static String DeletingReferencedPortfolio= "CgIyABrbAggDEn9Pbmx5IGJpZGRpbmcgc3RyYXRlZ2llcyBub3QgbGlua2VkIHRvIGNhbXBhaWducywgYWRncm91cHMgb3IgYWRncm91cCBjcml0ZXJpYSBjYW4gYmUgcmVtb3ZlZC4sIGluIG9wZXJhdGlvbiAwLCBhdCByZXNvdXJjZV9uYW1lGtUBCkN0eXBlLmdvb2dsZWFwaXMuY29tL2dvb2dsZS5hZHMuZ29vZ2xlYWRzLnYyLmVycm9ycy5Hb29nbGVBZHNGYWlsdXJlEo0BCooBCgIQBBJdT25seSBiaWRkaW5nIHN0cmF0ZWdpZXMgbm90IGxpbmtlZCB0byBjYW1wYWlnbnMsIGFkZ3JvdXBzIG9yIGFkZ3JvdXAgY3JpdGVyaWEgY2FuIGJlIHJlbW92ZWQuGhIqEENhbXBhaWduQ291bnQ6IDEiERIPCg1yZXNvdXJjZV9uYW1l";
    }

    public static void main(String[] args) throws Exception {
        MutateGoogleAdsResponse response = MutateGoogleAdsResponse.parseFrom(decodeBase64(CapturedResponses.DeletingReferencedPortfolio));
        List<GoogleAdsError> errors = ErrorUtils.getInstance().getGoogleAdsErrors(0, response.getPartialFailureError());
        // will print 0
        System.out.println("Number of errors found: " + errors.size());
    }
}

It looks like the message (coming from the server?) knows that index is 0:

But this index was lost along the way:

Please help me. Error handling is important for me.
Thanks ahead.

Update: have followed up for a response from the owners. b/148371436

Update: the error location for the failed operation in partial failure mode is returned by the index into the details array. For example, in your earlier screenshot:

Hope this clears up the confusion here. I'll close this issue for now, but please feel free to reopen if you have further concerns.

Hi Nick.
The suggested (simplified) error model is not as the one documented here
https://developers.google.com/google-ads/api/docs/best-practices/partial-failures#check_if_the_returned_response_contains_a_partial_failure_error
.
The documented error model:

The response contains a "Status" which has a list of "Failure"s.
Each "Failure" has a list of "Error"s.
Each "Error" has a list of "ElementPath"
Each "ElementPath" has an index which is the index of the original
operation.

This is exactly the Java code in the class ErrorUtils provided by the
library.
The ErrorUtils works perfectly fine when mutating Ads, and many other
scenarios.
The only scenario where the ErrorUtils failed is the one described in the
bug.
Maybe the error model was simplified? If so, then the linked documentation
may be outdated?
Thanks again.
Gal Koren
Software Architect - Search API Group  |  Kenshoo
Office +972 732862468
Mobile +972 509267999
www.Kenshoo.com http://www.kenshoo.com/
[image: Transform your marketing. Grow your business.]
http://www.kenshoo.com/
On Tue, May 12, 2020 at 4:29 PM Nick Birnie notifications@github.com
wrote:

Closed #230 https://github.com/googleads/google-ads-java/issues/230.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/googleads/google-ads-java/issues/230#event-3327498590,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACRSPNRSDRDMDKIRO66UFB3RRFFKXANCNFSM4KLWNJYQ
.

--
This e-mail, as well as any attached document, may contain material which
is confidential and privileged and may include trademark, copyright and
other intellectual property rights that are proprietary to Kenshoo Ltd,
its subsidiaries or affiliates ("Kenshoo"). This e-mail and its attachments
may be read, copied and used only by the addressee for the purpose(s) for
which it was disclosed herein. If you have received it in error, please
destroy the message and any attachment, and contact us immediately. If you
are not the intended recipient, be aware that any review, reliance,
disclosure, copying, distribution or use of the contents of this message
without Kenshoo's express permission is strictly prohibited.

Sorry, I just re-read the documentation.
The error model I describe was taken from the ErrorUtils.
The documentation says something else.
There is still a bug in the ErrorUtils and it still throws errors an
exception in the scenario in the bug.
I will experience errors and see if I can avoid using the ErrorUtils.
Gal Koren
Software Architect - Search API Group  |  Kenshoo
Office +972 732862468
Mobile +972 509267999
www.Kenshoo.com http://www.kenshoo.com/
[image: Transform your marketing. Grow your business.]
http://www.kenshoo.com/
On Tue, May 12, 2020 at 5:46 PM Gal Koren gal.koren@kenshoo.com wrote:

Hi Nick.
The suggested (simplified) error model is not as the one documented here
https://developers.google.com/google-ads/api/docs/best-practices/partial-failures#check_if_the_returned_response_contains_a_partial_failure_error
.
The documented error model:

The response contains a "Status" which has a list of "Failure"s.
Each "Failure" has a list of "Error"s.
Each "Error" has a list of "ElementPath"
Each "ElementPath" has an index which is the index of the
original operation.

This is exactly the Java code in the class ErrorUtils provided by the
library.
The ErrorUtils works perfectly fine when mutating Ads, and many other
scenarios.
The only scenario where the ErrorUtils failed is the one described in the
bug.
Maybe the error model was simplified? If so, then the linked documentation
may be outdated?
Thanks again.
Gal Koren
Software Architect - Search API Group  |  Kenshoo
Office +972 732862468
Mobile +972 509267999
www.Kenshoo.com http://www.kenshoo.com/
[image: Transform your marketing. Grow your business.]
http://www.kenshoo.com/
On Tue, May 12, 2020 at 4:29 PM Nick Birnie notifications@github.com
wrote:

Closed #230 https://github.com/googleads/google-ads-java/issues/230.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/googleads/google-ads-java/issues/230#event-3327498590,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACRSPNRSDRDMDKIRO66UFB3RRFFKXANCNFSM4KLWNJYQ
.

--
This e-mail, as well as any attached document, may contain material which
is confidential and privileged and may include trademark, copyright and
other intellectual property rights that are proprietary to Kenshoo Ltd,
its subsidiaries or affiliates ("Kenshoo"). This e-mail and its attachments
may be read, copied and used only by the addressee for the purpose(s) for
which it was disclosed herein. If you have received it in error, please
destroy the message and any attachment, and contact us immediately. If you
are not the intended recipient, be aware that any review, reliance,
disclosure, copying, distribution or use of the contents of this message
without Kenshoo's express permission is strictly prohibited.

Thanks for flagging - it appears that the documentation is incorrect, and that the missing index you originally flagged is the issue. We're looking into this, will keep you updated here.

thanks :)
Gal Koren
Software Architect - Search API Group  |  Kenshoo
Office +972 732862468
Mobile +972 509267999
www.Kenshoo.com http://www.kenshoo.com/
[image: Transform your marketing. Grow your business.]
http://www.kenshoo.com/
On Thu, May 14, 2020 at 2:21 PM Nick Birnie notifications@github.com
wrote:

Thanks for flagging - it appears that the documentation is incorrect, and
that the missing index you originally flagged is the issue. We're looking
into this, will keep you updated here.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/googleads/google-ads-java/issues/230#issuecomment-628568370,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACRSPNT4GSSH4MRBGYYT7DTRRPH45ANCNFSM4KLWNJYQ
.

--
This e-mail, as well as any attached document, may contain material which
is confidential and privileged and may include trademark, copyright and
other intellectual property rights that are proprietary to Kenshoo Ltd,
its subsidiaries or affiliates ("Kenshoo"). This e-mail and its attachments
may be read, copied and used only by the addressee for the purpose(s) for
which it was disclosed herein. If you have received it in error, please
destroy the message and any attachment, and contact us immediately. If you
are not the intended recipient, be aware that any review, reliance,
disclosure, copying, distribution or use of the contents of this message
without Kenshoo's express permission is strictly prohibited.

This should now be fixed.
b/148371436

authors: galkoren nwbirnie

repo: googleads/google-ads-java


text:
Ensure Storage.object parameter encodes "/" chars (#6510)

Add a simple exemption for the Storage object parameter to not treat it as a "path trailer" parameter.
Issue reported in #6510
Background
Changes released in v0.24 (PR 5869 for Issue #4600) allow a parameter,  if the last one in a path, to not URI.encode() the path separator (/).
However, the Storage API requires the object parameter to have path separator characters encoded, even though it is the last parameter in a URL path.
Since this seems to be the only API people have reported about, I've added a specific exception for the Storage object parameter to make sure it gets the full URI encoding.
Also closes #6352, which I believe is a duplicate of #6510.

Anything I can do to help get this reviewed?

repo: googleapis/elixir-google-api


text:
Add presenter tests

Add tests for the following:

GemPresenter
FilePresenter
PackagePresenter

[refs #173]

I had plans to mock File.read and test overriding the various gem methods that use the config, but didn't get to it.

  1) Failure:
GoogleadsGemPresenterTest#test_googleads [/home/circleci/gapic-generator-ruby/gapic-generator/test/google/gapic/presenters/gem/googleads_test.rb:28]:
Expected: "Google Ads Googleads"
  Actual: "Google Ads GoogleAds"

authors: blowmage quartzmo

repo: googleapis/gapic-generator-ruby


text:
make things work on java 10

Still a bunch of deprecation warnings; we can deal with this a little
later.

:( when did the java 7 builds start failing? Can you file an issue for that?

Has the built gax-java been used to build google-cloud-java?

Codecov Report

Merging #565 into master will increase coverage by 0.55%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #565      +/-   ##
============================================
+ Coverage     73.66%   74.21%   +0.55%
  Complexity      899      899
============================================
  Files           175      175
  Lines          4033     3995      -38
  Branches        314      303      -11
============================================
- Hits           2971     2965       -6
+ Misses          914      880      -34
- Partials        148      150       +2

Impacted Files
Coverage Δ
Complexity Δ

...le/api/gax/rpc/ServerStreamingAttemptCallable.java
86.79% <ø> (ø)
17 <0> (ø)
:arrow_down:

...m/google/api/gax/retrying/BasicRetryingFuture.java
92.77% <ø> (ø)
22 <0> (ø)
:arrow_down:

...le/api/gax/core/InstantiatingExecutorProvider.java
57.14% <ø> (+3.8%)
3 <0> (ø)
:arrow_down:

...google/api/gax/core/GoogleCredentialsProvider.java
90.9% <ø> (+90.9%)
6 <0> (+6)
:arrow_up:

...m/google/api/gax/batching/FlowControlSettings.java
76.92% <ø> (+3.58%)
2 <0> (ø)
:arrow_down:

.../com/google/api/gax/batching/BatchingSettings.java
80% <ø> (+2.72%)
2 <0> (ø)
:arrow_down:

...ava/com/google/api/gax/retrying/RetrySettings.java
29.78% <ø> (-2.87%)
2 <0> (-1)

.../java/com/google/longrunning/OperationsClient.java
72.41% <ø> (-0.92%)
15 <0> (-1)

...ain/java/com/google/api/gax/rpc/ClientContext.java
81.66% <ø> (-0.88%)
8 <0> (-1)

.../google/api/gax/retrying/TimedAttemptSettings.java
100% <ø> (+20%)
2 <0> (ø)
:arrow_down:

... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c3e0267...2bef14a. Read the comment docs.

The last commit broke Java 7. Apparently the new java formatter didn't like Java 7 JDK...
I haven't tried building google-cloud-java yet. I'll do that after getting the tests to pass :)

This is probably not going to work. Newer google-java-format really doesn't like Java 7 :(

authors: andreamlin codecov-io pongad

repo: googleapis/gax-java


text:
Synthesis failed for gcp-metadata

Hello! Autosynth couldn't regenerate gcp-metadata. :broken_heart:
Here's the output from running synth.py:
2020-05-15 10:26:14,813 autosynth [INFO] > logs will be written to: /usr/local/google/home/rennie/gitrepos/synthtool/logs/googleapis/gcp-metadata
2020-05-15 10:26:15,758 autosynth [DEBUG] > Running: git config --global core.excludesfile /usr/local/google/home/rennie/.autosynth-gitignore
2020-05-15 10:26:15,764 autosynth [DEBUG] > Running: git config user.name Jeffrey Rennie
2020-05-15 10:26:15,770 autosynth [DEBUG] > Running: git config user.email rennie@google.com
2020-05-15 10:26:15,776 autosynth [DEBUG] > Running: git config push.default simple
2020-05-15 10:26:15,783 autosynth [DEBUG] > Running: git branch -f autosynth
2020-05-15 10:26:15,791 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-05-15 10:26:16,152 autosynth [DEBUG] > Running: git rev-parse --show-toplevel
2020-05-15 10:26:16,161 autosynth [DEBUG] > Running: git log -1 --pretty=%H
2020-05-15 10:26:16,170 autosynth [DEBUG] > Running: git remote get-url origin
2020-05-15 10:26:16,607 autosynth [DEBUG] > Running: git log be74d3e532faa47eb59f1a0eaebde0860d1d8ab4..HEAD --pretty=%H --no-decorate
2020-05-15 10:26:16,614 autosynth [DEBUG] > Running: git log -1 --pretty=%at be74d3e532faa47eb59f1a0eaebde0860d1d8ab4
2020-05-15 10:26:16,620 autosynth [DEBUG] > Running: git log -1 --pretty=%at 4674113712c0c7ada19e6a8219d7963ff174b392
2020-05-15 10:26:16,626 autosynth [DEBUG] > Running: git log -1 --pretty=%at 5bbfd095faedfe273819d266f21e402192a29041
2020-05-15 10:26:16,633 autosynth [DEBUG] > Running: git log -1 --pretty=%at 4fa923bd3dafb91df8613accbe2230299cc5b98e
2020-05-15 10:26:16,639 autosynth [DEBUG] > Running: git log -1 --pretty=%at 55cdc844877d97139f25004229842624a6a86a02
2020-05-15 10:26:16,644 autosynth [DEBUG] > Running: git log -1 --pretty=%at 98c50772ec23295c64cf0d2ddf199ea52961fd4c
2020-05-15 10:26:16,648 autosynth [DEBUG] > Running: git log -1 --pretty=%at ba909fca409f6b38eae0fa735614e127d1fc0deb
2020-05-15 10:26:16,653 autosynth [DEBUG] > Running: git log -1 --pretty=%at 7482e79a82e353248769d819788adc1213e8c207
2020-05-15 10:26:16,659 autosynth [DEBUG] > Running: git log -1 --pretty=%at a7759f81c25396207d46532ed389ad4d34879857
2020-05-15 10:26:16,664 autosynth [DEBUG] > Running: git log -1 --pretty=%at 5b48b0716a36ca069db3038da7e205c87a22ed19
2020-05-15 10:26:16,670 autosynth [DEBUG] > Running: git log -1 --pretty=%at c585ac3b5eff5cd2097a5315ffd9cf4823cc1ed2
2020-05-15 10:26:16,677 autosynth [DEBUG] > Running: git log -1 --pretty=%at b0461724be19443075b08c10d4a345cb217002b5
2020-05-15 10:26:16,685 autosynth [DEBUG] > Running: git log -1 --pretty=%at 84c4156c49be9dcabacc8fd7b0585b6fd789ae47
2020-05-15 10:26:16,692 autosynth [DEBUG] > Running: git log -1 --pretty=%at f503622985e230a6792730bbc3b7746c11fce09e
2020-05-15 10:26:16,700 autosynth [DEBUG] > Running: git log -1 --pretty=%at 3d2a7d0e21387ed455c966da9f9897b0a4bc5bb8
2020-05-15 10:26:16,708 autosynth [DEBUG] > Running: git log -1 --pretty=%at 7b7f386b393947a542b87707499f4458136f4f61
2020-05-15 10:26:16,714 autosynth [DEBUG] > Running: git log -1 --pretty=%at f395615039665af6599f69305efcd886685e74f9
2020-05-15 10:26:16,721 autosynth [DEBUG] > Running: git log -1 --pretty=%at b6bdd4783f396f9252ce28af43f7215834a55c3c
2020-05-15 10:26:16,729 autosynth [DEBUG] > Running: git log -1 --pretty=%at 3593e3a995510c0570648d9a48fc756ab2bfc2cb
2020-05-15 10:26:16,738 autosynth [DEBUG] > Running: git log -1 --pretty=%at cb3433f7f554ea751584bdd3631d45ec56a32eb5
2020-05-15 10:26:16,745 autosynth [DEBUG] > Running: git checkout 07fea1e29aeee3f678b284767c129c6f3b3902ab
Note: switching to '07fea1e29aeee3f678b284767c129c6f3b3902ab'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 07fea1e build: do not fail builds on codecov errors (#528) (#354)
2020-05-15 10:26:16,755 autosynth [DEBUG] > Running: git checkout cb3433f7f554ea751584bdd3631d45ec56a32eb5
Note: switching to 'cb3433f7f554ea751584bdd3631d45ec56a32eb5'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at cb3433f fix: uses http for links to internal logs (#556)
2020-05-15 10:26:16,765 autosynth [DEBUG] > Running: git branch -f autosynth-20
2020-05-15 10:26:16,771 autosynth [DEBUG] > Running: git checkout autosynth-20
Switched to branch 'autosynth-20'
2020-05-15 10:26:16,779 autosynth [INFO] > Running synthtool
2020-05-15 10:26:16,779 autosynth [INFO] > ['/usr/local/google/home/rennie/env3.6/bin/python', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']
2020-05-15 10:26:16,783 autosynth [DEBUG] > Running: /usr/local/google/home/rennie/env3.6/bin/python -m synthtool --metadata synth.metadata synth.py --
/usr/local/google/home/rennie/env3.6/bin/python: No module named synthtool
2020-05-15 10:26:16,819 autosynth [ERROR] > Synthesis failed
2020-05-15 10:26:16,819 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 07fea1e build: do not fail builds on codecov errors (#528) (#354)
2020-05-15 10:26:16,827 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-05-15 10:26:16,834 autosynth [DEBUG] > Running: git clean -fdx
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/google/home/rennie/gitrepos/synthtool/autosynth/synth.py", line 612, in <module>
    main()
  File "/usr/local/google/home/rennie/gitrepos/synthtool/autosynth/synth.py", line 473, in main
    return _inner_main(temp_dir)
  File "/usr/local/google/home/rennie/gitrepos/synthtool/autosynth/synth.py", line 592, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/usr/local/google/home/rennie/gitrepos/synthtool/autosynth/synth.py", line 368, in synthesize_loop
    synthesize_inner_loop(toolbox, synthesizer)
  File "/usr/local/google/home/rennie/gitrepos/synthtool/autosynth/synth.py", line 378, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/usr/local/google/home/rennie/gitrepos/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/usr/local/google/home/rennie/gitrepos/synthtool/autosynth/synthesizer.py", line 119, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/usr/local/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/usr/local/google/home/rennie/env3.6/bin/python', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth passed, closing! :green_heart:

authors: SurferJeffAtGoogle yoshi-automation

repo: googleapis/gcp-metadata


text:
fix: fixed javadoc errors

Update javadoc source version to 8 and modified configuration to ignore 'missing' javadoc comments since missing unnecessary @returns are getting flagged as an error.
Fixes #909  ☕

@aeitzman the fix is too coarse. Half of the warning are due to missing @params, we want those fixed. Same for @returns. It might be optional for builder etc, but not in general.
I suggest we better fix the docs, then disable the check. You can cover only ExternalAccountCredential, CredentialAccessBoundary and I will cover the rest.

authors: TimurSadykov aeitzman

repo: googleapis/google-auth-library-java


text:
Release Google.Maps.Routing.V2 version 1.0.0-beta11

Changes in this release:
No API surface changes; just dependency updates.

Created release for Google.Maps.Routing.V2-1.0.0-beta11

authors: jskeet yoshi-automation

repo: googleapis/google-cloud-dotnet

license_source: github-api


text:
How to use google application credentials json file with 12factor app on heroku or elsewhere?

We like to stick to the 12factor best practices of using environment variables for any credentials.   Using Heroku, we don't want to commit this file to our repo, but we can't include the whole file as an env variable.
Is there an option using this SDK that allows us to authenticate with only the necessary values from the provided json file, set only as environment variables?

Hi @dfuentes77,
ServiceAccountCredentials.newBuilder() might be helpful. With this you should be able to build a ServiceAccountCredentials after setting all the entries in the json files pointed by GOOGLE_APPLICATION_CREDENTIALS to envrionment variables and then pass that to a ServiceOptions or a Client:
ServiceAccountCredentials credentials = ServiceAccountCredentials.newBuilder()...;
ServiceOptions options = ServiceOptions.newBuilder()
      .setCredentials(credentials)
      .setProjectId("[project-id]")
      .build();

Let me know if that helps.

ServiceAccountCredentials.newBuilder()

How do we actually use this in our code? Is there a Node.js example?

Hi @ttfreeman, this repo is about Java. For Node.js please check out google-cloud-node.

authors: dfuentes77 hzyi-google ttfreeman

repo: googleapis/google-cloud-java


text:
Cloud Tasks Client throws 4 DEADLINE_EXCEEDED

We're using cloud tasks to enqueue jobs. This is happening for a few jobs that rely on cloud-tasks, the one i'll focus on writes somewhere between 10-25 tasks it creates by reading a file. 10-20% of the time, this job will fail because the cloud tasks client throws with 4 DEADLINE_EXCEEDED.
I've read through the issue here but it seems that was closed over a year ago now and I'm running into this issue with the latest version of cloud tasks (also ran into it before upgrading using major version 3 of the package).
Environment details

google-cloud/tasks
Deployed to Gen2 cloud function
Node 18
Yarn 1.22.19

Steps to reproduce
Below is my code I'm using to add new tasks
import { v2beta3 } from "@google-cloud/tasks"

const { GCP_PROJECT } = process.env

if (!GCP_PROJECT) {
 throw new Error("GCP_PROJECT is required")
}

const cloudServiceAccountEmail = process.env.CLOUD_TASK_SERVICE_ACCT_EMAIL;

class CloudTasksClientWrapper {
 private client: v2beta3.CloudTasksClient

 constructor() {
   this.client = new v2beta3.CloudTasksClient()
 }

 async createHttpTaskWithToken({
   queueName,
   payload,
   url,
   location = "us-central1",
 }:
 {
   queueName: string
   payload: string
   url: string
   location?: string
 }) {
   const parent = this.client.queuePath(GCP_PROJECT!, location, queueName)

   const body = Buffer.from(payload).toString("base64")

   const task = {
     httpRequest: {
       httpMethod: "POST" as const,
       url,
       oidcToken: {
         serviceAccountEmail: cloudServiceAccountEmail,
         audience: new URL(url).origin,
       },
       headers: {
         "Content-Type": "application/json",
       },
       body,
     },
   }

   // Send create task request.
   const [response] = await this.client.createTask(
     { parent, task },
     { timeout: 5000 }
   )
   return response
 }
}

export { CloudTasksClientWrapper }

Then I call createHttpTaskWithToken from various jobs, for example, after reading every 50 lines from a 1000-line csv, I'll call this function with a task to process those 50 lines.

@majkelEXE Were you seeing that error in client logs or in logs from the cloud task itself? Mine seems to be an issue adding tasks to the queue, not processing them once their in the queue.

In my case it was probably caused by adding hundreds of tasks simultaneously

Did anyone get a resolution to the DEADLINE_EXCEEDED error?
I've tried multiple things but have not really been able to find any solution. I see this issue has been discussed since 2020 for older versions too. Is @googleapis-publisher really not able to solve this issue?
Here is the code block that is causing an error:
`const authClient = await auth.getClient();
const client = new CloudTasksClient({
authClient: authClient,
});
  const parent = client.queuePath(PROJECT, REGION, queue);
  const task = {
    httpRequest: {
      headers: {
        'Content-Type': 'text/plain',
      },
      httpMethod: 'POST',
      url: `${URL}/v1/message`,
    },
    dispatchDeadline: {
      seconds: 30 * 60, //30 minutes
    }
  };

  if (payload) {
    // task.httpRequest.body = Buffer.from(JSON.stringify(payload)).toString('base64');
    task.httpRequest.body = Buffer.from(JSON.stringify(payload));
  }

  if (inSeconds) {
    // The time when the task is scheduled to be attempted.
    task.scheduleTime = {
      seconds: parseInt(inSeconds) + Date.now() / 1000,
    };
  }

  // Send create task request.
  const request = { parent: parent, task: task };
  const [response] = await client.createTask(request);
  // console.log(`Created task ${response.name}`);
  return response.name;`

I have even tried submitting requests in sequence as shown below. But it struggles to create tasks soon after it reaches 5000.
for (contact of recipients) {     try {       await createHttpTask({ campaign, contact }, queueName);     } catch (err) {       console.error('Error in createHttpTask::: ', err);       continue;     }   }
I expected it to run for over 50k tasks, but it couldn't even reach 5k tasks.
Here is my runtime env details;
Running it on Google cloud run, on node 14, using latest "@google-cloud/tasks": "^5.4.0",
Here is the error log snapshot

Any help/suggestion would really be appreciated.
Thanks
~Satish

repo: googleapis/google-cloud-node


text:
Synthesis failed for java-bigtable

Hello! Autosynth couldn't regenerate java-bigtable. :broken_heart:
Here's the output from running synth.py:
2020-05-18 10:02:43,895 autosynth [INFO] > logs will be written to: /tmpfs/src/github/synthtool/logs/googleapis/java-bigtable
2020-05-18 10:02:44,759 autosynth [DEBUG] > Running: git config --global core.excludesfile /home/kbuilder/.autosynth-gitignore
2020-05-18 10:02:44,762 autosynth [DEBUG] > Running: git config user.name yoshi-automation
2020-05-18 10:02:44,765 autosynth [DEBUG] > Running: git config user.email yoshi-automation@google.com
2020-05-18 10:02:44,768 autosynth [DEBUG] > Running: git config push.default simple
2020-05-18 10:02:44,770 autosynth [DEBUG] > Running: git branch -f autosynth
2020-05-18 10:02:44,774 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-05-18 10:02:44,812 autosynth [DEBUG] > Running: git rev-parse --show-toplevel
2020-05-18 10:02:44,816 autosynth [DEBUG] > Running: git log -1 --pretty=%H
2020-05-18 10:02:44,819 autosynth [DEBUG] > Running: git remote get-url origin
2020-05-18 10:02:44,834 synthtool [ERROR] > Failed executing git checkout master:

error: Your local changes to the following files would be overwritten by checkout:
	.bazelrc
Please commit your changes or stash them before you switch branches.
Aborting

2020-05-18 10:02:44,834 autosynth [DEBUG] > Running: git clean -fdx
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 615, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 476, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 576, in _inner_main
    git_source.enumerate_versions(sources, pathlib.Path(temp_dir))
  File "/tmpfs/src/github/synthtool/autosynth/git_source.py", line 166, in enumerate_versions
    source_versions = enumerate_versions_for_source(git_source, temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/git_source.py", line 131, in enumerate_versions_for_source
    local_repo_dir = str(synthtool_git.clone(remote))
  File "/tmpfs/src/github/synthtool/synthtool/sources/git.py", line 85, in clone
    shell.run(["git", "checkout", "master"], cwd=str(dest), check=True)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'checkout', 'master']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth is still having trouble generating java-bigtable. :sob:
Here's the output from running synth.py:
utosynth [DEBUG] > Running: git checkout autosynth-googleapis
Switched to branch 'autosynth-googleapis'
2020-05-18 11:32:10,519 autosynth [ERROR] > Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
2020-05-18 11:32:10,660 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 50a19a6 deps: update dependency com.google.cloud:google-cloud-conformance-tests to v0.0.11 (#307)
2020-05-18 11:32:10,681 autosynth [DEBUG] > Running: git checkout 50a19a6aded1b313390ff78b52d9ffc4f4cc7fdd
Note: checking out '50a19a6aded1b313390ff78b52d9ffc4f4cc7fdd'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 50a19a6 deps: update dependency com.google.cloud:google-cloud-conformance-tests to v0.0.11 (#307)
2020-05-18 11:32:10,690 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at e94ad376 fix: point artman at gapic v1 for monitoring/v3 API
2020-05-18 11:32:10,727 autosynth [DEBUG] > Running: git checkout e94ad376529fabdfd2fce00407926a0cefd38b9e
HEAD is now at e94ad376 fix: point artman at gapic v1 for monitoring/v3 API
2020-05-18 11:32:10,758 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 98c5077 chore: move ci.yaml to workflows dir (#535)
2020-05-18 11:32:10,780 autosynth [DEBUG] > Running: git checkout 7136daa5687f2a5bdcbba2cb25457f56fdf85d59
Previous HEAD position was 98c5077 chore: move ci.yaml to workflows dir (#535)
HEAD is now at 7136daa fix: check for open PR before attemping single PR fallback with AUTOSYNTH_MULTIPLE_PRS (#562)
2020-05-18 11:32:10,807 autosynth [DEBUG] > Running: git branch -f autosynth-43
2020-05-18 11:32:10,812 autosynth [DEBUG] > Running: git checkout autosynth-43
Switched to branch 'autosynth-43'
2020-05-18 11:32:10,820 autosynth [INFO] > Running synthtool
2020-05-18 11:32:10,820 autosynth [INFO] > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']
2020-05-18 11:32:10,823 autosynth [DEBUG] > Running: /tmpfs/src/github/synthtool/env/bin/python3 -m synthtool --metadata synth.metadata synth.py --
2020-05-18 11:32:11,056 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/java-bigtable/synth.py.
On branch autosynth-43
nothing to commit, working tree clean
2020-05-18 11:32:11,190 synthtool [DEBUG] > Ensuring dependencies.
2020-05-18 11:32:11,201 synthtool [DEBUG] > Cloning googleapis.
2020-05-18 11:32:11,202 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
2020-05-18 11:32:11,205 synthtool [DEBUG] > Add custom bazel config: /home/kbuilder/.cache/synthtool/googleapis/.kokoro/.bazelrc
2020-05-18 11:32:11,206 synthtool [DEBUG] > Generating code for: //google/bigtable/v2:google-cloud-bigtable-v2-java.
2020-05-18 11:32:11,488 synthtool [ERROR] > Failed executing bazel --max_idle_secs=60 build //google/bigtable/v2:google-cloud-bigtable-v2-java:

Loading:
Loading: 0 packages loaded
DEBUG: Rule 'com_google_api_codegen' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "251fd77a674041b5e47960d924633787e0fc691ac453a987680b52518ee39e33"
DEBUG: Call stack for the definition of repository 'com_google_api_codegen' which is a http_archive (rule definition at /tmpfs/tmp/bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:70:1
DEBUG: Rule 'gapic_generator_python' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "44d7f11b9d34cfa64f9c4ef3fc87551fb7867f2d06d426443899c13e55842c9c"
DEBUG: Call stack for the definition of repository 'gapic_generator_python' which is a http_archive (rule definition at /tmpfs/tmp/bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:210:1
Analyzing: target //google/bigtable/v2:google-cloud-bigtable-v2-java (0 packages loaded, 0 targets configured)
INFO: Analyzed target //google/bigtable/v2:google-cloud-bigtable-v2-java (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
[0 / 12] [Prepa] PackageTar external/com_google_api_codegen/rules_gapic/java/gradlew.tar.gz ... (3 actions, 0 running)
ERROR: /tmpfs/tmp/bazel/external/com_google_api_codegen/rules_gapic/java/BUILD.bazel:6:1: PackageTar external/com_google_api_codegen/rules_gapic/java/gradlew.tar.gz failed (Exit 1) build_tar failed: error executing command bazel-out/host/bin/external/bazel_tools/tools/build_defs/pkg/build_tar --flagfile bazel-out/k8-fastbuild/bin/external/com_google_api_codegen/rules_gapic/java/gradlew.args

Use --sandbox_debug to see verbose messages from the sandbox
src/main/tools/linux-sandbox-pid1.cc:169: "mount(tmpfs, /tmpbuild, tmpfs, MS_NOSUID | MS_NODEV | MS_NOATIME, nullptr)": No such file or directory
Target //google/bigtable/v2:google-cloud-bigtable-v2-java failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.272s, Critical Path: 0.05s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

2020-05-18 11:32:11,489 synthtool [DEBUG] > Wrote metadata to synth.metadata.
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/java-bigtable/synth.py", line 146, in <module>
    main()
  File "/home/kbuilder/.cache/synthtool/java-bigtable/synth.py", line 30, in main
    generate_data_api(gapic)
  File "/home/kbuilder/.cache/synthtool/java-bigtable/synth.py", line 50, in generate_data_api
    bazel_target=f'//google/bigtable/v2:google-cloud-bigtable-v2-java',
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 61, in java_library
    return self._generate_code(service, version, "java", **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 183, in _generate_code
    shell.run(bazel_run_args)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=60', 'build', '//google/bigtable/v2:google-cloud-bigtable-v2-java']' returned non-zero exit status 1.
2020-05-18 11:32:11,527 autosynth [ERROR] > Synthesis failed
2020-05-18 11:32:11,527 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 50a19a6 deps: update dependency com.google.cloud:google-cloud-conformance-tests to v0.0.11 (#307)
2020-05-18 11:32:11,534 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-05-18 11:32:11,539 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 615, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 476, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 595, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 371, in synthesize_loop
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 381, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 119, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth passed, closing! :green_heart:

repo: googleapis/java-bigtable


text:
Cloud Run Jobs produce logs with incorrect resource type (not supported?)

Problem
Cloud Run Jobs environment and resource type detection is not supported by MonitoredResourceUtil and MetadataLoader
Steps to reproduce
Use the library's default configuration with Cloud Run Jobs.
Expected result
System out produces log entries with the following resource section:
resource: {
   labels: {
      job_name: "migrations"
      location: "us-central1"
      project_id: "prj-my-project"
   }
   type: "cloud_run_job"
}

Actual result
... whereas logs produced by the library have the following:
resource: {
   labels: {
      project_id: "prj-my-project"
   }
   type: "global"
}

what makes them invisible from Cloud Run Job's execution Logs UI, and you can only see them if you go to log explorer and filter out by "global" resource type.

Can we have a clear path forward here? @cindy-peng @alicejli

repo: googleapis/java-logging


text:
feat!: drop node8 support, support for async iterators

BREAKING CHANGE: The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM.
New feature: methods with pagination now support async iteration.

@googlebot I consent.

authors: AVaksman alexander-fenster


text:
Convert API to use GAPIC

Continuing from Bigtable Convert grpc APIs to use GAPIC, Bigtable is the only API left to complete these steps:

[ ] Bigtable

[ ] Generated files are in repo
[ ] Handwritten API is using generated API
[ ] Passing through gaxOptions is available on all requests
[x] Automatic projectId insertion works

@kolodny I'm happy to do this conversion effort whenever the time is right, so it follows the patterns of our other APIs that have converted (there are some gotchas, like pre-processing requests and streams for {{projectId}} placeholders, and allowing GAX's callOptions parameter through). Updating to GAPIC shouldn't have any breaking changes, but before going GA, I'll do a quick run-through of the API to confirm.
I believe we started talking about the conversion after this request: https://github.com/GoogleCloudPlatform/google-cloud-node/issues/2763-- have you found a workaround or otherwise demoted that issue in terms of priority? As it stands, request interceptors are not available with either the GrpcService class or GAPIC/gax.

@alexander-fenster, what's the story with admin?

In progress. Changes will likely be published to googleapis/googleapis
today and then I'll generate the code.
On Tue, Feb 6, 2018 at 11:24 AM, Solomon Duskis notifications@github.com
wrote:

@alexander-fenster https://github.com/alexander-fenster, what's the
story with admin?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/googleapis/nodejs-bigtable/issues/23#issuecomment-363535832,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD1GvyPJ2yFehxTO8KmigXeLhreBcj3Nks5tSKbYgaJpZM4RHV7Y
.

repo: googleapis/nodejs-bigtable


text:
replaceProjectIdToken should not replace {{projectId}} in request body

As per discussion at https://github.com/googleapis/nodejs-storage/issues/489#issuecomment-434491153, call to replaceProjectIdToken when the request has a body replaces the body that contains {{projectId}}.
It's unlikely user's request would contain the {{projectId}} placeholder, but it should probably be fixed.

I think #10 covers the concerns here, but please re-open if you think we need to take more immediate steps to patch a hole somewhere.

repo: googleapis/nodejs-common


text:
Datastore save() fails on null value when excludeFromIndexes is used for nested arrays

Environment details

OS: Debian (rodete)
Node.js version: 8.9.4
npm version: 5.6.0
@google-cloud/datastore version: 1.4.0

Steps to reproduce
Execute the following code (snippet taken from a tiny express app to demo the issue):
router.get('/save', function(req, res, next)  {
  const datastoreClient = Datastore();
  const entity = {
    key: datastoreClient.key(['test']),
    data: {
      "rules": [
        {"requirements": [{"audiences": "value"}]},
        {"requirements": null},
      ]
    },
    excludeFromIndexes: [
      'rules[].requirements[].audiences'
    ]
  };
  datastoreClient.save(entity)
      .then(() => { res.send('OK!'); })
      .catch(error => { res.send('Failed: ' + error); });
});

Result:
Failed: TypeError: Cannot read property 'values' of undefined
With some digging, it seems it's failing here:
https://github.com/googleapis/nodejs-datastore/blob/c1cfe5bfce2ba018c3d2b4e5d03fd1c6e2d420b8/src/entity.js#L539
This only happens with the combination of this data structure + this excludeFromIndexes value, since it causes a traversal of the object, including an expectation that the second requirements field is also an array.
It's sort of a weird edge case, but one we encountered in production this week.

This is a known limitation of the current excludeFromIndexes syntax. https://github.com/GoogleCloudPlatform/google-cloud-node/pull/2773

I have included a fix for this in PR #101, which was originally made to fix #100.
This now allows things like this:
entity = {
  key: key,
  excludeFromIndexes: ['arr[].a[].b'],
  data: {
    nestedArrayVariants: [
      {
        a: [{b:'something'},{c:'else'}],
      },{
        a: null,
      },{
        a: 'a string',
      },{
        a: ['whatever'],
      }
    ],
  },
};

Instead of throwing a type error, it is now simply recognized that the exclusion rule does not apply for the elements of arr where arr[i].a is not an array.
Similarly for the root,
 excludeFromIndexes: ['a[]']

will now only take effect in array fashion (i.e. exclude all direct elements of a from indexes) if the property 'a' is actually an array value.
On the other hand,
  excludeFromIndexes: ['a']

does still not check whether a is not an array. If it is an array value, then excludeFromIndexes = true will be set at the root of a in the entityProto, instead of for each individual element of that array property. This is not allowed and results in an Error: 3 INVALID_ARGUMENT: Exclude from indexes cannot be set on a list value being thrown on the network request.
I think for consistency, as well as flexibility, it would be best, in case of exclusion paths ending in non-array properties, like
excludeFromIndexes: 'path.to[].some.property'

, to apply them only where the end node <...>.property is actually not an array.
For array properties, we have excludeFromIndexes: ['<...>.property[]'], which is simply not applied if <...>.property is not an array.
Likewise, excludeFromIndexes: ['<...>.property'] should simply not be applied where <...>.property is an array.

The problem described in previous message is now handled in the latest commit to PR #101:
Commit

authors: beaulac gunsch trollkotze

repo: googleapis/nodejs-datastore


text:
Error Handling in the Subscription MessageHandler

The Subscription extension of the EventEmitter class appears to ignore errors that happen within the messageHandler. The EventEmitter listener for 'error' and 'uncaughtException' on Subscription seems to be eaten or ignored. To test this:
const messageHandler = (message) => {
  throw new Error('always an error');
};

const errorHandler = (err) => {
  logger.error('caught an error, continuing on');
};

subscription.on('message', messageHandler);
subscription.on('error', errorHandler);

'error' doesn't catch and the app crashes, we found the only way around this is to emit the error to the app instead of throwing, then handle it at the app layer, but that is undesirable for being able to handle the errors gracefully from our pubsub codebase and is really hacky passing the app down to our subscription service.

This seems pretty specific to @stoked10's implementation, so I don't think we need to add any samples for it.

repo: googleapis/nodejs-pubsub


text:
Release @google-cloud/rcloadenv v0.3.2

This pull request was generated using releasetool.

Release is at https://github.com/googleapis/nodejs-rcloadenv/releases/tag/v0.3.2

repo: googleapis/nodejs-rcloadenv


text:
AB - New session pool code

Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for discussion)

[x ] Tests and linter pass
[x ] Code coverage does not decrease (if any source code was changed)
[ ] Appropriate docs were updated (if necessary)
--- It is a major change. I have updated the documentation inside the code.

All the tests are successful but the result of the test did not print. I was seeing the same problem when debugging locally.

Test issue is likely this https://boneskull.com/mocha-v4-nears-release/#mochawontforceexit
There's some leftover async code running not being cleaned up from one of the tests.

Ran the tests using this module [0] to see what's going on and it's output suggests it's the session pinging code.  Commenting that setTimeout call out resolves the problem.  I'm going to look into a fix for this.
[0] https://github.com/myndzi/wtfnode

Still in the midst of getting the tests to properly clean up after themselves (should be done by around noon).  However I have opened this PR against the @honeyscience master branch (which will add it to this PR) to resolve leaking the pingSessions_ timeout.
https://github.com/honeyscience/nodejs-spanner/pull/3

Tests are now passing without having to pass --exit 🎉
https://github.com/honeyscience/nodejs-spanner/pull/4
We'll be reviewing this code this morning and should have it merged into this PR today.

👋 Hey, just checked the Corporate CLA and I'm covered on it.  Company name is Honey Science Corporation, was signed on March 5th, 2018.
Just let me know if I need to do some special linking or something to get this to go through.

@walshie4 The CI is taking extremely long time for your latest commit - looks like it just hangs somewhere. Are you able to see the CircleCI logs of your CI tasks?
I will cancel the running tests as they already take more than 10 minutes each and it started creating a backup in our CI queue :)

upd: they just failed (timeout probably?), I did not cancel anything.

@alexander-fenster Hmm that was the issue my changes were intending to fix.  I'll take another look.

Oh derp, I see what happened, one of my branches never got merged in.

Coverage failures are (from what I can tell) from this line:
https://github.com/googleapis/nodejs-spanner/pull/194/files#diff-0c4114554752f1c79d35d17a91563062R445
@anup-honey is working on another PR which will change how pinging sessions works and as a side-effect remove that line of code, so we should probably wait to scrutinize this line too heavily.

We might have a major bump coming soon, if we break support for Node v4 now that it's EOL. @crwilcox @alexander-fenster -- are we doing that?

@ofrobots - here we are going to have a proposed breaking change in Spanner library. Do you feel we can drop Node 4 support any time soon so that we could release this breaking change as v2.0.0?

(asking specifically about Node 4 support for Spanner, but I remember the conversation when you stated it would be great to have all libraries be on the same page here, so just reiterating)

I have almost completed the code changes that will be backward compatible so that it does not have to be a major version. But then the changes that I am adding have to be removed when you guys do a major upgrade.
Let me know your thoughts so that I know whether to continue with pushing my changes.
Thanks a lot for the help

I think we should avoid making breaking changes in the library. What exactly are the breaking changes ans why are they needed?

I have another PR opened and I will merge. But before that, please have a look at it.
https://github.com/honeyscience/nodejs-spanner/pull/6
This will be backward compatible and once we make a major update, we can update the repo to make a breaking change.
Also, it handles the idle sessions differently. We do not send a keep-alive message anymore.

Whenever we borrow a session, we check when the session was last used. Based on that, either we use that session or destroy it.
The code also destroys any session that has been idle for a certain time (provided in parameters, the default is 50).

We will never have a session that has been open for days/months as sessions will be destroyed and created based on idle timeouts. If there is always load then the sessions will not be destroyed.
Once we have internally reviewed the PR, I will update this PR with those changes.

What is the justification for not keeping the sessions alive?

Initially we used the same pooling library before, but it didn't quite accommodate all the features requested from the spanner team, which is where the decision to write our own came from. I'm ok with switching back if we can make it work, or if the Spanner team (@vkedia @snehashah16) is ok with changes in functionality being proposed.

The code now sends KeepAlive messages as before. I have reverted those changes.

@anup-honey probably the same line missing coverage as previously (setTimeout function).  Should probably also rebase this now that master has moved

Where do we stand on this? I started to work through the code and it looks like this still has a few breaking changes and some missing functionality.

acquireTimeout

Default value has been changed from Infinity to 0

concurrency

Concurrency no longer controls how many concurrent requests the pool makes, but instead acts as an acquire queue

writes

Support appears to be missing in favor of minWrites/maxWrites
appears default went from 0 to 20%

get next available session when desired type is unavailable

in the old code if a read session was requested but none were available, we would return a write session in its place (and vice versa). It looks like this is no longer the case and we simply wait for a session of the requested type to become available.

@callmehiphop
acquireTimeout
The default value has been changed from Infinity to 0. Yes, but the behavior is same. Here 0, indicated infinity.
Ans - If you want, I can easily change that.
concurrency
Concurrency no longer controls how many concurrent requests the pool makes, but instead acts as an acquire queue.
Ans - We need a session to make a request. So if we throttle getting a session, we indirectly throttle our requests. Also, in the previous code, requestQueue_ is used only in 3 places, createSession, destorySession and pingSession.
writes
Support appears to be missing in favor of minWrites/maxWrites appears default went from 0 to 20%.
Ans - This is correct. To change this, we will have to rewrite session pool logic and it will get complicated. To make the code simpler, this decision was taken.
get next available session when the desired type is unavailable in the old code if a read session was requested but none were available, we would return a write session in its place (and vice versa). It looks like this is no longer the case and we simply wait for a session of the requested type to become available.
Ans - We can implement this functionality, when asked for a read session and no read session is available, we grab a write session. But when we ask for a write session, if we return a read session, it might not work as the code was expecting a write session. We can definitely convert a read session to a write session on the fly and convert it back when the task is completed.

@callmehiphop
acquireTimeout
       The default value has been changed from Infinity to 0.
       Ans - Yes, but the behavior is same. Here 0, indicated infinity. If you want, I can easily change that.

concurrency
        Concurrency no longer controls how many concurrent requests the pool makes, but instead acts as an acquire queue.
         Ans - We need a session to make a request. So if we throttle getting a session, we indirectly throttle our requests. Also, in the previous code, requestQueue_ is used only in 3 places, createSession, destorySession and pingSession.

writes
      Support appears to be missing in favor of minWrites/maxWrites appears default went from 0 to 20%.
      Ans - This is correct. To change this, we will have to rewrite session pool logic and it will get complicated. To make the code simpler, this decision was taken.

get next available session when the desired type is unavailable in the old code if a read session was requested but none were available, we would return a write session in its place (and vice versa). It looks like this is no longer the case and we simply wait for a session of the requested type to become available.
      Ans - We can implement this functionality, when asked for a read session and no read session is available, we grab a write session. But when we ask for a write session, if we return a read session, it might not work as the code was expecting a write session. We can definitely convert a read session to a write session on the fly and convert it back when the task is completed.

@anup-honey

Yes, but the behavior is same. Here 0, indicated infinity. If you want, I can easily change that.

I'm ok with adding support for 0, but lets just keep support for Infinity to make it backwards compatible.

We need a session to make a request. So if we throttle getting a session, we indirectly throttle our requests. Also, in the previous code, requestQueue_ is used only in 3 places, createSession, destorySession and pingSession.

I don't think this is right. As the code is now even if acquires are throttled, that doesn't mean the user can't acquire more sessions than the specified concurrency value. If that happens there would be no mechanism to throttle all of the concurrent requests. The original request for a concurrency knob was to throttle the initial creation of sessions. IIRC creating too many sessions too quickly will result in a rate limiting error.

This is correct. To change this, we will have to rewrite session pool logic and it will get complicated. To make the code simpler, this decision was taken.

That might be an issue because this would be a breaking change. I need a Googler to chime in here (@JustinBeckwith), but I think we want to avoid any breaking changes since this is client is already at 1.0.0.

But when we ask for a write session, if we return a read session, it might not work as the code was expecting a write session. We can definitely convert a read session to a write session on the fly and convert it back when the task is completed.

Currently we do just that, so let's continue to do this moving forward.

@callmehiphop
I have addressed all the issues including the 'writes'.
Now the session pool will not create 20% of write session by default.
I need some help in fixing the test cases. All the test cases work fine on my local machine but once it is deployed, one of the test cases fails. I would like your help so that I do create a lot of commits to fix a test case.

@anup-honey sure thing! What can I do to help?

@callmehiphop
Thanks for the response. There is one test case that is failing in circleci. When I run it locally on my machine, all the test cases work fine.
I feel there is some timing issue (race condition) that I cannot replicate on my local machine. If I can get access to the box where circleci is running, I can ssh into it and try to find the reason.
Let me know if you think of a better way.

@callmehiphop
Also, we ran the circleci script in our circleci environment and all the test cases passed.

@callmehiphop @crwilcox @alexander-fenster
We need to get this resolved soon. We need to either get this PR merged or you guys want to come up with a different solution. We have been running this code in our production environment for about a month now. This can/will affect our migration effort to spanner and we are running under very tight deadlines.

cc: @JustinBeckwith

@callmehiphop
I have fixed the test cases too.

@callmehiphop
I have incorporated your comments in the PR. Please let me know if you have any more comments

@callmehiphop: I have updated my PR with a bug fix and addressed all the comments.

Thanks @anup-honey, we really appreciate all the work you've put into this. I started making some local edits that I was going to submit as a PR to your branch and I stumbled across something that has me a bit concerned.
We've introduced a new option, maxWait, which allows the user to specify the maximum number of acquire calls to have at one time. We're also using this as a means to support the fail option by setting maxWait to 0. After reviewing the generic pool code, it actually looks as though this value must be a positive integer. That being said, I'm not sure there is actually a reliable way of supporting the fail option with this pooling library.

@callmehiphop
Actually setting the maxWait to 0 will work.
https://github.com/coopernurse/node-pool/blob/master/lib/Pool.js#L441
I have provided the link of the code in Generic Pool that checks for the condition and rejects when the _waitingClientsQueue is equal to or greater than
maxWaitingClients. All these variables are defined and used in Generic Pool code

@callmehiphop
You are right, I somehow missed it.
I tested by setting the value to 0.1 instead of 0 and all the other checks to work fine as required.
Do you think, it is an acceptable solution? Or I can create an issue with Generic Pool library.

I have created an issue on the Github page for Generic Pool

@callmehiphop
I have created a PR to fix Generic Pool.
https://github.com/coopernurse/node-pool/pull/235
This should get merged

PR on node-pool is merged.

@callmehiphop
I have a new PR to fix generic pool.
https://github.com/coopernurse/node-pool/pull/236

Closing in favor of #243

authors: alexander-fenster anup-honey callmehiphop crwilcox stephenplusplus vkedia walshie4

repo: googleapis/nodejs-spanner


text:
Why do we have 2 system-test scripts?

https://github.com/googleapis/nodejs-storage/blob/master/package.json#L35-L38
And which one do we want?

@JustinBeckwith @jkwlui I don't know enough to have an opinion about this yet, but curious about the answer; feels like probably it should be CI/CD that decides which tests to run, rather than running two types of tests in one script? (just my gut shot).

Yeah I wanted to run both tests as part of Kokoro's System-test build. I didn't realize I hadn't actually done this 😛, sorry!
Having to add another test build to our existing CI is not the easiest - so I think for now I'll just make it run after system-tests in the same build.

authors: bcoe callmehiphop jkwlui

repo: googleapis/nodejs-storage


text:
A 'type' field of entity is always empty

I'm trying to use Google Document AI for getting data from a PDF file. But a 'type' field of entity is empty always. But it must be non-empty according to the documentation.
Environment details

Mac OS X - 10.15.6
Python version: 3.7.6
pip version: 19.3.1
google-cloud-documentai version: 0.2.0

Code example
My code is based on the Codelabs tutorial
from google.cloud import documentai_v1beta2 as documentai

def parse_invoice(project_id='myprojectid',
         input_uri='gs://cloud-samples-data/documentai/invoice.pdf'):
    """Procsingle document with the Document AI API, including
    text extraction and entity extraction."""

    client = documentai.DocumentUnderstandingServiceClient()

    gcs_source = documentai.types.GcsSource(uri=input_uri)
    # mime_type can be application/pdf, image/tiff,
    # and image/gif, or application/json
    input_config = documentai.types.InputConfig(
        gcs_source=gcs_source, mime_type='application/pdf')

    entity_p = documentai.types.EntityExtractionParams(enabled=True)
    parent = 'projects/{}/locations/us'.format(project_id)

    request = documentai.types.ProcessDocumentRequest(
        parent=parent,
        input_config=input_config,
        entity_extraction_params=entity_p)
    document = client.process_document(request=request)
    print(document.entities)

Here is a part of output:
, text_anchor {
  text_segments {
    start_index: 273
    end_index: 303
  }
}
mention_text: "John Doe\njohndoe@email.com"
mention_id: "6"
confidence: 0.8736821413040161

Does anybody know where can be a problem?

@AlexanderKomarov Hi, are you expecting type to be populated in the response entity?  I'm not able to find that requirement in the API docs or the library docs.
I believe printing the proto will skip fields that aren't set, but it is still accessible e.g., entity.type should not error.

Thank you for the quick response @busunkim96
Yes, I was expecting to get something like that "Address", "email", "Phone number". According to the documentation:
type - Entity type from a schema e.g. Address.
I was going to use it for analyzing a document. Perhaps there is another way to get an entity type.

@dalequark Could you take a look?

@AlexanderKomarov @busunkim96
I faced the same problem. Trying to use invoice parser (when using the sample from docs https://cloud.google.com/document-ai/docs/invoice-parser).

You are receiving the same info as on the test page https://cloud.google.com/document-ai/docs/drag-and-drop (if you select the "invoice" option) the type of entities might be filled (at last it worked for me)
there is an option that sends with CURL request and missed in the sample
request = documentai.types.ProcessDocumentRequest(
parent=parent,
input_config=input_config,
document_type='invoice')

document type must be set to use invoice parser (but before it never worked for me I always got "invoice" is not allowed for your project even after apply required form and got permission)
3) you need to receive permissions to use it. (fill the form  "Document AI limited access customer request form" on https://cloud.google.com/document-ai/docs/invoice-parser page)

Thank you for filing this issue. It sounds like your issue has been resolved.
Also, note that the current version of the Document AI service is v1beta3, which introduces the concept of parsers. Please migrate your solutions to v1beta3, as v1beta2 is no longer considered the most up-to-date version of the service.

authors: AlexanderKomarov busunkim96 roman-borodinov telpirion

repo: googleapis/python-documentai


text:
Resource Manager: update API from v1beta1 to v3

Python: 3.5.3
Operating System: Debian GNU
Pip Freeze:
google-api-core==1.3.0
google-api-python-client==1.7.4
google-auth==1.5.1
google-auth-httplib2==0.0.3
google-cloud-container==0.1.1
google-cloud-core==0.28.1
google-cloud-resource-manager==0.28.1
google-cloud-storage==1.11.0
google-resumable-media==0.3.1
googleapis-common-protos==1.5.3
Stacktrace:
Traceback (most recent call last):
File "/usr/local/google/home/epad/.local/share/virtualenvs/django-gke-0KxaOTFM/bin/django_gke", line 11, in
load_entry_point('django-gke', 'console_scripts', 'django_gke')()
File "/usr/local/google/home/epad/Projects/django-gke2/django-gke/django_gke/django_gke.py", line 253, in main
args.func(args.debug)
File "/usr/local/google/home/epad/Projects/django-gke2/django-gke/django_gke/django_gke.py", line 173, in new
project_id = goog_client.create_project_workflow()
File "/usr/local/google/home/epad/Projects/django-gke2/django-gke/django_gke/cli/google_client.py", line 111, in create_project_workflow
project_id, project_name)
File "/usr/local/google/home/epad/Projects/django-gke2/django-gke/django_gke/cloudlib/project.py", line 40, in create_and_set_existing_project
self._create_project(project)
File "/usr/local/google/home/epad/.local/share/virtualenvs/django-gke-0KxaOTFM/lib/python3.5/site-packages/backoff/_sync.py", line 99, in retry
ret = target(*args, **kwargs)
File "/usr/local/google/home/epad/Projects/django-gke2/django-gke/django_gke/cloudlib/project.py", line 55, in _create_project
project.create()
File "/usr/local/google/home/epad/.local/share/virtualenvs/django-gke-0KxaOTFM/lib/python3.5/site-packages/google/cloud/resource_manager/project.py", line 138, in create
data=data)
File "/usr/local/google/home/epad/.local/share/virtualenvs/django-gke-0KxaOTFM/lib/python3.5/site-packages/google/cloud/_http.py", line 293, in api_request
raise exceptions.from_http_response(response)
google.api_core.exceptions.Forbidden: 403 POST https://cloudresourcemanager.googleapis.com/v1beta1/projects: The caller does not have permission
Steps to reproduce: Using Gcloud auth login with a non corp account and the attempting to project.create() will throw this error.
We are able to get this to work with corp accounts but will be doing external users soon and found that this fails.
I believe changing the version here to v1 would fix this.

The client for v3 will be merged today however we're going to wait until next week to publish the release candidate. The release candidate version will be 1.0.0-rc1 and once it is published it should only be available to users who install the pre-release version using pip install --pre python-resource-manager

authors: enriquejosepadilla parthea

repo: googleapis/python-resource-manager


text:
remove hooray. it spams during pure localization

I would like to remove this info since it spams in pure localization mode.
Or could you suggest any other way of disabling this log? I don't want to set minloglevel higher because it would also disable logs that I set in my custom cartographer_ros.

what a killjoy pull request :-)

I'd also be a bit sad to see this go. If you really want to change it, we should make sure that debugging does not become harder. This is right now the best signal whether the background processing is running at real-time. You could switch it to output the work_queue_ length if background processing falls behind. What do you think?

@jihoonl, I think @wohe's suggestion is a good one. Do you plan to implement that or should we drop this PR?

Outputing the length of work_queue_ if it falls behind sounds better to me. Ok. I will update the PR as you suggested.
Another question, I see this logging also outputs pretty often. Do you have any good idea to disable this log? I wanted to make it as ROS_DEBUG but glog doesn't seem to support this level.

commits got messed up while rebasing. Should I recreate the PR?

Someone more knowledgeable about git than me could probably figure out how to repair this, but as far as I am concerned you can just create a new PR. I don't think there is too much context that we are loosing.

Replaced by #547

No need for a new PR, you can just force push to this branch. You should probably rebase everything on top of the current upstream master. I can assist with anything git related if anyone needs help :)

authors: cschuet damonkohler jihoonl ojura wohe

repo: googlecartographer/cartographer


text:
WIP: Sketches out a possible implementation for a layer approach for the octree.

It models the current octree as the required position layer + optional intensity (f32) & color (vec3u8).
Octree generation gets way slower with this, and the client is changed to a callback to a bunch of points (1e6) instead of a callback to every single point.
This misses some implementations (see NOCOM) and it does not add a builder API (to add new layers at generation time). It also does not contain mutability (i.e. changing some layers after generation time with new data), but these fits obviously into the design space now.

@feuerste Does this still have a purpose or can I close this from your point?

We are currently implementing layers (attributes) anyways, so we can close this one...

authors: SirVer feuerste


text:
update android dependencies and kotlin version

The source code provided as part of this codelab does not work out of the box with today's developer tool versions. This can be discouraging and frustrating for newcomers. Therefore I updated the android dependencies and the kotlin versions.
@florina-muntenescu please help merging this PR to help all these wonderful people doing the android codelabs.
With ❤ from Amsterdam

Would be great to have the version updates also for master.
Thanks a lot for your PR.

@ktiniatros thank you for figuring this out. The tutorial needs to be updated as well. Is that on GitHub too?

repo: googlecodelabs/android-room-with-a-view


text:
Teachable Machine V2: Exporting doesn't work

dunno if this is the right place to report this
Failed to load resource: the server responded with a status of 404 ()
image:1 Access to fetch at 'https://converter-release-pigdgyswcq-uc.a.run.app/convert/image/keras' from origin 'https://teachablemachine.withgoogle.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
index.bundle.js:1413 TypeError: Failed to fetch

https://converter-release-pigdgyswcq-uc.a.run.app/convert/image/keras returns a 404.
Browser is Chromium 78.0.3904.87 64-bit.

Same here!!!

Hi. We had a configuration mistake, and rolled out a fix yesterday. Let us know if you still experience issues!

authors: BrunoMiguens HalfdanJ steamp0rt


text:
Feature/dependency management

Python dependencies installed through requirements.txt

This looks ok to me.

authors: guidotheelen rsheeter

repo: googlefonts/noto-emoji


text:
Upgrade to Tokio 1.16.0

As per: https://github.com/tokio-rs/tokio/releases/tag/tokio-1.16.0

Also, this release includes improvements to the multi-threaded scheduler that can increase throughput by up to 20% in some cases (#4383).

Seems like it would be worth doing the upgrade, and doing some benchmarking on before and after.

I'll update it tomorrow

authors: XAMPPRocky markmandel

repo: googleforgames/quilkin


text:
xHeight as string custom parameter crashes defcon

Some Noto fonts have a xHeight custom parameter (is that even supported by Glyphs.app itself?).
This used to be cast by glyphsLib to int before setting it in the UFO with defcon.
Now it’s left as a string to match Glyphs.app behaviour when writing *.glyphs file’s.
https://github.com/googlei18n/glyphsLib/pull/227#issuecomment-336103359
But defcon expects an int and chokes with ValueError otherwise
https://github.com/googlei18n/fontmake/issues/369
We need to cast it to int just before passing it on to defcon.
Or if that parameter is not even supported/used by Glyphs, we should ignore it and maybe only keep it in the private lib.

GlyphsApp doesn’t seem to use the xHeight instance customParameter.
When I generate NotoSansArabic-Regular.otf, the OS/2.sxHeight is 374, the same a the master’s xHeight while the xHeight instance customParameter is 536.

Thanks for checking.
I wonder why MTI added that custom parameter if it's not applied by Glyphs.app...
So what shall we do?
cast to int and apply the xHeight custom parameter in glyphsLib, even though Glyphs.app itself does not?
Or keep that parameter in the lib under com.schrift... but without setting it inthe UFO.info?

@schriftgestalt This seems to be a bug in 2.5b. The GSFontmaster already has a master.xHeight attribute, it doesn’t make sense to have a master.customParameters["xHeight"]. But being able to overwrite the interpolated one with instance.customParameters["xHeight"] may make sense.

But being able to overwrite the interpolated one with instance.customParameters["xHeight"] may make sense.

Yes. I have a look.
I found why there might be a "xHeight" parameter in the master parameters. It is indeed in the list. But meant for a "local" value like arabic:123. That allows different vertical metrics per script. But is only used for displaying the metrics lines in the UI.

Ok, that explains the duplicated ascender and descender for the masters. It would be less confusing with a different name.

authors: anthrotype moyogo schriftgestalt


text:
CBDT/CBLC version number

We use 2.  In OpenType standard they are marked as 3.  I just asked FreeType to add support for 3.  We should update after the fixed version of FreeType is shipped in Android...

Or just leave as is...

@behdad, does this mean we're not technically in agreement with the OT spec?  Is there something to do for this issue?

@behdad, does this mean we're not technically in agreement with the OT spec?

I believe so.  Though, reports say our font works in Windows 10 update, so maybe they also implemented a workaround.

Is there something to do for this issue?

Yes, after making sure the version of FreeType in Android accepts the correct version number (3), we should bump the version number in the font to 3.

I think we should

EmojiCompat has some issues with the new version number as it will fail to load the font on devices with Android 4.4 - 6.0.
It works with the version number set to 2 again.

authors: C1710 behdad dougfelt


text:
Testing

Add tests for the HttpServletResponse handlers, and use an interface pattern to allow for mocking.
Add Javascript tests where needed as well

Created https://github.com/googleinterns/step7-2020/issues/48 to track JavaScript testing separately.

authors: austinteshuba gbuenoandrade


text:
chore: Set snippet-bot alwaysCreateStatusCheck to true

So snippet bot will submit a status check

Caveat:
We changed a default value of snippet-bot's config aggregateChecks to true.
This means, snippet-bot is submitting one single check named snippet-bot check. If you want to use it in branch protection rule, please use that one.

authors: arriolac tmatsuo


text:
gradle build error with Play Services 6.5.87

In my build.gradle I have:
dependencies {
compile 'com.google.maps.android:android-maps-utils:0.3'
compile 'com.google.android.gms:play-services-base:6.5.87'
compile 'com.google.android.gms:play-services-location:6.5.87'
compile 'com.google.android.gms:play-services-maps:6.5.87'
}
and I get the error:
Error:Execution failed for task ':app:processDebugResources'.
Error: more than one library with package name 'com.google.android.gms'
You can temporarily disable this error with android.enforceUniquePackageName=false
However, this is temporary and will be enforced in 1.0
thanks

please see here: http://blog.csdn.net/gdky005/article/details/45889897 !

@gdky005 could you please translate it, I don't speak chinese and google's translation makes me want to smoke crack...

repo: googlemaps/android-maps-utils


text:
didTapAt method not calling when I tap on google map transparent label

I need to adding functionality. if the user taps on anywhere in the map it should drop a pin. But when I tap on a transparent label on google map it should not call this delegate method.
func mapView(_ mapView: GMSMapView, didTapAt coordinate: CLLocationCoordinate2D) {
}
for your better understanding, we attach the below image. so you can identify what is a transparent label on the map.

You can see in the image if I tap on the red circle area the above delegate method not working.
I want to click anywhere on the map. it should get the touch event.
Can you please help me?

I found the solution:
you can use this method when the user will tap on the label.
func mapView(_ mapView: GMSMapView, didTapPOIWithPlaceID placeID: String, name: String, location: CLLocationCoordinate2D) {
print("didTapPOIWithPlaceID placeID")
}

repo: googlemaps/maps-sdk-for-ios-samples


text:
ArcGIS MapService doesn't load on latest Maps V3

Running simpleags.html, there's a loop of metadata requests, but the layer never loads. I've got the same behavior on a production site. Looks like the last supported version is unavailable, so I can't verify how it works when it's working. Any ideas on fixes or workarounds?
Thanks!

This commit fixes the problem as far as I can tell. Not sure exactly what changed (I think creating a new ImageOverlay didn't used to trigger draw() and now it does) or what the right solution is to break the loop that breaks stuff because the code is severely under-designed and very difficult to follow.
https://github.com/tst-dhudlow/v3-utility-library/commit/c560ae8e244aba55d8c940e35c0f790712e338b7


text:
Add pre 26 support

Since this is the goto for Oreo/Channel support code, I think it would be highly recommended to show how to correctly support SDK's lower than 26 in the sample code rather than forcing everyone to use 26+

This sample has been deprecated/archived (check README for more information on newer samples related to this technology).
As recommended by GitHub, we are closing all issues and pull requests.

authors: behelit codingjeremy


text:
All unclear things

Working with UI (the Leanback library).
Specially for me it is difficult to understand which fragment is representing specific UI element, like where i can find list of fragments with associated xml layout?
For example "ErrorFragment" how i will be able to know which layout structure it represents

TvInputServices
What is the difference between TvInputService and standard android IntentService? As I know you can run IntentService from code but this situation is different with TvInputService. How TvInputService can be run or it is not necessary and it is enough to describe TvInputService in android manifest file?
How Android Live Channels app can recognize my TvInputService and run it? Can I сlose access Android Live Channels app to run my service without my permissions? Can i manipulate TvInputService from my app UI (ui with two buttons one of it should run service other one have to stop it)?

Authorization in Android Tv apps.
How many ways do we have to authorize users by social networks not only Google+ (Facebook, Twitter an etc)?
Ok. I have case and I spouse to build app which should has simple UI and a few TvInputService, but TvInputService must be run when current user already authorized.

Thanks for reporting your questions!

The list of available Fragments is available on this page: https://developer.android.com/reference/android/support/v17/leanback/app/package-summary.html

For your example of ErrorFragment, you can see the XML attributes in the associated docs (you will have to click on the [Expand] link to expand): https://developer.android.com/reference/android/support/v17/leanback/app/ErrorFragment.html#inhattrs

Take a look at https://source.android.com/devices/tv/ if you want to try to add your own TV service. Perhaps someone else can comment on your questions here regarding the specifics, as at the current time, I don't know the answers to such specifics. Additionally, maybe the link I gave you can help answer those questions.

Android of course makes it easy to authorize with Google+ but for Facebook/Twitter/etc, you would have to implement your sign in flow yourself using the standard Android libraries. Leanback can of course help here with the UI but the sign in logic would exist independent of this.

Hope this helps! :)

regarding the authorization with other service you should think of a "second-screen" authorization like in the official youtube app. i think it is the best way for users. just generate a code and save it to a cloud database (like parse). point the user to a web interface, implement a standard authorization screen and save the tokens to the cloud database associated with the code....

Thanks for your answer. I solved that problem with authorization. But now i
have another problem with type of stream, I know that there are a few
available types of stream for android tv like HLS *.m3u8 (HTTP Live
Streaming), HTTP Progressive *.mp4  and e.t.c.
For me i think HLS more approachable coz i have this link
http://vs2.cdn.ott.otautv.kz/dtv/id20_KTR_SG--7Kazakhstan/03/plst.m3u8, but
it doesn't work. When i was trying to pay this link i just could see blank
black screen and also i have  other link
http://auth.torrent-tv.ru/h/719/1/2/WWdKN0pSWFpoMVVYU09PUExtOHc4Z1Y4d3FDd1JDUk5jTnV0am16UURINEViYTRGZVlRV3ppWDk1Z3NmYkhlVA
and it doesn't  work too. I have tried many times with many type of stream
and nothing :(( Maybe i should do something with stream before?
2015-06-21 20:20 GMT+06:00 Alex notifications@github.com:

regarding the authorization with other service you should think of a
"second-screen" authorization like in the official youtube app. i think it
is the best way for users. just generate a code and save it to a cloud
database (like parse). point the user to a web interface, implement a
standard authorization screen and save the tokens to the cloud database
associated with the code....
—
Reply to this email directly or view it on GitHub
https://github.com/googlesamples/androidtv-Leanback/issues/37#issuecomment-113907447
.

--
С уважением,Lyssenko Artem: artem.lysenko92@gmail.com
Aartem.lysenko92@gmail.com

@FireFighter92 I've updated the sample to include support for ExoPlayer. Though out of the box this won't allow you to point it at an HLS stream, it should be very easy to add if you look at our sample code along with the ExoPlayer demo app, and specifically their HlsRendererBuilder.
Hope this helps!

authors: FireFighter92 digitaldesaster ryanseys

repo: googlesamples/androidtv-Leanback


text:
Version conflict with support lib version 27.1.1

When I use this library with support library version 27.1.1, I'm getting error briefly version conflict with 27.1.0.
Where can I tweak to get it fixed?

@Naresh-Katta can you show the dependencies block of your build.gradle?

api "com.android.support:appcompat-v7:${suprtLibVrtn}"
api "com.android.support:design:${suprtLibVrtn}"
api "com.android.support:recyclerview-v7:${suprtLibVrtn}"
api "com.android.support:cardview-v7:${suprtLibVrtn}"
api 'pub.devrel:easypermissions:1.2.0'
and
ext {
    suprtLibVrtn = "27.1.0"
}

@Naresh-Katta try adding dependencies on support-compat and support-fragment as well.

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 27.1.0. Examples include
com. android. support : animated-vector-drawable:27.1.1 and com.android. support : exifinterface:27.1.0 more... (Ctrl+ F1)

Still getting the issue.

Same issue here. Using the 27.1.0 it works, setting 27.1.1 I get the same error.

These are the libraries we depend on:
    api "com.android.support:appcompat-v7:$support_library_version"
    api "com.android.support:support-compat:$support_library_version"
    api "com.android.support:support-fragment:$support_library_version"

You should add explicit dependencies on each of those at whatever version you want.  That will tell gradle what to do.
Any further problem is coming from another dependency or from your build customizations.

I took my dependencies, put it into an empty project and 'played' with them, in order to figure out the problem.
In my case it was 'com.squareup.picasso:picasso:2.71828' to conflict with 'com.android.support:appcompat-v7:27.1.1'. By removing it, it works.

@emaborsa is right. This issue not because of easypermissions.
adding api "com.android.support:exifinterface:27.1.1"; worked like a charm for me

authors: Naresh-Katta emaborsa nareshkatta99 samtstern

repo: googlesamples/easypermissions


text:
Auth error -- Any documentation to help debug?

Is there any a good place to start searching for documentation that might help me resolve the error below?
connecting......
connected: 192.168.11.136
Firebase push failed
POST /logs.json?auth=############: -1   (Replaced secret with ## for post)

Resolved: I was using the wrong firebase url... appname.firebase.com when it should have been appname.firebaseIO.com

repo: googlesamples/firebase-arduino


text:
signin app's release build fails

Step 2: Describe your environment

OS version: MacOS High Sierra
Didn't change anything in the project.

Step 3: Describe the problem: release build fails on lint errors
Steps to reproduce:

Clone the repository
Run the  ./gradlew :signin:app:assembleRelease command from project's root.

Observed Results:

Build fails with lint errors:

> Task :signin:app:lintVitalRelease FAILED
/Users/alex/src/google-services-master/android/signin/app/build.gradle: Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]
/Users/alex/src/google-services-master/android/signin/app/build.gradle: Error: httpclient defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]

Expected Results:

I did expect the build to succeed.

Since this repository strives to showcase the way to use the various SDKs, I'd expect it to at least successfully build in release configuration.. otherwise how are we expected to integrate the SDK?
There's a similar issue in SO, however the answers there are pretty destructive - the main suggestion is to exclude SDK's compile dependencies. What is the suggested way to workaround this issue?

Opened an issue in SDK's repository as well, since I'm not sure whether the fix should be in the library's code or as an suggested workaround in a showcase (this) repository.

repo: googlesamples/google-services


text:
A lot of models are not rendeding correctly

Most of the models don't render properly, any ideas of what library could be used for rendering?

Are you using PolySampleAndroid or PolySampleARCore?
PolySampleAndroid should support most Blocks models, but the renderer is very simple so it's unlit and doesn't support textures.
PolySampleARCore only supports models that have a single texture due to the way the renderer is set up.
Even though the sample renderers are limited, the OBJ files should be compatible with most 3D libraries and engines, so once you download the OBJ and supporting MTL/texture files using the Poly API, you should be able to feed those into your own rendering pipeline.

@btco PolySampleAndroid, well I was trying just to change ID for example to elfFxSObt4X and it failed to render it correctly, okay if it just a sample of using API, but not the rendering, I think this issue is out of project scope.

Exactly. That asset isn't a Blocks object. It's an uploaded object with a texture and it's well beyond the sample's rendering capabilities.
Like you said, this is just a sample of the API. The rendering logic is minimal and meant only to demonstrate the API.

authors: Dwite btco

repo: googlevr/poly-sample-android


text:
fix for github issue #280

Don't try to modify navigator.vrEnabled if it does exist but is set to false. Check for undefined instead.  fix for github issue #280

I signed it!

good catch, thanks

authors: cvan joshmarinacci

repo: googlevr/webvr-polyfill


text:
Google Drive Private File upload(config.json)

Hello, I am saving data to google drive in my flutter project. And I set google sign in scope u driveAppdataScope, driveFileName i config.json and parents i appDataFolder to make the data appear hidden.
Can someone else read the config.json we put in the drive? Or vice versa, can we read the (hidden) config.json that someone else has put? What happens when an application puts config.json and someone else tries to put it in?
Can you help me?

Each application has an isolated app data folder and users can not directly interact with it. Other applications can not access your apps data, nor can your app access others'.

For further questions, please use Stack Overflow. This issue tracker is for the sample code contained here only.

authors: gizemgizg sqrrrl

repo: googleworkspace/java-samples


text:
🛑 goormEDU is down

In c91f356, goormEDU (https://edu.goorm.io) was down:

HTTP code: 403
Response time: 601 ms

Resolved: goormEDU is back up in 46fa834 after 5 minutes.

repo: goorm-dev/goorm-status

license: MIT


text:
🛑 goormEDU is down

In 2d42944, goormEDU (https://edu.goorm.io) was down:

HTTP code: 403
Response time: 893 ms

Resolved: goormEDU is back up in 6268fc7 after 5 minutes.


text:
🛑 goormIDE is down

In 3a4589c, goormIDE (https://ide.goorm.io) was down:

HTTP code: 403
Response time: 795 ms

Resolved: goormIDE is back up in fb8dde1 after 12 minutes.


text:
🛑 goormEDU is down

In fb1b36e, goormEDU (https://edu.goorm.io) was down:

HTTP code: 403
Response time: 685 ms

Resolved: goormEDU is back up in a56195a after 5 minutes.