text:
Cannot determine IsPermanentFailure() from existing RetryPolicy

I am creating a version of bigtable's async_retry_unary_rpc.h for spanner, but there is no IsPermanentFailure() call on spanner's RetryPolicy, which the retry logic uses (although, only to generate an error message).
bigtable's policies wrap the common policies to include this method, but I wasn't sure we'd want to make that change in spanner, and since all the existing spanner policies end up using internal::SafeGrpcRetry I decided to just call IsPermanentFailure() on that instead.
note the spanner policies are currently just aliases for types in google-cloud-cpp-common, so if we change anything we should probably change it there.
I'm creating this bug before the code is submitted so I can reference it in a TODO.

This may have become easier to fix as part of the #4912 changes.

This was originally bug 1388 in spanner, and the TODO I mentioned was removed in https://github.com/googleapis/google-cloud-cpp-spanner/pull/1441
async_retry_unary_rpc:125 still calls IsPermanentFailure() on the RpcRetryPolicy although I'm not sure if that's really still an issue (and I'm having trouble recalling why I thought it was to begin with).  So, I'm inclined to close this

authors: coryan mr-salty


text:
[Q] Running "storage" tests on Ubuntu 16

As I mentioned in #4682, most "storage*" tests fail for me. This does not look right and it would be good it someone took a look at that on a clean VM.
I ran a few test executables directly and they fail with this:
$ ./google/cloud/storage/tests/bucket_integration_test
Running main() from gmock_main.cc
[==========] Running 40 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 40 tests from BucketIntegrationTest
[ RUN      ] BucketIntegrationTest.BasicCRUD
/home/osmolsky/toolchain_build/google-cloud-cpp/google/cloud/storage/tests/bucket_integration_test.cc:39: Failure
Value of: project_id_.empty()
  Actual: true
Expected: false
[  FAILED  ] BucketIntegrationTest.BasicCRUD (1 ms)
[ RUN      ] BucketIntegrationTest.CreatePredefinedAcl
/home/osmolsky/toolchain_build/google-cloud-cpp/google/cloud/storage/tests/bucket_integration_test.cc:39: Failure
Value of: project_id_.empty()
  Actual: true
Expected: false

and this:
$ ./google/cloud/storage/tests/key_file_integration_test
Running main() from gmock_main.cc
[==========] Running 4 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 2 tests from KeyFileJsonTest/KeyFileIntegrationTest
[ RUN      ] KeyFileJsonTest/KeyFileIntegrationTest.ObjectWriteSignAndReadDefaultAccount/0
/home/osmolsky/toolchain_build/google-cloud-cpp/google/cloud/storage/tests/key_file_integration_test.cc:43: Failure
Value of: bucket_name_.empty()
  Actual: true
Expected: false
[  FAILED  ] KeyFileJsonTest/KeyFileIntegrationTest.ObjectWriteSignAndReadDefaultAccount/0, where GetParam() = "GOOGLE_CLOUD_CPP_STORAGE_TEST_KEY_FILE_JSON" (2 ms)
[ RUN      ] KeyFileJsonTest/KeyFileIntegrationTest.ObjectWriteSignAndReadExplicitAccount/0
/home/osmolsky/toolchain_build/google-cloud-cpp/google/cloud/storage/tests/key_file_integration_test.cc:43: Failure
Value of: bucket_name_.empty()
  Actual: true
Expected: false

bucket_integration_test (as the name suggests) is an integration test, it tries to run actual calls to the GCS service and therefore needs a number of environment variables to configure the service account it will use, the google cloud project, any testing resources (such as buckets and Pub/Sub topics), etc.
If you want to run these tests, you can find a list of these environment variables here:
https://github.com/googleapis/google-cloud-cpp/blob/63c0dea04c550aac33fbcedb6a933ec028bc65ca/ci/etc/integration-tests-config.sh#L22-L25
https://github.com/googleapis/google-cloud-cpp/blob/63c0dea04c550aac33fbcedb6a933ec028bc65ca/ci/etc/integration-tests-config.sh#L34-L47
Note that the values used in that file are for our CI builds, as I am sure you realize, you would need to provide your own values.

Thanks! That clarifies the issue.

source: gharchive/issue

authors: coryan ns-osmolsky

repo: googleapis/google-cloud-cpp

license_type: permissive

license_source: github-api


text:
Break from stream loop early if we encounter an error

Fixes #2144
Consider the following. Let's say we are looping over a stream and checking for eof():
std::string message("hi there i am a message whoo hoo\nhi there i am a message whoo hoo\nhi there i am a message whoo hoo\nhi there i am a message whoo hoo\n");
std::vector<std::string> log_lines;
std::istringstream is(message);

while (!is.eof()) {
  std::string line;
  std::getline(is, line);
  log_lines.emplace_back(std::move(line));
}

This will output:
hi there i am a message whoo hoo|hi there i am a message whoo hoo|hi there i am a message whoo hoo|hi there i am a message whoo hoo||

Notice the extra blank entry at the end. It is incorrect to loop on eof() because if an error in the stream occurred, we will do an extra read on an invalid stream before the loop ends. One approach is to refactor the loops but this can result in performance degradation. Instead, we just check the stream state inside the loop and break early.

This change is

FYI, there is one more instance I didn't tackle in this PR because it is a little bit more complicated to refactor, so I would like to leave it to someone else: https://github.com/googleapis/google-cloud-cpp/blob/master/google/cloud/storage/client.cc#L125.

source: gharchive/pull-request


text:
impl(GCS+gRPC): isolate channels via local subchannel pools

Part of work for #8878

This change is

I am 99.44% sure this is a good idea, but I am running a benchmark overnight to make sure.


text:
CRC error when uploading a specific content to Google cloud storage

The following code results in error message Provided CRC32C "..." doesn't match calculated CRC32C "...":
Storage storage;
String bucketName = "bucket";
String blobName = "gtest";
String GOOGLE_CREDENTIALS_SCOPE = "https://www.googleapis.com/auth/cloud-platform";
String APPLICATION_TYPE = "application/octet-stream";
String googleCredentialsJson = null;

ArrayList al = new ArrayList();
al.add(GOOGLE_CREDENTIALS_SCOPE);
String s = String.format("\r\n--__END_OF_PART__--\r\n01234");

googleCredentialsJson = new String ( Files.readAllBytes( Paths.get("google.json") ) );
GoogleCredentials credentials = GoogleCredentials.fromStream(new ByteArrayInputStream(googleCredentialsJson.getBytes()))
                .createScoped(al);
storage = StorageOptions.newBuilder().setCredentials(credentials).build().getService();

BlobId blobId = BlobId.of(bucketName, blobName);
BlobInfo blobInfo = BlobInfo.newBuilder(blobId).setContentType(APPLICATION_TYPE).build();

storage.create(blobInfo, s.getBytes());

The issue is reproducible using example programs on Linux:
printf "\r\n--END_OF_PART--\r\n01234\n" > rr
java -jar ... com.google.cloud.examples.storage.StorageExample  upload rr bucket

@dk823832 I have tried it and able to reproduced.Contrary to your claim \r\n--__END_OF_PART__--\r\n01234, \r\n It's calling BufferedWriter.newLine() which uses the current platform's default line separator (unless you explicitly set the line.separator system property). On Unix systems this will be "\n" so you just add \n instead of  \r\n error will gets disappear.
String s = String.format("\n--__END_OF_PART__--\n01234");

This is not about platform specific line separator. The issue is reproducible on Linux, see my second comment how to reproduce it. Storage API accepts a byte array so it shouldn't matter what content that array contains and it should be able to upload it.

Any news on this issue? Another reproducer on Linux without using String.format:
replace String s = String.format("\n--END_OF_PART--\n01234");
with byte s[] = {13, 10, 45, 45, 95, 95, 69, 78, 68, 95, 79, 70, 95, 80, 65, 82, 84, 95, 95, 45, 45, 13, 10, 48, 49, 50, 51, 52};
and storage.create(blobInfo, s.getBytes());
with storage.create(blobInfo, s);

The problem appears only if the given content includes "--END_OF_PART--" string which is used as a part delimiter by com.google.api.client.http.MultipartContent.java
(https://github.com/googleapis/google-http-java-client/blob/master/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java)
Such content being sent is recognized by the server side as multiple parts and handled in a different way: CRC32C/MD5 calculated only for the first part.
If the content includes "--END_OF_PART" (without two dashes at the end) the server will reject:
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
Malformed multipart body.

authors: athakor dk823832 fazunenko

repo: googleapis/google-cloud-java

license_source: bigquery


text:
feat: Modules point to aggregator pom

Add docFX profile

Job is failing due to 2022-07-26T19:47:58.1260449Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.2:check (checkstyle) on project google-cloud-java: Failed during checkstyle execution: Unable to find configuration file at location: license-checks.xml: Could not find resource 'license-checks.xml'. -> [Help 1]. The root directory doesn't have a license-checks.xml file. I can copy it over to templates/ if that makes sense.

@lqiu96 Yes, these license-checks.xml files should probably move up to the root. We shouldn't need to duplicate them in each module.

@meltsufin FYI, I'm skipping the maven-enforcer-plugin results for the CoverageAggregator
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <skip>true</skip>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>extra-enforcer-rules</artifactId>
            <version>1.6.0</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

in coverage.pom.xml.

I noticed. We should also skip maven deploy for this module in the future.


text:
What does "Cloud Web Risk is not yet publicly available" in your docs refer to?

Hey Folks,
in your docs[1] as part of the installation first paragraph you say :
"Cloud Web Risk is not yet publicly available. You must be whitelisted in order to gain access"
I am not exactly sure what you are saying here. We are planning on implementing Web Risk into a commercial product and I just need clarification on what this comment means. Our product is hosted in AWS (😃) rather than Google Cloud. We have the API working from a simple CLI cURL. Can you clarify this point so that we wont run into issues down the line.
thank You.
[1] Installation Heading
https://github.com/googleapis/google-cloud-php-web-risk

Hi @DarraghDuffy, I've opened https://github.com/googleapis/google-cloud-php/pull/4318 to address this as that verbiage is old. Sorry for the confusion!

Excellent thanks @dwsupplee for the clarification - at least you know we do read documentation 😄

authors: DarraghDuffy dwsupplee

repo: googleapis/google-cloud-php-web-risk


text:
chore: Use latest artman version and remove final keyword

Closes: https://github.com/googleapis/google-cloud-php/issues/2273 && https://github.com/googleapis/google-cloud-php/issues/2272

Good eye :). Thanks @jdpedrie, PTAL - should be fixed.

repo: googleapis/google-cloud-php


text:
Firestore client stops functioning after 10 snapshot listeners are registered - JAVA

Java Spring Boot 3.0.2
Firestore Listeners ( 7 )
Region FireStore  - Sao paulo
Region Server - Sao Paulo AWS

Issue related : https://github.com/googleapis/google-cloud-java/issues/3514
I have this kind of problem @schmidt-sebastian
i have 7 listeners, but always disconnecting some listeners and stop registering information in database. Im using Java.
What i have to do..to stop this behavior..?? because its intermitent situation.
I have to move to realtime database? or have some config extra to fix that? Because when i restart the server the listener back again..

Can someone help me?

Again, we are having a strange behavior of listeners.   We have 7 listeners active and some time just 6..just 5.. and back to 7 ..but with this behavior we can put our plataform in production stage.

Java

implementation 'com.google.firebase:firebase-admin:9.1.1'
Resource resource = resourceLoader.getResource("classpath:onefood-prod-firebase.json");
    String fileLines = new BufferedReader(new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8))
            .lines()
            .collect(Collectors.joining());
    InputStream serviceAccount = new ByteArrayInputStream(fileLines.getBytes());

    FirebaseOptions options = new FirebaseOptions.Builder()
            .setCredentials(GoogleCredentials.fromStream(serviceAccount))
            .setDatabaseUrl("realtimedatabaseurl") //we are using realtimedatabase
            .build();
    FirebaseApp.initializeApp(options);

    databaseReference = FirebaseDatabase.getInstance().getReference();

    dbfirestore = FirestoreClient.getFirestore(); // firestore instance

if we change te firestore instance to this line
dbfirestore = FirestoreClient.getFirestore();
dbfirestore.getOptions().toBuilder().setChannelProvider( FirestoreOptions.getDefaultTransportChannelProviderBuilder()
.setPoolSize(2).build());
            will change something?

Can you describe the execution environment?  Is this running in an EC2 container or something?
Are there any exceptions in the Java logs?

Lets Go.
Im running a API in SpringBoot inside a EC2 Linux ( Normal Java Application API) work like a charm no problem with the api.
I have added firebase admin in dependecy gradle (like google said)
I have the credentials by service account, like google explain.
The realtime database work good!  firestore work too but some times the listener drop, i know because the document is not deleted from collection and not saving in database inside API.
This is NOT expected behavior because listener drop,

This is right EXPECTED behavior, because listener is active, read, process and delete ..

I have 7 listeners and this is expected, not drop

But this behavior is not expected

I will try to put this code and check if resolve something,  i will set pool size 2..  but i thinks is not necessary.. we talking about 7 listeners only..
dbfirestore = FirestoreClient.getFirestore();
dbfirestore.getOptions().toBuilder().setChannelProvider( FirestoreOptions.getDefaultTransportChannelProviderBuilder()
.setPoolSize(2).build());
im glad someone can help me resolve my problem with firestore.

i did now a stress work load...
i send a lot request to a specific listener and this is the behavior.
Drop a lot os listeners.. @gregfenton

@schmidt-sebastian  is related with this issue?  ( the difference is nodejs to java )
https://github.com/firebase/firebase-admin-node/issues/931

i change my code just to check the workload.
for(int i=0;i<=50;i++)
new DBFireStore().SendOrdersTransport(onFinishedListener,context,orderItens);
 my listener drop after run this..  i put for just to see ..but original code dont have..  but when users are send orders in high scale happen the same thing..

the problem is higher workload .. i check three times the workload and if we see the listener drop when the workload if high. the clock below each graph show us.. everytime have a peak drop listener.
now..i dont know what to do.. :(

im using this
https://firebase.google.com/docs/admin/setup#java

authors: gregfenton lucazin

repo: googleapis/java-firestore


text:
Drop dependency on request

We should stop using request in favor of axios.  This should yield a very large improvement in startup perf.

See https://github.com/googleapis/nodejs-common/pull/210.

authors: JustinBeckwith fhinkel

repo: googleapis/nodejs-common


text:
Cannot connect to the emulator: grpc Connect Failed

Environment details

OS: OSX 10.12.6
Node.js version: v8.9.3
npm version: 5.5.1
@google-cloud/datastore version: 1.3.0

All debug info here https://github.com/Sobesednik/datastore-emulator-test
Steps to reproduce

git clone https://github.com/Sobesednik/datastore-emulator-test.git
cd datastore-emulator-test
npm i
gcloud beta emulators datastore start --no-store-on-disk
(new termial) $(gcloud beta emulators datastore env-init)
npm t

It works with @google-cloud/datastore.

Thanks for going through the trouble to set up the reproduction repo. It's very appreciated! I've been able to reproduce and find the fix. I will have a PR and release shortly.

Released a fix for this in @google-cloud/datastore@1.3.2. Please check it out, and let me know if there are any issues.

@stephenplusplus I've checked and it's working now, thank you for the fix!

authors: stephenplusplus z-vr

repo: googleapis/nodejs-datastore


text:
File.save doesn't work on cross-project bucket and didn't spit out any error

Environment details

Cloud Function environment
Node.js version: v14
@google-cloud/storage version: 5.8.4

Steps to reproduce

Have two separate projects - A and B
Prepare a bucket in Project A.  [not ideal but for a quick test] Give App Engine default service account from Project B Storage Admin access.
Prepare a simple http-trigger cloud function with Node v14 runtime in Project B running under App Engine default service account.
The following is based on the sample codes from File.save method.  Put that in the http-trigger function mentioned at step #3.

const targetStorage = new Storage({
  projectId: 'project-b'
});
const targetBucket = targetStorage.bucket('project-b-test-bucket');

const file = targetBucket.file('/foo/bar.txt');
const contents = 'This is the contents of the file.';

try {
  await file.save(contents);
  console.log('bar file has been uploaded');
} catch (error) {
  console.error(`error => ${error.message}`);
}

Trigger the function and observe that there is no error spit out but there is no file created in Project A.
Downgrade @google-cloud/storage module to v3.0.3 and observe that the same arrangement works.

Thanks to anyone looking into this.

Hi @pyitphyoaung, thanks for filing this issue. I followed your outline and was not able to reproduce it. Does it fail for all HTTP requests or only file.save()? Does it work for multi-part uploads? You can change that by setting options.resumable to false.
const targetStorage = new Storage({
  projectId: 'project-b'
});

I think this might be a typo, but according to your description, did you mean to pass in project-a instead? I tried it both ways and still was not able to reproduce the issue.
Any additional information is highly appreciated, thanks!

Sorry for very late reply, @cojenco.  Thanks very much for looking into this.
Confirm that I can't replicate the issue with recently created projects.  Very likely it's related to the fact that initial target project is relatively old and I'm reaching out to the Google Support team to find out.  Will share any useful finding in terms of @google-cloud/storage module back here.

authors: cojenco pyitphyoaung

repo: googleapis/nodejs-storage


text:
Synthesis failed for python-area120-tables

Hello! Autosynth couldn't regenerate python-area120-tables. :broken_heart:
Here's the output from running synth.py:
truct_54__handle_cancellation_from_core.tp_print = 0;
                                                                                ^~~~~~~~
                                                                                tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132284:72: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_55__schedule_rpc_coro.tp_print = 0;
                                                                        ^~~~~~~~
                                                                        tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132290:65: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_56__handle_rpc.tp_print = 0;
                                                                 ^~~~~~~~
                                                                 tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132296:67: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_57__request_call.tp_print = 0;
                                                                   ^~~~~~~~
                                                                   tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132302:71: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_58__server_main_loop.tp_print = 0;
                                                                       ^~~~~~~~
                                                                       tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132308:59: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_59_start.tp_print = 0;
                                                           ^~~~~~~~
                                                           tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132314:74: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_60__start_shutting_down.tp_print = 0;
                                                                          ^~~~~~~~
                                                                          tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132320:62: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_61_shutdown.tp_print = 0;
                                                              ^~~~~~~~
                                                              tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132326:74: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_62_wait_for_termination.tp_print = 0;
                                                                          ^~~~~~~~
                                                                          tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'PyObject* __Pyx_decode_c_bytes(const char*, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char*, const char*, PyObject* (*)(const char*, Py_ssize_t, const char*))':
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:136866:45: warning: 'PyObject* PyUnicode_FromUnicode(const Py_UNICODE*, Py_ssize_t)' is deprecated [-Wdeprecated-declarations]
         return PyUnicode_FromUnicode(NULL, 0);
                                             ^
In file included from bazel-out/host/bin/external/local_config_python/_python3/_python3_include/unicodeobject.h:1026:0,
                 from bazel-out/host/bin/external/local_config_python/_python3/_python3_include/Python.h:97,
                 from bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:4:
bazel-out/host/bin/external/local_config_python/_python3/_python3_include/cpython/unicodeobject.h:551:42: note: declared here
 Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
                                          ^~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'void __pyx_f_7_cython_6cygrpc__unified_socket_write(int)':
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:72692:3: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   (void)(write(__pyx_v_fd, ((char *)"1"), 1));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: At global scope:
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:144607:1: warning: 'void __Pyx_PyAsyncGen_Fini()' defined but not used [-Wunused-function]
 __Pyx_PyAsyncGen_Fini(void)
 ^~~~~~~~~~~~~~~~~~~~~
Target //google/area120/tables/v1alpha1:area120-tables-v1alpha1-py failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2.890s, Critical Path: 2.49s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, 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.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/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 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/.cache/synthtool/python-area120-tables/synth.py", line 28, in <module>
    library = gapic.py_library(
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 45, in py_library
    return self._generate_code(service, version, "python", **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 182, 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 27, in run
    return subprocess.run(
  File "/usr/local/lib/python3.9/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/area120/tables/v1alpha1:area120-tables-v1alpha1-py']' returned non-zero exit status 1.
2020-12-05 00:11:37,251 autosynth [ERROR] > Synthesis failed
2020-12-05 00:11:37,251 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at a77e7c3 chore: fix intersphinx links (#10)
2020-12-05 00:11:37,256 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-12-05 00:11:37,260 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 65, in synthesize_loop
    has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
  File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 259, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/usr/local/lib/python3.9/subprocess.py", line 456, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
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 is still having trouble generating python-area120-tables. :sob:
Here's the output from running synth.py:
truct_54__handle_cancellation_from_core.tp_print = 0;
                                                                                ^~~~~~~~
                                                                                tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132284:72: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_55__schedule_rpc_coro.tp_print = 0;
                                                                        ^~~~~~~~
                                                                        tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132290:65: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_56__handle_rpc.tp_print = 0;
                                                                 ^~~~~~~~
                                                                 tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132296:67: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_57__request_call.tp_print = 0;
                                                                   ^~~~~~~~
                                                                   tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132302:71: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_58__server_main_loop.tp_print = 0;
                                                                       ^~~~~~~~
                                                                       tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132308:59: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_59_start.tp_print = 0;
                                                           ^~~~~~~~
                                                           tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132314:74: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_60__start_shutting_down.tp_print = 0;
                                                                          ^~~~~~~~
                                                                          tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132320:62: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_61_shutdown.tp_print = 0;
                                                              ^~~~~~~~
                                                              tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132326:74: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_62_wait_for_termination.tp_print = 0;
                                                                          ^~~~~~~~
                                                                          tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'PyObject* __Pyx_decode_c_bytes(const char*, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char*, const char*, PyObject* (*)(const char*, Py_ssize_t, const char*))':
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:136866:45: warning: 'PyObject* PyUnicode_FromUnicode(const Py_UNICODE*, Py_ssize_t)' is deprecated [-Wdeprecated-declarations]
         return PyUnicode_FromUnicode(NULL, 0);
                                             ^
In file included from bazel-out/host/bin/external/local_config_python/_python3/_python3_include/unicodeobject.h:1026:0,
                 from bazel-out/host/bin/external/local_config_python/_python3/_python3_include/Python.h:97,
                 from bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:4:
bazel-out/host/bin/external/local_config_python/_python3/_python3_include/cpython/unicodeobject.h:551:42: note: declared here
 Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
                                          ^~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'void __pyx_f_7_cython_6cygrpc__unified_socket_write(int)':
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:72692:3: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   (void)(write(__pyx_v_fd, ((char *)"1"), 1));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: At global scope:
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:144607:1: warning: 'void __Pyx_PyAsyncGen_Fini()' defined but not used [-Wunused-function]
 __Pyx_PyAsyncGen_Fini(void)
 ^~~~~~~~~~~~~~~~~~~~~
Target //google/area120/tables/v1alpha1:area120-tables-v1alpha1-py failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2.656s, Critical Path: 2.33s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, 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.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/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 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/.cache/synthtool/python-area120-tables/synth.py", line 28, in <module>
    library = gapic.py_library(
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 45, in py_library
    return self._generate_code(service, version, "python", **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 182, 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 27, in run
    return subprocess.run(
  File "/usr/local/lib/python3.9/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/area120/tables/v1alpha1:area120-tables-v1alpha1-py']' returned non-zero exit status 1.
2020-12-05 00:55:41,833 autosynth [ERROR] > Synthesis failed
2020-12-05 00:55:41,834 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at a77e7c3 chore: fix intersphinx links (#10)
2020-12-05 00:55:41,838 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-12-05 00:55:41,843 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 65, in synthesize_loop
    has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
  File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 259, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/usr/local/lib/python3.9/subprocess.py", line 456, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
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 is still having trouble generating python-area120-tables. :sob:
Here's the output from running synth.py:
truct_54__handle_cancellation_from_core.tp_print = 0;
                                                                                ^~~~~~~~
                                                                                tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132284:72: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_55__schedule_rpc_coro.tp_print = 0;
                                                                        ^~~~~~~~
                                                                        tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132290:65: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_56__handle_rpc.tp_print = 0;
                                                                 ^~~~~~~~
                                                                 tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132296:67: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_57__request_call.tp_print = 0;
                                                                   ^~~~~~~~
                                                                   tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132302:71: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_58__server_main_loop.tp_print = 0;
                                                                       ^~~~~~~~
                                                                       tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132308:59: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_59_start.tp_print = 0;
                                                           ^~~~~~~~
                                                           tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132314:74: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_60__start_shutting_down.tp_print = 0;
                                                                          ^~~~~~~~
                                                                          tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132320:62: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_61_shutdown.tp_print = 0;
                                                              ^~~~~~~~
                                                              tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132326:74: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_62_wait_for_termination.tp_print = 0;
                                                                          ^~~~~~~~
                                                                          tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'PyObject* __Pyx_decode_c_bytes(const char*, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char*, const char*, PyObject* (*)(const char*, Py_ssize_t, const char*))':
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:136866:45: warning: 'PyObject* PyUnicode_FromUnicode(const Py_UNICODE*, Py_ssize_t)' is deprecated [-Wdeprecated-declarations]
         return PyUnicode_FromUnicode(NULL, 0);
                                             ^
In file included from bazel-out/host/bin/external/local_config_python/_python3/_python3_include/unicodeobject.h:1026:0,
                 from bazel-out/host/bin/external/local_config_python/_python3/_python3_include/Python.h:97,
                 from bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:4:
bazel-out/host/bin/external/local_config_python/_python3/_python3_include/cpython/unicodeobject.h:551:42: note: declared here
 Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
                                          ^~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'void __pyx_f_7_cython_6cygrpc__unified_socket_write(int)':
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:72692:3: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   (void)(write(__pyx_v_fd, ((char *)"1"), 1));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: At global scope:
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:144607:1: warning: 'void __Pyx_PyAsyncGen_Fini()' defined but not used [-Wunused-function]
 __Pyx_PyAsyncGen_Fini(void)
 ^~~~~~~~~~~~~~~~~~~~~
Target //google/area120/tables/v1alpha1:area120-tables-v1alpha1-py failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.339s, Critical Path: 2.98s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, 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.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/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 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/.cache/synthtool/python-area120-tables/synth.py", line 28, in <module>
    library = gapic.py_library(
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 45, in py_library
    return self._generate_code(service, version, "python", **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 182, 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 27, in run
    return subprocess.run(
  File "/usr/local/lib/python3.9/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/area120/tables/v1alpha1:area120-tables-v1alpha1-py']' returned non-zero exit status 1.
2020-12-05 01:26:12,825 autosynth [ERROR] > Synthesis failed
2020-12-05 01:26:12,826 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at a77e7c3 chore: fix intersphinx links (#10)
2020-12-05 01:26:12,835 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-12-05 01:26:12,842 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 65, in synthesize_loop
    has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
  File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 259, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/usr/local/lib/python3.9/subprocess.py", line 456, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
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 is still having trouble generating python-area120-tables. :sob:
Here's the output from running synth.py:
ncellation_from_core.tp_print = 0;
                                                                                ^~~~~~~~
                                                                                tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132284:72: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_55__schedule_rpc_coro.tp_print = 0;
                                                                        ^~~~~~~~
                                                                        tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132290:65: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_56__handle_rpc.tp_print = 0;
                                                                 ^~~~~~~~
                                                                 tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132296:67: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_57__request_call.tp_print = 0;
                                                                   ^~~~~~~~
                                                                   tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132302:71: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_58__server_main_loop.tp_print = 0;
                                                                       ^~~~~~~~
                                                                       tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132308:59: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_59_start.tp_print = 0;
                                                           ^~~~~~~~
                                                           tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132314:74: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_60__start_shutting_down.tp_print = 0;
                                                                          ^~~~~~~~
                                                                          tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132320:62: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_61_shutdown.tp_print = 0;
                                                              ^~~~~~~~
                                                              tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132326:74: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
   __pyx_type_7_cython_6cygrpc___pyx_scope_struct_62_wait_for_termination.tp_print = 0;
                                                                          ^~~~~~~~
                                                                          tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'PyObject* __Pyx_decode_c_bytes(const char*, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char*, const char*, PyObject* (*)(const char*, Py_ssize_t, const char*))':
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:136866:45: warning: 'PyObject* PyUnicode_FromUnicode(const Py_UNICODE*, Py_ssize_t)' is deprecated [-Wdeprecated-declarations]
         return PyUnicode_FromUnicode(NULL, 0);
                                             ^
In file included from bazel-out/host/bin/external/local_config_python/_python3/_python3_include/unicodeobject.h:1026:0,
                 from bazel-out/host/bin/external/local_config_python/_python3/_python3_include/Python.h:97,
                 from bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:4:
bazel-out/host/bin/external/local_config_python/_python3/_python3_include/cpython/unicodeobject.h:551:42: note: declared here
 Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
                                          ^~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'void __pyx_f_7_cython_6cygrpc__unified_socket_write(int)':
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:72692:3: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   (void)(write(__pyx_v_fd, ((char *)"1"), 1));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: At global scope:
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:144607:1: warning: 'void __Pyx_PyAsyncGen_Fini()' defined but not used [-Wunused-function]
 __Pyx_PyAsyncGen_Fini(void)
 ^~~~~~~~~~~~~~~~~~~~~
Target //google/area120/tables/v1alpha1:area120-tables-v1alpha1-py failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.416s, Critical Path: 3.99s
INFO: 39 processes: 39 linux-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, 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.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.9/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 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/.cache/synthtool/python-area120-tables/synth.py", line 28, in <module>
    library = gapic.py_library(
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 45, in py_library
    return self._generate_code(service, version, "python", **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 182, 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 27, in run
    return subprocess.run(
  File "/usr/local/lib/python3.9/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/area120/tables/v1alpha1:area120-tables-v1alpha1-py']' returned non-zero exit status 1.
2020-12-05 03:02:52,232 autosynth [ERROR] > Synthesis failed
2020-12-05 03:02:52,233 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at a77e7c3 chore: fix intersphinx links (#10)
2020-12-05 03:02:52,237 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-12-05 03:02:52,242 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 65, in synthesize_loop
    has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
  File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 259, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/usr/local/lib/python3.9/subprocess.py", line 456, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
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:


text:
ninja compile error: undefinded reference to absl

‘cartographer::io::MigrateStreamFormatToVersion1(cartographer::io::ProtoStreamReaderInterface*, cartographer::io::ProtoStreamWriterInterface*, bool)’中：
serialization_format_migration.cc:(.text+0x427e)：
‘absl::container_internal::UnsampleSlow(absl::container_internal::HashtablezInfo*)’ :undefinded reference
libcartographer.a(serialization_format_migration.cc.o)：
‘absl::container_internal::raw_hash_set<absl::container_internal::FlatHashMapPolicy<int, std::vector<cartographer::mapping::proto::SerializedData, std::allocatorcartographer::mapping::proto::SerializedData > >, absl::hash_internal::Hash, std::equal_to, std::allocator<std::pair<int const, std::vector<cartographer::mapping::proto::SerializedData, std::allocatorcartographer::mapping::proto::SerializedData > > > >::~raw_hash_set()’:undefinded reference

at brance: master--99bc9e1
those error happen when Linking CXX executable cartographer_pbstream

I installed abseil-cpp publish at 2018-12-18 and put include at path /usr/local/absl/ before.
So this time, Cartographer use this include and library published at 2018-06-20. cause this problem.

repo: googlecartographer/cartographer


text:
Does not work with google_mobile_ads 0.13.0

First things first:  nice tutorial thanks! Gr8 work.
I noticed the lab does not work with latest version available due to the entry  ( I know the correct version is mentioned in the start 0.12)
listener: AdListener(
onAdLoaded: (_) {
setState(() {
_isAdLoaded = true;
});
},
AdListener is not there in 0.13.0 which is fine but then I would expect to find at least a mention in the 0.13.0 documentation here:
https://pub.dev/packages/google_mobile_ads/changelog
but I didn't find any mention to it.
I will try to make it work anyway with 0.13.0 and post the solution here if I manage to find it.
Best,
Codespair

Thanks for the report! I'm working on updating the documentation as well as the sample code. Will let you know once it's done.

Done updating the doc and sample code :)

authors: codespair kunny


text:
Users Auth

@Fleker Please can you make a tutorial about  authentication with auth0 or google sign in?
https://medium.com/google-developers/authenticating-smart-home-actions-for-the-google-assistant-with-auth0-b6fda3d2ee3d didnt worked for me. When i try to link account with phone it returns to same screen "manage accounts" (must go to auth0 login page)
edit: i see "account now linked" (1 second)  in https://asistant.google.com when i click test[account]

The Medium post you link to is the tutorial I made about authentication with Auth0. I got the integration to work, so I'm not sure what may be the specific issue.

its for firestore nor for realtime db

This is true, but it shouldn't be too difficult to update the user ID functions to use the realtime database instead. All the Auth0 setup should be the same.

i am trying to install https://github.com/actions-on-google/smart-home-nodejs so i can follow your Medium post to understand how its done.
I already updated user ID functions, but my main problem is:
When i try to link account with phone it returns to same screen "manage accounts" never saw auth0 login

The auth and token URLs would need to be updated to point to the Auth0 URLs. You may need to disconnect and reconnect for it to work as expected, as well as disabling/enabling testing.

Waaaaww i made only disconnect but unlinking the "TEST" solves the problem!
Thank you!

@Fleker auth0.com doesnt "really" work with google. Everything is fine with only "developer-test keys".
When i create a real clientID and secret from gcp and use it in auth0.com i never saw login screen. Only way is to disable and enable google login in auth0.com and login in 2-3 minutes. After 5 minutes later unlink and relink (tried with 3 different gmail accunts) i cant see login screen again and turns back to google home.
Please can you make a new blog or show me a simple auth system alternative?

I don't know why Auth0 wouldn't work in a production environment. Does Auth0 work fine if you do it directly outside of the Google Home app?

Closing this issue as unrelated to the codelab. For general development questions on Google smart home, feel free to post on our community forums:

Reddit: https://www.reddit.com/r/GoogleAssistantDev/
StackOverflow: https://stackoverflow.com/questions/tagged/google-smart-home

authors: Fleker devunwired kiralikbeyin

repo: googlecodelabs/smarthome-washer


text:
Make sure TSI tables are not present in fonts

When a font is hinted with VTT, it adds TSI0, TSI1, TSI2, TSI3 tables. when you compile the font in VTT, these tables are removed. We do not want to ship fonts which have these tables.

done

repo: googlefonts/fontbakery


text:
WIP: bin/fix-vf-meta.py: fix STAT and name tables for VF families

This script will update the STAT and name table for each font in a set of
fonts, which make up a variable font family.
The first commit supports the following scenarios:

A family composed of a single font
A family composed of two fonts, one Italic the other Roman

We still need to support the other examples listed in the STAT table specification:
https://docs.microsoft.com/en-us/typography/opentype/spec/stat
Please note, once fontmake is able to build STAT/name tables for families, this script
should be deprecated.
This PR remains a WIP while we discover all the edgecases. This script will be updated as
we convert more families on GoogleFonts to be variable fonts.
Fixes #56
Created due to https://github.com/googlei18n/fontmake/issues/436
Keep this open please

Keep this open please

Noted. Will merge on request :)

@m4rc1e when to merge? :)

Need to modify it further so it sets fsSelection, weightClass bits properly etc.
https://github.com/google/fonts/pull/1600#issuecomment-400467882

@m4rc1e ready to merge now?

@m4rc1e ready to merge?

Have merged, will file issue

repo: googlefonts/gftools


text:
Upgrade Open Match to latest version

We are currently running 1.6.0. Current latest is 1.7.0 we should at least be on that.
If 1.8.0 comes up between then and now, we should move to that.

We'll be releasing 1.8.0 at some point in the future, so may end up holding off on this work until that time.

1.8.0 is out!
https://github.com/googleforgames/open-match/releases/tag/v1.8.0

Just updated to 1.8.0. Closing!

repo: googleforgames/global-multiplayer-demo


text:
Changed getContext() to requireContext(), to ensure it is not null.

Changed getContext() to requireContext(), to ensure it is not null.

@seventhmoon lgtm thank you!

authors: samtstern seventhmoon

repo: googlesamples/easypermissions


text:
Polyfill for browser with Native API support but that return no VRDisplays

As we get closer to having the native WebVR API exposed in some browser there's a possibility that in some cases the native API won't provide any VRDisplays but the polyfill could still function reasonably. Currently in these scenarios having a "WebVR enabled browser" would actually appear to the user as a detriment, because the page would stop providing any WebVR capabilities where before it was able to use the Polyfill at least.
I propose that we refactor the polyfill so that rather than feature checking for the existence of the API and exiting early if it's available it instead patches the native getVRDisplays call with a wrapper that checks to see if the promise resolves with an empty array. If so, it supplies a polyfilled VRDisplay instead that functions the same as in the current builds when the native API isn't present at all.
This will probably be something of a short-term concern (hopefully on the order of months), but I feel the reduction in user confusion it would provide during the API's rollout is worthwhile. Any thoughts, objections?

Why would it be a "short-term" concern? The WebVR polyfill currently provides two useful benefits. One, it polyfills the WebVR API for browsers that lacks it; and two it provides a convenient virtual VRDisplay for both mobile devices and desktops that lack a VR headset. The first benefit will diminish as more browsers implement the WebVR API, but the second benefit will be indefinite as there will always be many users who lack VR hardware.
The polyfill is providing a great service by not requiring casual game developers to handle the situations in which no native VRDisplay is available and that benefit will still be relevant once the WebVR API is well supported.

This was one of the reasons why we stopped using the MouseKeyboardVRDisplay. I would totally support this.

For my purposes, it would be sufficient if the MouseKeyboardVRDisplay were made accessible outside the polyfill, so I could write code like this:
var vrDisplay = null;
navigator.getVRDisplays().then(
function(displays) {
if(displays.length > 0) {
vrDisplay = displays[0];
} else {
vrDisplay = new MouseKeyboardVRDisplay();
}
}
}
Before transitioning my game over to use the WebVR API, I had my own mouse handler but I stripped all that out once I saw that I could get orientation data from the VRDisplay. This was before I realized this what made this work on the desktop was the polyfill and that it wasn't part of the native API.
Even if in the future MouseKeyboardVRDisplay is removed from the polyfill, or in the future the polyfill becomes unnecessary, I'll probably end up keeping MouseKeyboardVRDisplay and using it in my game because it is very convenient to have a common interface regardless of the devices the user may have.

Chrome canary on android has webvr enabled by default (I think...), the presentation examples aren't able to work with cardboard anymore. Or you could change the samples on webvr.info/samples so that they can work on android chrome canary. But I think leaving the samples as-is and updating the polyfill so that it can work in with webvr enabled but no VRDisplays makes more sense, too.

Orientation in A-Frame on Firefox Android no longer works correctly since version 52 and it looks like this might be the reason why - the native APIs are present but return no displays.
When will this fix go live?

@kzahel: The samples should be working again, with slightly changed behavior. Click the "Polyfill" link for any sample will force that sample to use the polyfill, even if a native implementation is available. Clicking the normal link will (as previously) only make use of the native API.

@toji Given your comment about the samples, I assume a decision was made not to modify the polyfill to provide MouseKeyboardVRDisplay in the cases in which WebVR is present.
If this is correct, could you let me know what would be the proper way to instantiate a MouseKeyboardVRDisplay on my own using JavaScript code? I tried "new MouseKeyboardVRDisplay()" but it does not appear as if that class is present in the global namespace and I don't know how to access it.
Thank you,
-- Marcio

Was there any progress on this issue or a workaround? Some of my Android devices are now on Chrome 56 so the three.js, samples on the webvr.info and our own do not work on non Daydream devices unless polyfill is forced as no displays are detected.

It looks like @toji fixed this here 7908ac4002910deeafd967da9033af8234eb3af9 and here 1bf23ee1ce5f0a58b17bff8bdff92eddc0d40b2e but this issue remained open.
However, there appears to be another bug here. The polyfill is setting pose and timestamp properties on a VRFrameData object. This is fine if VRFrameData is polyfilled (i.e. no WebVR support at all), but if VRFrameData is a native object, then its properties are read-only and trying to set them throws an error.
I'm not sure what the best solution is here. I guess you could always polyfill VRFrameData?

I thought I was also running into this bug, until I realized the problem was that my code was checking to see if the display was an instanceof VRDisplay.  This was problematic with the polyfill on browsers which supported WebVR natively, because the polyfill still overwrites the native VRDisplay definition with a pure-JS one, but the navigator.getVRDisplays() promise still returns a native object.
Not 100% related to the original bug, but sort of the same issue as the VRFrameData object.  Maybe the overriding of the native classes just needs to happen under a more specific set of circumstances, to avoid this sort of breakage?

I spoke to soon, turns out my problem now is exactly this bug - on non-daydream Android devices running Chrome, the VRFrameData's pose data is always null, because as @brianchirls points out the native implementation's properties are read-only.
I'll do some experiments tonight with always polyfilling VRFrameData and see what breaks.

Turns out aways polyfilling VRFrameData doesn't work, because then calling vrdisplay.getFrameData(framedata) throws an error about framedata not being an instance of VRFrameData.  Argh.
As a work-around, I ended up exporting the polyfilled VRFrameData object as window.WebVRPolyfillFrameData, and then modified my app to do something like this:
var framedata = (vrdisplay.isPolyfilled ? new WebVRPolyfillFrameData() : new VRFrameData());

This workaround certainly isn't ideal and is kind of violating the spirit of what a polyfill is so I haven't submitted a pull request, but it works okay as a short-term fix if anyone else's site broke on non-daydream phones once the Android WebVR chrome builds started shipping.

@jbaicoianu I'm not sure if I can debug this myself, since my non-Daydream S6 phone doesn't reliably connect via USB. But maybe I can offer an idea that you can try?
I don't think conditionally polyfilling is going to work because applications may create a VRFrameData before you know whether the cardboard device is available. So I suggest creating a polyfilled VRFrameData that also points to a "real" VRFrameData object. Then, also polyfill getFrameData so that if it's using a native device, run native getFrameData on the native VRFrameData object and then copy it to the polyfilled VRFrameData.
You could probably skip this whole mess if you detect up front that you're not on a mobile device.

Closed via #197

authors: RikHeijdens autonome brianchirls jbaicoianu jsantell kzahel marciot toji yaustar

repo: googlevr/webvr-polyfill


text:
Feature/api

artist의 list를 가져오는 api 까지의 구현입니다.

artist의 detail을 가져오는 api까지의 구현입니다.

새로운 artist를 만드는 api 입니다.

artist 정보를 update하는 api입니다

artist 정보를 delete하는 api입니다

artist 정보를  탐색하는 api입니다

artist api들의 리팩토링 입니다.

제가 구체적으로 잘 몰라서 그러는 것일 수 있는데, WTForm 을 선택하신 디자인 결정에 의문이 있습니다. 장점은 각 field 에 대한 validation 을 moduralize 한다는 부분에서 코드가 깔끔해지는 것 같습니다. 하지만 현재 우리가 만드는 것은 REST API 이기 때문에 form이라는 input 에 의해서만 데이터가 전송되지 않을 수 있습니다. 이런 경우에도 WTForm 을 쓰는것이 API 개발에 standard한 방법일까요?

Readability 를 향상시키기 위해서 통상적으로 어느 function 이든 18줄 내로 쓰는 것이 좋습니다. artist_detail 같이 긴 function 들이 이 rule of thumb 을 위배하는 것들 중에 하나인데, 다양한 방법으로 현재의 긴 코드를 여러 가지 조각으로 나눌 수 있다고 생각됩니다. 이 부분을 refactoring 해주시면 좋을 것 같습니다.

웹앱처럼 편하게 Form을 컨트롤 할것을 찾았습니다. 그리고 처음 이부분에 대해 말씀해 주셨을 때에는 상관없지 않나 싶었습니다. 하지만 통상적인 REST API 구현이라는 것이 웹 어플리케이션을 만드는 것이 아니라는 것을 이제야 알았습니다. 그렇게 보면 분명 WTForm을 쓴다는 것이 standard하다고는 말할 수 없다는 생각이 듭니다. 앱 내에서는 설계된 url대로 작동은 하나 결과적으로는 폼으로 인해 폐쇄적인 API 형태라는 생각이 듭니다.

리팩토링 후 다시 올리겠습니다.

WTForm에 대해서는 어떻게 해야할지 아직 고민중입니다.

:rabbit2: :postal_horn: :cake:

authors: goohooh yeaz

license: mit


text:
[Help ] How to disable another plugin when in dashboard

I am usingindent-blankline.nvim. And disable it when in the dashboard like this.
require("indent_blankline").setup {     space_char_blankline = " ",     show_current_context = true,     context_patterns = {         "def", "class", "return", "function", "method", "^if", "^while",         "jsx_element", "^for"         -- ... and you can add more     },     buftype_exclude = {"terminal"},     filetype_exclude = {"dashboard"} }
Did I do anything wrong?

The filetype of an alpha buffer is alpha not dashboard. So changing your filetype_exclude to {"alpha"} should work.

Cool, it works. Thank a lot @l-kershaw

repo: goolord/alpha-nvim

license: MIT


text:
🛑 goormEDU is down

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

HTTP code: 403
Response time: 784 ms

Resolved: goormEDU is back up in 3581a68 after 11 minutes.

repo: goorm-dev/goorm-status


text:
🛑 goormEDU is down

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

HTTP code: 403
Response time: 716 ms

Resolved: goormEDU is back up in e91f13a after 9 minutes.


text:
Implement "gopass-jsonapi version"

Add CLI command to output release version.

Actually works with current main branch:
./gopass-jsonapi --version
gopass-jsonapi version 1.11.1

I think I tried it with an outdated binary from the gopass repo - all good here.

repo: gopasspw/gopass-jsonapi


text:
How to set the default directory to the "~",not the "/mnt/d/wsl-terminal" instead ?

i just want to enter the "~" when i run the wsl-terminal , who can show me how ? A lot of thanks if anyone could offer help.

Create a .lnk file to open-wsl.exe, and motify target to D:\wsl-terminal\open-wsl.exe -C ~ .

Thank you so much ,it rellay works. @goreliu

@goreliu this doesn't work for me, it always starts at the directory that's set in the "Start in" option of the .lnk file.

According to the readme, the -l argument to open-wsl.exe is what you are after:
"-l: ignores current path and starts terminal in your home directory (doesn't work with tmux)."
I have tried this and it works for me!

Sadly I'm tmux addict...

@paulo6 the -l did work for me thanks, even with the tmux setup I use (which is not related to wsl-terminal options).

authors: CuriousFu goreliu oblitum paulo6

repo: goreliu/wsl-terminal


text:
Intelligent addition of apostrophes

Please add a rule to auto-correct missing or erroneous apostrophes following the generally accepted rules of the English language.

Addressed with 7027dd68222ea3efa0359679842cda75a6c81863

authors: galaxnet gorzek

repo: gorzek/loomwords


text:
基于SingleFlight思想实现基于时间的线程安全优先级队列

解决 #106
// g1  - \
// g2  - - Enqueue() -- N --> channel（多个通道） -- 1 --> enqueueProxy 协程 --
// g3  - /                                                                   \
//                                                      两个代理协程之间通过互斥锁、通道协作，详见下方说明3
// g4  - \                                                                   /
// g5  - - Dequeue() -- N --> channel（多个通道）-- 1 --> dequeueProxy 协程 --
// g6  - /
//
// 说明：
//    1. g1、g2、g3并发调用Enqueue方法，Enqueue方法内部启动一个代理协程 enqueueProxy，
//       - enqueueProxy 职责
//         - 从调用者协程们接收数据
//         - 与下方 dequeueProxy 协程并发访问底层无锁优先级队列，将收到的数据入队
//         - 将入队结果返回给调用者协程们
//         - 如果有高优先级元素入队，导致队头变更，向 d.wakeupSignalForDequeueProxy 发信号通知下方 dequeueProxy 协程
//         - 监听退出信号，来自最后一个调用者协程发送的退出信号
//       - g1、g2、g3 通过channel与 enqueueProxy 协程通信
//         - 调用协程们通过 d.newElementsChan 向 enqueueProxy 发送数据
//         - 调用协程们通过 d.enqueueErrorChan 从 enqueueProxy 接收错误信息
//         - 第一/最后一个调用协程通过 d.quitSignalForEnqueueProxy 和 d.continueSignalFromEnqueueProxy
//           启动/关闭 enqueueProxy 协程，在非并发场景下，g1既是第一个又是最后一个需要负责启动和关闭 enqueueProxy
//           并发下，g1负责启动 enqueueProxy，g3 负责关闭 enqueueProxy
//
//    2. g3、g4、g5并发调用Dequeue方法，Dequeue方法内部启动一个代理协程 dequeueProxy，
//       - dequeueProxy 职责
//         - 获取队头，等待其过期；
// 		- 与上方 enqueueProxy 协程并发访问底层无锁优先级队列，将过期队头出队
//         - 将出队结果返回给调用者协程们
//         - 监听唤醒信号，来自 enqueueProxy 协程，重新检查队头
//         - 监听退出信号，来自最后一个调用者协程发送的退出信号
//       - g3、g4、g5 通过channel与 DequeueProxy 协程通信
//         - 调用者协程们从 d.expiredElements 获取过期元素
//         - dequeueProxy 协程通过 d.wakeupSignalForDequeueProxy 获取通知以重新检查队头
//         - 第一/最后一个调用协程通过 d.quitSignalForDequeueProxy 和 d.continueSignalFromDequeueProxy
//           启动/关闭 dequeueProxy 协程
//         - Dequeue的逻辑语义是"拿到队头，等待队头超时或自己超时返回; 拿不到队头，阻塞等待直到ctx过期"
//           故Dequeue不返回延迟队列为空的错误，而是让调用者阻塞等待ctx超时；
//           如果调用者未传递具有超时的ctx，导致永久阻塞是他自己的问题
//
//    3. enqueueProxy 与 dequeueProxy 协程之间通过互斥锁、通道来协作
//      - 用 d.mutex 并发操作底层优先级队列 d.q
//      - 用 d.wakeupSignalForDequeueProxy && d.wakeupSignalForEnqueueProxy 在队列状态变化时相互唤醒
//      - 无锁队列 d.q 上只有 enqueueProxy 与 dequeueProxy 两个协程并发访问

优点

借鉴SingleFlight思想，用enqueueProxy和dequeueProxy两个协程将原内部互斥锁上的并发量从M:N降为1:1,减少不必要的锁竞争.
借助select + channel，将Enqueue及Dequeue上大量并发调用者协程的阻塞与唤醒工作委托给Go运行时处理

大量Enqueue高优先级元素导致队头频繁改变时，只需要enqueueProxy通知dequeueProxy协程重新获取队头即可，不要频繁唤醒所有阻塞在Dequeue上的并发调用者协程

借助select + ctx.Done，使Enqueue和Dequeue中ctx超时控制更加精准

不会出现在互斥锁上排队过程中超时无法中断，也不用陷入两难：好不容易拿到锁，不入队/出队吧白排队了，入队/出队操作吧又严重超时. 用户体验差——设置超时你不准,不设置超时你永久阻塞.

不足

入队元素要实现的接口设计及命名问题,当前实现要求用户实现Deadline方法返回一个time.Time的截止日期——time.Now().Add(expire)
时间间隔较大的多个Enqueue/Dequeue调用被视为串行/单次调用，这时enqueueProxy和dequeueProxy协程无法被复用，当这样调用较多时会有创建/销毁代理协程的开销。
可以考虑添加两个方法来显示创建/销毁enqueueProxy和dequeueProxy协程

   // 启动/销毁代理协程
   delayQueue.Star()
   defer delayQueue.Stop()

   delayQueue.Enqueue(ctx, xx)
  // 任意时间间隔
   delayQueue.Dequeue

@flyhigher139 你可以看看我们两种实现，看看的你的感受，或者也顺便做个benchmark 测试。

API 设计问题

现在的Delayable接口中有一个Deadline() time.Time方法,接口的命名、方法的命名及返回值是否要修改?
New方法现在接收capacity和comparator两个参数,而comparator的实现是依赖Delayable接口的方法,加上延迟队列的逻辑语义(截止日期近的,小的先出队),我准备把New方法改为只接收一个capacity参数,在New方法内部提供comparator的默认实现——截止日期小的、近的元素先出队,不再让用户传入.

代理协程生命周期管理问题
以Enqueue为例(Dequeue是类似的), 它承担着开启/关闭代理协程enqueueProxy职责.代码如下:

func (d *DelayQueue[T]) Enqueue(ctx context.Context, t T) error {
         // ....
	d.startEnqueueProxy()
	defer d.closeEnqueueProxy()
        // ....
}
func (d *DelayQueue[T]) startEnqueueProxy() {
	d.enqueueMutex.Lock()
	defer d.enqueueMutex.Unlock()

	d.enqueueCallers++
         // 这里不但承担着“开启代理协程”的职责
         // 还承担着检测代理协程是否退出(因panic而退出),如果是就重启的职责.
         // 使用显示的Start方法只能移除“开启代理协程“的职责
         // 移除”检测并重启代理协程“的职责,就需要确保代理协程绝不会因panic或其他异常退出.
	if atomic.LoadInt64(&d.numOfEnqueueProxyGo) == 0 {
		go d.enqueueProxy()
		<-d.continueSignalFromEnqueueProxy
	}
}
func (d *DelayQueue[T]) closeEnqueueProxy() {
	d.enqueueMutex.Lock()
	defer d.enqueueMutex.Unlock()

	d.enqueueCallers--
        // 关闭代理协程的逻辑比较容易移到Stop/Close方法中,
        // 可以用close(closeSignalChan) + wg.Wait()的方式,或者 closeCtxCancelFunc() + wg.Wait()来实现
	if d.enqueueCallers == 0 && atomic.LoadInt64(&d.numOfEnqueueProxyGo) == 1 {
		d.quitSignalForEnqueueProxy <- struct{}{}
		<-d.continueSignalFromEnqueueProxy
	}
}

enqueueProxy 协程中也包含与Enqueue同步、处理enqueueProxy内部panic等非核心逻辑代码.
func (d *DelayQueue[T]) enqueueProxy() {

	defer func() {
	        // 如果有panic的话,吞掉panic
		_ = recover()
		// 重置状态——enqueueProxy已退出
		atomic.CompareAndSwapInt64(&d.numOfEnqueueProxyGo, 1, 0)
                // 与Enqueue同步,退出
		d.continueSignalFromEnqueueProxy <- struct{}{}
                // 上面两行代码可以使用
                // d.stopWaitGroup.Done()来替代
	}()

	// 设置状态——enqueueProxy已启动
	atomic.CompareAndSwapInt64(&d.numOfEnqueueProxyGo, 0, 1)
        //  与Enqueue同步,开始执行
	d.continueSignalFromEnqueueProxy <- struct{}{}
       // 上面两行代码可以使用
       //  d.startWaitGroup.Done()来替代.
       // .....
}

那么Start和Stop方法可以这样实现
func (d *DelayQueue[T]) Start() {
	d.stopWaitGroup.Add(2)
	d.startWaitGroup.Add(2)
	go d.enqueueProxy()
	go d.dequeueProxy()
	d.startWaitGroup.Wait()
}

func (d *DelayQueue[T]) Stop() {
         d.stopCtxCancelFunc() // close(d.stopSignalChan)
	d.stopWaitGroup.Wait()
}

最后,代理协程异常退出用户是无感知的,异常退出会导致Enqueue/Dequeue上的并发协程要么ctx超时退出,要么永久阻塞(如果没设置超时).
解决方法,要么通过review确保enqueueProxy/dequeueProxy没有代码会panic,要么使用上面的“检测/重启代理协程”的方式.

@flycash @flyhigher139

如果图小看不清,可以右击在新标签页中打开图片链接.
程序实体介绍

最上方逻辑并发优先级队列(以下简称,逻辑队列)是一个抽象的程序实体(代码中不存在),它由d.q、d.qCache及d.mutex这三个具体实体构成.

d.q 是非并发安全的优先级队列,用于存储未过期的用户数据
d.qCache是非并发安全的优先级队列,用于存储已过期的用户数据
d.mutex 并发控制对二者的访问,从而形成逻辑队列抽象实体.

enqueueProxy协程是逻辑队列Enqueue端的代理协程,即如果想要向逻辑队列Enqueue数据,必须通过enqueueProxy协程,该协程暴露了两个“接口”用于与其通信, 其中:

enqueueElemsChan通道用于客户端协程向enqueueProxy协程传递要插入逻辑队列的数据
enqueueErrorChan通道用于接收插入逻辑队列的结果.
enqueueProxy协程只访问逻辑队列中d.q部分

dequeueProxy协程是逻辑队列Dequeue端的代理协程,即如果想要从逻辑队列Dequeue数据,必须通过dequeueProxy协程,该协程同样暴露了两个“接口”,

dequeueElemsChan通道用于获取数据
dequeueErrorChan通道用于获取错误
dequeueProxy协程只访问逻辑队列中d.qCache部分

workerProxy协程,是逻辑队列的内部工作协程,负责将逻辑队列内部d.q中的未过期数据,等待其过期后,再搬运到逻辑队列内部d.qCache中,在搬运结束后,选择恰当时机向dequeueProxy协程发送唤醒信号.

Enqueue流程

并发调用G1、G2、G3, 通过“客户端”(Enqueue方法)中的enqueueElemsChan通道,向enqueueProxy协程发送数据,期望数据进入逻辑队列
enqueueProxy协程收到数据后,操纵逻辑队列内部d.q将数据入队,并通过enqueueErrorChan通道将返回结果返回给“客户端”协程.
如果新入队的元素,改变队首,enqueueProxy协程通过wakeupWorkerProxy通道向workerProxy协程发送通知信号.

Dequeue流程

并发调用G4、G5、G6(图上画错了), 通过“客户端”(Dequeue方法)中的dequeueElemsChan通道等待来自逻辑队列中的过期数据
dequeueProxy协程自启动后,就不断尝试从逻辑队列的d.qCache中获取过期数据,然后通过dequeueElemsChan通道发往调用者协程.

其他说明

expireElement之前承担着“缓存过期数据”与“与调用者协程们通信”两项职责.现在签一个职责由d.qCache承担,故将其改名为dequeueElemsChan并且取消了缓冲区,只承担“与调用者协程们通信”的职责.
实现了无界队列,取消了capacity不能等于零的限制.
waitGroup在测试中很有用,用于提供可靠的时间点插入断言,判断延队列的运行情况.

嗯，我确实理解了你的设计和调度，所以我依旧认为过于复杂。相比之下，我在 #115 中的实现就要清晰很多。从性能上来说，#115 核心在于会频繁创建一个 singnal 的channel，但是相比可读性带来的提升，我觉得是可以接受的。所以这个我关闭了，除非说我 #115 中的实现有无法解决的并发问题。
感谢

好的

repo: gotomicro/ekit


text:
🛑 Mobile Application APIs is down

In e706f17, Mobile Application APIs (https://ritamdigital.org/services/ritam/api/posts/top-headlines/tag/top-stories/editor) was down:

HTTP code: 502
Response time: 1110 ms

Resolved: Mobile Application APIs is back up in a1aca95 after 6 minutes.

repo: govindbhardwaj/monitor-ritam


text:
Add support for width overrides

GDS in govuk-frontend provides the ability to set explicit widths on elements.  Their example should form input elements of specific widths, and the use of width override classes is advices on the table component documentation to set table column widths.
We do not currently provide a mechanism to support width overrides.
It's suggested that width overrides could be supported in a similar manner to the withWhiteSpace styling function.

Support added in #563

We now have support for this on GridCol and Table.Cell components.
Consideration should be given as to which other elements we wish to provide the ability to override their width, and a list added to this ticket.

Input type components should offer control over width.
This should be done as part of a rethink of how input controls are handled.

Related
https://github.com/govuk-react/govuk-react/issues/419
https://github.com/govuk-react/govuk-react/issues/164
https://github.com/govuk-react/govuk-react/issues/249

@stevesims are form inputs the only thing left here?

authors: penx stevesims

repo: govuk-react/govuk-react


text:
accessibility: set StyledErrorText tabindex to 0

A tab index greater than 0 violates the axe-core 4.4 tabindex rule.
See https://dequeuniversity.com/rules/axe/4.4/tabindex?application=AxeChrome
Looks like this was previously flagged in issue  https://github.com/govuk-react/govuk-react/issues/642 but never resolved.
Checklist:

[x] Documentation
[x] Tests
[x] Ready to be merged

Hey @penx, is this ok to be merged?

it is, thanks for contributing!


text:
Fix #5

hi! this pr is trying to fix two problems:

ttyInterface.init() will set its .last_update.num_choices = .choices.numChoices, that prevents TUI be drew at the first time when fzy be run via fzy -f file
stdin could be a file when user runs fzy using fzy < file

(addressing #5)

do you think i should add some tests? actually i dont know how to do it, both cases run in interactive mode.

No, tests are not necessary.
Also, just to set expectations, I do not plan on maintaining this or developing it much further. The point was always simple experimentation and to have a sort of “playground” to try some things. I’m actually considering closing the issue tracker or taking it off GitHub to discourage people from reporting bugs.
If you want to develop this further into an actual tool, I suggest making a fork and doing your development there.

oh i understand, thank you.


text:
Custom threshold for positive/negative data display

Introduces feature requested in #43
The threshold can be set by changing chartSeries.colors.zeroLevel value.
Looks like this:

with one of sample chart series and
series.colors.zeroLevel = -1.5

Wow thanks a lot @algrid!

This looks fantastic..thanks @algrid and @gpbl

Cannot use it now with swift 3 ?!!

@fadylateef Did you update to the latest version? The colors property has now 'open' access level.

authors: 9SL9 algrid fadylateef gpbl

repo: gpbl/SwiftChart


text:
Gestion des membres individuels

Ils apparaissent aujourd'hui dans le tableau des clubs et dans le résumé en haut.
Il faut choisir (notamment en fonction des feuilles qui ont déjà été saisies).

Choix fait : on n'affiche plus les membres individuels en tant que club.

repo: gpoussel/cyclopaca


text:
All contributors test

Testing all contributors
Ref: all-contributors/app#336 / https://github.com/hertzg/node-net-keepalive/issues/152

@all-contributors please add @hertzg for review

@all-contributors please add @hertzg for review

@all-contributors please add @hertzg for review

@all-contributors please add @hertzg for review


text:
Add missing CORE_MODULES.

Updated missing modules based on those in nodejs's lib:
https://github.com/nodejs/node/tree/master/lib
The missing modules seem to be causing issues with loading their associated polyfills via js.commonjs-core-modules-replacements.
For reference these are the modules I've added:
console
constants
diagnostics_channel
inspector
process
sys
timers
wasi

I've signed but it does not appear I've been added to the signatories list yet.

Hi @jameshilliard
Thanks for your contribution and opening this PR.

OCA

I see you are listed on https://www.oracle.com/technical-resources/oracle-contributor-agreement.html so I can add you to our internal whitelist.
@eleinadani can you have a look at the actual contribution please.
Thanks,
Christian

authors: jameshilliard wirthi

repo: graalvm/graaljs


text:
🚀 [Feature] backend adaption of change password-process

🚀 Feature

Base on the concept
https://github.com/gradido/gradido/blob/master/docu/Concepts/TechnicalRequirements/UC_Introduction_of_Gradido-ID.md#change-password-process
the backend has to be adapted for these requirements.

password-process still changed on gradido-id long time ago.
so ticket will be closed

repo: gradido/gradido


text:
Config generator and validator

Enough of the CLI mess. This is even more crucial when we have profiles.

Fixed by b92a2a936604f7fcfed0ff04f8d3c2939f171f8a

repo: gradinkov/rudehash


text:
Update some of the samples to include a Swift PM build definition

Some of the samples demonstrate how Gradle can be configured to build components that use a typical Swift PM build layout. It would be useful for comparison, and to help as documentation, to also include a Swift PM build definition with these samples.

This is done enough for now. There are 2 samples that can be built using Swift PM, one for Swift and one for C++.

repo: gradle/gradle-native


text:
Support SUBST or disable its use with file watching

SUBST is not currently supported and we fail the SubstIntegrationTest on Windows.
We should either add support for it or fail/degrade in a meaningful way.

cc: @gradle/build-cache

Seems like we fail on subst drives, since we try to watch the parent of the drive - which is null.

Subst drives work if you run the build from the subst drive.

authors: lptr wolfs

repo: gradle/gradle


text:
java14 helpful NPEs not working in test

Expected Behavior
I configure the test task to add the new jvm flag (java14) that enables helpful NPE messages
build.gradle.kts
tasks.withType<Test> {
    jvmArgs("-XX:+ShowCodeDetailsInExceptionMessages") // Helpful NPEs not working :(
    testLogging {
        setExceptionFormat("full") // Prints exception messages
    }
}

With a test like that
    @Test
    public void true_npe() {
        Object o = null;
        o.toString();
    }

I expect NPEs to have messages with details, something like this
TestNPE > true_npe FAILED
    java.lang.NullPointerException: Cannot invoke "Object.toString()" because "o" is null
        at TestNPE.true_npe(TestNPE.java:8)

Current Behavior
It prints no message
TestNPE > true_npe FAILED
    java.lang.NullPointerException
        at TestNPE.true_npe(TestNPE.java:8)

Context
For now, I guess only a few people uses this flag but as mentioned in the JEP https://openjdk.java.net/jeps/358, it will become the default behavior in a future version.
I posted it on stackoverflow https://stackoverflow.com/questions/61664979/how-to-enable-helpful-nullpointerexceptions-in-gradle-test/61737264#61737264 but I'm putting the same infos here
Steps to Reproduce
I created a simple project to reproduce it. https://github.com/apflieger/gradle-helpful-npe
Just ./gradlew test
Make sure to have java14.
Environment
java -version
openjdk version "14.0.1" 2020-04-14
OpenJDK Runtime Environment (build 14.0.1+7)
OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

I retrieved the classpath gradle uses by running test with debug logs. With that, I could run JUnit directly. With -XX:+ShowCodeDetailsInExceptionMessages and the helpful NPE message shows up:
java -cp '/Users/apflieger/src/gradle-helpfull-npe/build/classes/java/test:/Users/apflieger/.gradle/caches/modules-2/files-2.1/junit/junit/4.13/e49ccba652b735c93bd6e6f59760d8254cf597dd/junit-4.13.jar:/Users/apflieger/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar' -XX:+ShowCodeDetailsInExceptionMessages org.junit.runner.JUnitCore TestNPE
JUnit version 4.13
.E.E
Time: 0.006
There were 2 failures:
1) throw_npe(TestNPE)
java.lang.NullPointerException: My own message
    at TestNPE.throw_npe(TestNPE.java:13)
2) true_npe(TestNPE)
java.lang.NullPointerException: Cannot invoke "Object.toString()" because "o" is null
    at TestNPE.true_npe(TestNPE.java:8)

FAILURES!!!
Tests run: 2,  Failures: 2

So it doesn't come from JUnit

I believe this is linked to the exception serialization between the Gradle worker and the daemon.
So it relates to #12302, #12764, #9487 and the internal ExceptionPlaceholder type.

I just tested your reproducer with Gradle 6.4 and it worked: https://scans.gradle.com/s/fa5chfjb2dvhs/console-log?anchor=33

Nah, it didn't. That's a System.out.println that appears in the log, not the exception message

Oh right my bad I misread the results.

@ljacomet it's not a PlaceholderException problem: what we see is a NullPointerException, and what we deserialize is a NullPointerException. Somehow it looks like the additional information that the NPE carries is lost during (de)serialization. At this stage I wonder if it's a bug in the JVM itself, or if there's something we need to implement to make this happen.

The additional information is not serialized, if you look at the sources:
`    public String getMessage() {
String message = super.getMessage();
if (message == null) {
return getExtendedNPEMessage();
}
return message;
}
/**
 * Get an extended exception message. This returns a string describing
 * the location and cause of the exception. It returns null for
 * exceptions where this is not applicable.
 */
private native String getExtendedNPEMessage();`

Thanks I didn't have the sources under my eyes but debugging led me to the same conclusion: it seems the information used to get this information is in the backtrace which is transient. I guess we'll have to do something special for NPEs to support this use case.

This is my workaround if it can help (is a junit 5 extension, but something similar can work out in gradle)
public class HelpfulNullPointerExceptionExtension implements TestExecutionExceptionHandler {
    @Override
    public void handleTestExecutionException(ExtensionContext context, Throwable throwable) throws Throwable {
        Throwable actual = throwable;
        do {
            if (actual instanceof NullPointerException) {
                var field = Throwable.class.getDeclaredField("detailMessage");
                field.setAccessible(true);
                field.set(actual, actual.getMessage());
            }
            if (actual == actual.getCause()) {
                break;
            }
            actual = actual.getCause();
        } while (actual != null);
        throw throwable;
    }
}

I took a similar approach in a PR, but as I expected, it's issuing warnings because of illegal reflection access on JDK classes...

I see, since you are using an ExceptionPlaceholder for each cause then just replacing the NPE with another one with the message should be enough, shouldn't it?
    if(isJava14() && throwable instanceof NullPointerException) {
        NullPointerException extendedMessage = new NullPointerException(throwable.getMessage());
        extendedMessage.setStackTrace(throwable.getStackTrace());
        throwable = extendedMessage;
    }

(I don't know how to test it in gradle, sorry)

I actually didn't think about that simple solution, much easier than the one I'm trying, playing around with the serializer :D

authors: apflieger cocorossello ljacomet melix