text:
Implementing support for device/executable multi-targeting (1/N)

This begins the move to the HAL transformation pipeline using info
in the IR instead of in flags. More plumbing is required and all existing
flags still work (-iree-hal-target-backends, etc).
The major change here is that now #hal.device.target attributes are
attached to modules (or funcs) to denote which devices are being targeted.
Each of the target device attributes specifies the target backend and
backend-specific options for how to translate executables in the form
of #hal.executable.target attributes. The IR then has the required
information for runtime specialization and executable multi-targeting to
replace the global options used previously (when all this is done).
Future work will focus on moving the global flags for each backend into
the attributes, splitting the device backend from the executable backend,
and improving the code paths used for runtime selection.
Multiple simultaneous target devices are not supported but the
groundwork is going in. Much more work on environment specification will
be required and that is better done together with designing the flow-level
interactions.

This is still very much a WIP but should be safe to land and cleans up a few major things that were discovered during the process (hal.device.switch changes, removing many of the uses of the global HAL flags, adds proper runtime executable format support queries, etc). Future changes will move things around/change the attrs/etc - feedback welcome if you have it!

repo: google/iree


text:
Closes: #1

Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

Removing

source: gharchive/pull-request

repo: google/it-cert-automation-practice

license_type: permissive

license_source: github-api


text:
Updated validations.py python script.

Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[x] Tests pass
[x] Appropriate changes to README are included in PR

@googlebot I signed it!


text:
J2OBJC_DISABLE_CAST_CHECKS maybe not working

Hello Guys,
Does anyone have this problem too?
When I define the parameter J2OBJC_DISABLE_CAST_CHECKS the function cast_check is not supposed to be disabled?

you should set J2OBJC_DISABLE_CAST_CHECKS in your xcode build settings or your pch, before the j2objc headers are imported.

Yes, J2OBJC_DISABLE_CAST_CHECKS is a build setting, not something done per-file. Thanks, Florent for pointing out the issue.

source: gharchive/issue

authors: dfsilva flovilmart tomball

license_source: bigquery


text:
Autodiff Cookbook Docs Out of Sync

In second-to last part of the section Jacobians and Hessians using jacfwd and jacrev, the readthedocs markdown is not rendering correctly, namely there is a list that is being rendered inline like:
"This shape makes sense: if we start with a function f:Rn→Rm, then at a point x∈Rn we expect to get the shapes * f(x)∈Rm, the value of f at x, * ∂f(x)∈Rm×n, the Jacobian matrix at x, * ∂2f(x)∈Rm×n×n, the Hessian at x,
and so on."
In the checked in ipython notebook, this same section is rendered correctly as:
"
This shape makes sense: if we start with a function $f : \mathbb{R}^n \to \mathbb{R}^m$, then at a point $x \in \mathbb{R}^n$ we expect to get the shapes
$f(x) \in \mathbb{R}^m$, the value of $f$ at $x$,
$\partial f(x) \in \mathbb{R}^{m \times n}$, the Jacobian matrix at $x$,
$\partial^2 f(x) \in \mathbb{R}^{m \times n \times n}$, the Hessian at $x$,
and so on.
"
I don't know if readthedocs uses a different markdown parser than ipython or if this is just a case of out of date docs, but figured it would be useful to flag.

It was a missing blank line.  Should be fixed.

Thanks for taking a look!

authors: cleichner gnecula

repo: google/jax


text:
aggressive JIT recompilation with equal-but-not-identical args

I'm having an issue with a JIT-compiled function being recompiled at every run. This seems to happen whenever an argument set as static is not identical to its previous value (in the sense of is or id(arg)), rather than when it is not equal to its previous value (in the sense of ==).
Is this an expected behavior / a limitation of the compilation model?

As a simple example, consider:
@jax.partial(jax.jit, static_argnums=(0,))
def dummy_add_fn(dummy, x):
    return x + 1

If we run + profile this, we find that whenever the identity of dummy changes, the function recompiles.
dummy_arg = [0]
real_arg = jnp.zeros((3,))
with jax.profiler.TraceContext("Run 1"):
    dummy_add_fn(dummy_arg, real_arg)  # <- JIT compilation
with jax.profiler.TraceContext("Run 2"):
    dummy_add_fn(dummy_arg, real_arg)  # <- no compilation

dummy_arg = [0]
with jax.profiler.TraceContext("Run 3"):
    dummy_add_fn(dummy_arg, real_arg)  # <- compiles again

This happens even though [0] == [0].

This is expected behavior, but we intend to revise it. It's not a limitation, just a choice we made early on that was a bad one.
The idea is that unhashable objects (like lists) are silently treated via object identity semantics. See #2813 and the recent discussion on #4572.
We think this is a major foot-gun and so we're working to revise it into an error instead, but it required updating a bunch of Google-internal users who were relying on the previous behavior. #3712 made JAX's own internals not rely on the old/current work-by-object-identity-on-unhashable-arguments behavior. I think within a month JAX won't have this behavior anymore. Hopefully sooner.
For now, the solution is just not to use a list here: use a tuple instead. In general, any class with __eq__ and __hash__ defined (i.e. any hashable class) will work the way you expect based on the equality semantics those two methods define, whereas any unhashable class will silently work by object identity semantics (until we revise it to raise an error).
Hope that makes sense!

I see, that makes sense! Appreciate the quick reply!
In my actual code I was running into this with a Flax struct.dataclass, not a list — it sounds like even with the current behavior this could have been worked around on their end.

authors: mattjj willwhitney


text:
Use lax.scan inside jnp.polyval

Fixes https://github.com/google/jax/issues/3047
Scan solves the slow compilation problem.
I've also removed any attempt at support for numpy.poly1d objects. I doubt @mattjj ever really intended to support them in 9c49a9bfe690738d502a48e33d2f421c4694e6ab and the example from the np.polyval docstring already crashes on master:
TypeError: Argument '   2
3 x + 1' of type <class 'numpy.poly1d'> is not a valid JAX type

I added partial unrolling, though this really seems like something that should be pushed into lax.scan or lax.while_loop.

It's probably worth digging into why XLA's static trip count detection logic didn't fire here.

It's probably worth digging into why XLA's static trip count detection logic didn't fire here.

My guess was it did fire, but it doesn't lead to unrolling (in the sense that there are still separate kernels dispatched for each iteration of the loop body, though only a fixed number of such kernels are dispatched and we don't have to pull a value back to the host to decide when to terminate the loop). Is that different from your understanding?

Is this blocked on anything? I just want to make sure we haven't dropped the ball.

I think my loop unrolling has a bug which isn't triggered by any of the unit tests currently. That needs to be fixed before submitting.
Could also be nice to try to use @froystig's https://github.com/google/jax/pull/3159 here.

Scan now supports unrolling natively. Any chance you could revive this, @shoyer? A user just pinged the issue.

So I actually think the current version of this PR (which uses scan's builtin unrolling) is basically ready to merge. The only remaining question is how to pick the unroll parameter.
I did some quick tests to benchmark compile time and runtime CPU/GPU/TPU as a function of the unroll parameter, for all powers of two between 1 and 128: https://gist.github.com/shoyer/4e0328c277e46f58c47d79b85a51aa0a
It's a hard to find a clear winner:

For CPU, unroll=8 or unroll=16 seems optimal. Higher values of unroll are weirdly 4-10x slower.
For GPU, maybe unroll=128 or even higher, if slow compilation is not problematic.
For TPU, maybe unroll=64?

unroll=16 seems pretty safe across the board, though maybe we should also make this a custom JAX-specific parameter that users can adjust?

unroll=16 seems pretty safe across the board, though maybe we should also make this a custom JAX-specific parameter that users can adjust?

OK, I just pushed a revision that does exactly this. PTAL

Seems reasonable to me!

@jekbradbury want to do a final review here?

authors: hawkinsp jekbradbury mattjj shoyer


text:
Docker Snyk messages break kCTF parsing

test/kctf_test/testchal
▶ kCTF[ctf=kctf_test,config=local-cluster,chal=testchal] > make -C challenge
make: Entering directory '/home/arx/ctf/test/kctf_test/testchal/challenge'
cc     chal.c   -o chal
make: Leaving directory '/home/arx/ctf/test/kctf_test/testchal/challenge'

test/kctf_test/testchal
▶ kCTF[ctf=kctf_test,config=local-cluster,chal=testchal] > kctf chal start
[*] building image in "/home/arx/ctf/test/kctf_test/testchal/challenge"
[*] Image ID "5bd50bd642bd38fd43fa265c0cb5259daae60de68c78aa3211a7fcf04fc12157

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them"
[*] building image in "/home/arx/ctf/test/kctf_test/testchal/healthcheck"
[*] Image ID "23cf15ad4349a24d755b7cf17750578f4a487acfcc70969194394c8e3ed22381

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them"
Error parsing reference: "5bd50bd642bd38fd43fa265c0cb5259daae60de68c78aa3211a7fcf04fc12157\n\nUse 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them" is not a valid repository/tag: invalid reference format: repository name must be lowercase

newer versions of docker spit out a Snyk message at the end of docker build -q {container}. kCTF is currently parsing it as part of the container ID.
this can be fixed on the user's end by setting the environment variable DOCKER_SCAN_SUGGEST=false, but kCTF may want to fix the parsing so that it works by default.

Looks like this was fixed upstream, so newer versions should stop doing this:
https://github.com/docker/compose-cli/issues/1517

ah, my bad. thanks!

authors: arxenix sroettger

repo: google/kctf


text:
Java indexer: handle class member imports properly [phab:D2241]

Created by schroederc at 2018-04-04 17:30:13:
This consolidates the logic for JCImports and JCFieldAccesses to both simplify the logic and fix an issue where the enclosing class for member imports was being handled as a package.

shahms accepted this revision at 2018-04-04 17:32:51

schroederc closed via commit ae0b21501ff9335e0bc4219aff5a58fd3b11d072 at 2018-04-04 17:35:19

repo: google/kythe


text:
Add documentation for using querySelector / $ after initialization

Let's say you use the data component. Since mdl.js will add dynamic components on the go, you can't register and event handlers to a checkbox of a data tables without a delay.$
What's the right way of doing this?

MDL emits a mdl-componentupgraded event on the DOM element that has been upgraded. You can add a listener and wait for that :)

authors: azumbrunnen surma

repo: google/material-design-lite


text:
TPUv2-8 multislice

I'm trying to create 2 preemptive TPUv2-8 but got:
gcloud alpha compute tpus queued-resources create mega --accelerator-type v2-8 --runtime-version tpu-ubuntu2204-base --node-count 2 --node-prefix slice
ERROR: (gcloud.alpha.compute.tpus.queued-resources.create) INVALID_ARGUMENT: Cloud TPU was unable to complete the operation. Please try again, or contact support if the problem persists. [EID: 0x98e5db490ee44df9]

We do not support Multislice on v2. Only v4+ is supported.

Closing this out.

authors: rwitten shaurya89 yihui-he

repo: google/maxtext


text:
visibility and presence always be 0.

visibility and presence fields in a NormalizedLandmark for the Holistic Solution always be 0. Is this  unsupported right now?

Hi @endink, Could you please elaborate your query with complete details. Thank you!

Sorry, visibility and presence the fields is in MediapipeUnityPlugin project.
Simply, if the the score or visibility of the hand landmark in this Holistic scene available now ? ( like the pose landmarks).
BTW, please forgive me for my English grammar errors.

@endink - We opened the same issue but never got a reply on the reason why it never detects anything other than 0, nor that it was a defect

@jimb2834 we can only wait for a reply...

@kuaashish is there any update on this issue? This issue is affecting other validations such visibility and presence of various points of interest as it is always 0 hence wrong results. One example is palm validation, checks for palm validation and visibility on an image with only points 8,12,16,20,7,11,15,19, mediapipe is returning other points not available on the image hence wrong results

@elYeodeol - there are old issues related to Visibility and Presence of landmarks re: face mesh specifically from a while back -
https://github.com/google/mediapipe/issues/3200
https://github.com/google/mediapipe/issues/3159
But anytime someone solves it, ping me and we are happy to pay for the solution.

@elYeodeol - there are old issues related to Visibility and Presence of landmarks re: face mesh specifically from a while back - #3200 #3159
But anytime someone solves it, ping me and we are happy to pay for the solution.

Hi jimb2834, have you looked at Google mlkit library for face landmarks? https://developers.google.com/ml-kit my experience has been impressive.

@ajmakoni - Hi, thanks for the message. The main issue was landmark quantity; whether it reflects "visibility" or "presence" I did not check. So the landmark Qty, Visibility, and Presence values were all needed.  GCP ML kit for face has a lower landmark qty.

@ajmakoni - Hi, thanks for the message. The main issue was landmark quantity; whether it reflects "visibility" or "presence" I did not check. So the landmark Qty, Visibility, and Presence values were all needed for our use case. GCP ML kit for face has a lower landmark qty.

Okay, I get your point

Is there any good news for this? Nobody care it?

@endink - I was in the MediaPipe slack channel and saw this

@jimb2834 it only worked for pose landmarks, but not in handlandmarks.

Hello @endink,
We are upgrading the MediaPipe Legacy Solutions to new MediaPipe solutions However, the libraries, documentation, and source code for all the MediapPipe Legacy Solutions will continue to be available in our GitHub repository and through library distribution services, such as Maven and NPM.
You can continue to use those legacy solutions in your applications if you choose. Though, we would request you to check new MediaPipe solutions which can help you more easily build and customize ML solutions for your applications. These new solutions will provide a superset of capabilities available in the legacy solutions. Thank you

Mediapipe unity plugin stills gives always 0 for visibility and presence for normalizedlandmarks in handtracking

Mediapipe unity plugin stills gives always 0 for visibility and presence for normalizedlandmarks in handtracking

authors: ajmakoni endink guunnz jimb2834 kuaashish yiyiyaya1122

repo: google/mediapipe


text:
Tracking results are significantly different between Android and iOS

I am using the same set of pose_detection.tflite and pose_landmark_full.tflite, running on Android phone and IPhone, and it gives different tracking positions for joints. iPhone is more accurate. Can you explain how come it gives different results on different platforms? Thank you!

@fchen09,
We have implemented the model ops on CPU, XNNPack, Metal, OpenGL, WebGL However, each platform uses the different Inference engine. For example, MediaPipe iOS uses Metal as Inference engine and Android is normally uses XNNPack.


text:
Add three-gpu-pathtracer to Fidelity Tests

Reference Issue
--
Hello! I'm the developer of the three-gpu-pathtracer project (a generalized path tracer library built on top of three.js) and have added support for it to the "render-fidelity-tools" package to help find problems with the implementation. The project is still fairly new so there are issues with a number of models and some but it's great to see where it's failing and which glTF parameters are not properly supported, yet.
Also I see now that you'd like an issue for each PR - I'm happy to make one now if you guys would like. And if this looks acceptable then I can make whatever other changes are needed / generate images! Thanks for the awesome project!
Here are some of the screenshots including cases where it's clearly not behaving correctly:

cc @bhouston

Thanks, this is fantastic! Sorry I didn't get back to you sooner; this came in just as I caught COVID and I was out for awhile. Even if some of the renders aren't perfect, can you please add the golden images? This will allow us to show your current results publicly. Of course you can also set exclude in the config on any scenarios that are known to be not supported, or cause a crash/hang.

Thanks @elalish! I've just updated the goldens with a few tests excluded (khronos-sponza, LDR Metal Rough Spheres, and khronos-boxInterleaved). I'll plan to look into the issues with sponza box interleaved at some point but I don't think I'll plan to support LDR jpg environment maps. I've only set the renders to 100 samples at the moment to save on render time but maybe I'll bump that up in a future update.
As mentioned above there are still quite a few issues that will make the three-gpu-pathtracer images stick out quite a bit but I think it's a good first step to getting these problems addressed!

Great - this is good feedback. When I have a little time I'll go through and mark the obviously incorrect ones and add them over time as the renderer improves. The project is still fairly new so part of this effort is finding where the result is meaningfully different from other renders so we can improve the fidelity of three pathtracer (including things like being too dark in some cases). Definitely understand that the intent of the project is to measure the correctness model-viewer, though.

Hey @elalish! I've made quite a few fixes and releases over the last several months that have made significant improvements to the fidelity of the examples. You can see the current state of the screenshots here:
https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/screenshotList.html#model-viewer
There are still some improvements to make specifically to rough metallic materials but there will always be room for improvement. Do you have any further thoughts now on including three-gpu-pathtracer into the fidelity tests? If you're open to it I can update the PR to the latest version.

Incredible progress! Yes, I would love to see these included in our fidelity tests. As long as you can commit to updating them here semi-regularly, please go ahead and add them. Hopefully this benefits your process too.

Amazing work @gkjohnson!  BTW something is weird when I first load the comparison page.  It says it is comparing to dspbr-pt, but it is actually comparing to filament.  That confused the heck out of me initially.

This is so cool to see :) great progress!

Thanks guys! I've just updated the PR with the latest version of the path tracer, new screenshots, and updated exemptions for the config.
I noticed some issues with handling of clearcoat maps and env maps which will be fixed in the next release - so I'll be able to remove some of the excluded screenshots then. Some of the other excluded screenshots include the dark triangles which are a result of the lack of multibounce-accommodation noticeable in rough metal materials, some specular transparent materials with noticeable fireflies, and demos with features that aren't supported (unlit, LDR env map, etc).
@elalish let me know if there's anything else I can do to get this merged!

Oh also @bhouston

BTW something is weird when I first load the comparison page. It says it is comparing to dspbr-pt, but it is actually comparing to filament. That confused the heck out of me initially.

Good point - I just pushed a fix for this. It defaults to comparing to model-viewer but it takes a second for the JS to update the dropdown. I've adjusted the page to hide the UI until the JS has been able to run.

Good point - I just pushed a fix for this. It defaults to comparing to model-viewer but it takes a second for the JS to update the dropdown. I've adjusted the page to hide the UI until the JS has been able to run.

It appears to be a Safari only bug and it remains.  I can not reproduce in Chrome.

It appears to be a Safari only bug and it remains. I can not reproduce in Chrome.

Looks like I used a non-standard method for changing the dropdown. It should (hopefully) be fixed now.

Great thanks @elalish! Maybe I'll take a look at some of the other sample models when I get a chance.

authors: bhouston elalish gkjohnson hybridherbst

repo: google/model-viewer


text:
Update private key formatting to avoid triggering release failure

This change is

Closed in favor of - https://github.com/google/nomulus/pull/2431

repo: google/nomulus


text:
novm command error

root@ubuntu:/home/fox/novm# novm kernels
| id                                       | url                   | timestamp                | release           | name |
| e4a4937c6cf0c769af670ebf6df1a2eb2a001995 | file:///tmp/tmpoFu5Jj | Mon Jan 12 00:51:20 2015 | 3.13.0-32-generic |      |
root@ubuntu:/home/fox/novm# novm --debug create --kernel e4a4937c6cf0c769af670ebf6df1a2eb2a001995 --name test
20182
root@ubuntu:/home/fox/novm# novm list
root@ubuntu:/home/fox/novm# novm run 20144
error: "{'name': None}"
root@ubuntu:/home/fox/novm#
root@ubuntu:/home/fox/novm# uname -an
Linux ubuntu 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:/home/fox/novm# go version
go version go1.2.1 linux/amd64

If you want to run something in one instance, you should do like:
novm run --id 20144 WhatYouWantToRun

like this?：
root@ubuntu:/home/fox/novm# novm --debug create --kernel e4a4937c6cf0c769af670ebf6df1a2eb2a001995 --name test
20351
root@ubuntu:/home/fox/novm# novm list      //nothing。。。。。。。。
root@ubuntu:/home/fox/novm# novm --debug run --id 20351 /bin/ls
Traceback (most recent call last):
File "./novm/cli.py", line 203, in main
result = fn(*built_args)
File "./novm/shell.py", line 182, in run
command=command)
File "./novm/manager.py", line 397, in run_noguest
ctrl = control.Control(ctrl_path, bind=False)
File "./novm/control.py", line 56, in init
self._sock.connect(path)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 2] No such file or directory
root@ubuntu:/home/fox/novm#

like this?：
root@ubuntu:/home/fox/novm# novm --debug create --kernel e4a4937c6cf0c769af670ebf6df1a2eb2a001995 --name test
20351
root@ubuntu:/home/fox/novm# novm list      //nothing。。。。。。。。
root@ubuntu:/home/fox/novm# novm --debug run --id 20351 /bin/ls
Traceback (most recent call last):
File "./novm/cli.py", line 203, in main
result = fn(*built_args)
File "./novm/shell.py", line 182, in run
command=command)
File "./novm/manager.py", line 397, in run_noguest
ctrl = control.Control(ctrl_path, bind=False)
File "./novm/control.py", line 56, in init
self._sock.connect(path)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 2] No such file or directory
root@ubuntu:/home/fox/novm#

@foxwang
if novm list outputs nothing, that means the kvm instance is not started.
Here is the output on my machine:
hamo@TRINITY ~ $ python2 /usr/bin/novm create
28448
hamo@TRINITY ~ $ ps aux | grep 28448
hamo     28448 64.5  1.9 1668548 116728 pts/5  Sl   17:54   0:02 novmm -statefd=5 -vmlinux /home/hamo/.novm/kernels/6177e7ae242914ff8750c05ff850a901fd935dd3/vmlinux -sysmap /home/hamo/.novm/kernels/6177e7ae242914ff8750c05ff850a901fd935dd3/sysmap -initrd /home/hamo/.novm/kernels/6177e7ae242914ff8750c05ff850a901fd935dd3/initrd -setup /home/hamo/.novm/kernels/6177e7ae242914ff8750c05ff850a901fd935dd3/setup -cmdline=intel_pstate=disable pci=conf1 -controlfd=3
root     28456  0.0  0.0      0     0 ?        S    17:54   0:00 [kvm-pit/28448]
hamo     28468  0.0  0.0  12604  1136 pts/5    S+   17:54   0:00 grep --colour=auto 28448
hamo@TRINITY ~ $ python2 /usr/bin/novm run --id 28448 /bin/ls
bin
boot
dev
etc
home
lib
lib64
lost+found
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var

tks
can you tell me，What’s your OS ?and the kernel version?

Are you sure you have /dev/kvm and a new enough kernel?
The best way to debug is run the following command:
novm --debug create --nofork --com1

I think I'm having the same issue on ubuntu 14.04:
~/repos/novm$ ./scripts/novm --debug create --nofork --com1
2015/04/22 16:32:39 Missing capability: XCRS

Am having errors as well on creating containers and executing commands:
 python2 scripts/novm --debug run --id 11469 /usr/bin/ls
Traceback (most recent call last):
  File "./novm/cli.py", line 203, in main
    result = fn(*built_args)
  File "./novm/shell.py", line 186, in run
    command=command)
  File "./novm/manager.py", line 404, in run_noguest
    ctrl = control.Control(ctrl_path, bind=False)
  File "./novm/control.py", line 57, in __init__
    self._sock.connect(path)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 2] No such file or directory

repo: google/novm


text:
Add push constant tests

Also adds a bunch of fixes for push constants (and others) on OpenGL and Metal.

Thanks for the review!

repo: google/nxt-standalone


text:
SufficientAssumptionsForInfeasibility in C#/.Net returns the original set.

Dear all,
I am testing a classic example to let the solver heuristically determine a sufficient set of constraints causing infeasibility. The following example is common in the Internet (usually provided in Python, https://github.com/google/or-tools/blob/master/ortools/sat/samples/assumptions_sample_sat.py). I would expect it to return a subset of less than 3 literals. However, in C# the solver still returns the full (original) set of 3 literals (a, b, and c). I wonder whether I am doing something wrong or more flag options are required before starting the solver. I would appreciate your help.
            CpModel model = new CpModel();
            IntVar x = model.NewIntVar(0, 10, "x");
            IntVar y = model.NewIntVar(0, 10, "y");
            IntVar z = model.NewIntVar(0, 10, "z");

            ILiteral a = model.NewBoolVar("a");
            ILiteral b = model.NewBoolVar("b");
            ILiteral c = model.NewBoolVar("c");

            model.Add(x > y).OnlyEnforceIf(a);
            model.Add(y > z).OnlyEnforceIf(b);
            model.Add(z > x).OnlyEnforceIf(c);

            model.AddAssumptions(new ILiteral[] { a, b, c });
            CpSolver solver = new CpSolver();
            solver.StringParameters = "log_search_progress: true, num_search_workers: 1";
            CpSolverStatus status = solver.Solve(model);
            List<int> infeasibilities = solver.SufficientAssumptionsForInfeasibility().ToList();
            foreach (int index in infeasibilities)
            {
                Console.WriteLine("Variable: {0}\n", model.Model.Variables[index]);
            }

Read the.log. you either have an objective, or use more than 1 worker.

Thank you, Laurent. I am aware of those settings. Therefore, there is no objective function in the example; it is a satisfiability problem. As you can see, I set num_search_workers to 1 in the solver's parameters and can observe this being active in the log.
The example creates an infeasible circuit: x > y > z > x. Of course, if we exclude all three literals, the problem becomes feasible (it is a valid solution for SufficientAssumptionsForInfeasibility). But this is not the solution we want. It is enough to eliminate one constraint to break the circuit. Therefore, the function should return either a, or b, or c. There are to be 3 sets of singletons.
Am I missing something?

No, the system returns a minimal unsatisfiable set, not a minimal
correction set.
Laurent Perron | Operations Research | @.*** | (33) 1 42 68 53
00
Le lun. 13 nov. 2023 à 11:24, sergey-polyakovskiy @.***>
a écrit :

Thank you, Laurent. I am aware of those settings. Therefore, there is no
objective function in the example; it is a satisfiability problem. As you
can see, I set num_search_workers to 1 in the solver's parameters and can
observe this being active in the log.
The example creates an infeasible circuit: x > y > z > x. Of course, if we
exclude all three literals, the problem becomes feasible (it is a valid
solution for SufficientAssumptionsForInfeasibility). But this is not the
solution we want. It is enough to eliminate one constraint to break the
circuit. Therefore, the function should return either a, or b, or c. There
are to be 3 sets of singletons.
Am I missing something?
—
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/3983#issuecomment-1807879596,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3NVIAOMN6BAT3KGRHLYEHYOBAVCNFSM6AAAAAA7IP327GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXHA3TSNJZGY
.
You are receiving this because you were assigned.Message ID:
@.***>

(minimal is not guaranteed)
Laurent Perron | Operations Research | @.*** | (33) 1 42 68 53
00
Le lun. 13 nov. 2023 à 11:55, Laurent Perron @.***> a écrit :

No, the system returns a minimal unsatisfiable set, not a minimal
correction set.
Laurent Perron | Operations Research | @.*** | (33) 1 42 68
53 00
Le lun. 13 nov. 2023 à 11:24, sergey-polyakovskiy <
@.***> a écrit :

Thank you, Laurent. I am aware of those settings. Therefore, there is no
objective function in the example; it is a satisfiability problem. As you
can see, I set num_search_workers to 1 in the solver's parameters and can
observe this being active in the log.
The example creates an infeasible circuit: x > y > z > x. Of course, if
we exclude all three literals, the problem becomes feasible (it is a valid
solution for SufficientAssumptionsForInfeasibility). But this is not the
solution we want. It is enough to eliminate one constraint to break the
circuit. Therefore, the function should return either a, or b, or c. There
are to be 3 sets of singletons.
Am I missing something?
—
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/3983#issuecomment-1807879596,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUPL3NVIAOMN6BAT3KGRHLYEHYOBAVCNFSM6AAAAAA7IP327GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXHA3TSNJZGY
.
You are receiving this because you were assigned.Message ID:
@.***>

Thank you. I now can see my problem with this example.
Actually, I came from a larger model that has many different constraints including implications, ExactlyOne, AtMostOne, and cumulative scheduling constraints; that is, not just linear expressions. A feasible solution is only when all literals are set to TRUE. For each decision boolean variable I add the following: model.Add(x == 1).OnlyEnforceIf(a). I am trying to find the minimal unsatisfiable set (generally to strengthen the Bender's cut). The model itself has been tested and is correct; I mainly want to find the set now. I get it infeasible, but SufficientAssumptionsForInfeasibility returns an empty set. Could this be because of mixing various constraint types? Are there any limitations on the use of SufficientAssumptionsForInfeasibility?

authors: lperron sergey-polyakovskiy

repo: google/or-tools


text:
Enforce consistent formatting across different versions of clang-format

Each version of clang-format has its own definition of Google style.
Recent fails in the presubmit check showed that there are differences
in the latest version and the one from the CI (which is clang-format-9).
This PR dumps the Google style definition from clang-format-9 into
the .clang-format file instead of relying on what the version below
has defined as such.

Seem that the presubmit check we have currently is failing for #1026.

As discussed offline, the root cause is not ignoring the file but differences in the Google style in different versions.

As discussed offline, the root cause is not ignoring the file but differences in the Google style in different versions.

When I take this file and try to format some code with clang-format-7 I get the following error:
YAML:11:18: error: invalid boolean
AlignOperands:   Align
                 ^~~~~

It seems the config was generated with a more modern version of clang-format. We shouldn't impose that requirement on our potential external contributors. The Google-style between LLVM-7 and LLVM-9 didn't change. It's just the naming in the configuration file. So there are no disadvantages for us using a config generated by LLVM-7. (Sorry for the confusion, I think we discussed that in chat but I failed to make myself clear.)
We should also loop in @pierricgimmig  and @dimitry-. If I remember correctly they both had objections regarding an explicit configuration.

I'd suggest to go then with a config file generated with clang-format-7.

I think we should go with the short-version and have final arbitrator on the presubmit check side. (we also want it to be the lasters stable version of clang-format)

This is somewhat inconvenient and arbitrary. Locally, you then need to know which version is used at the check side. E.g. you can't rely on your IDE or even pre-commit hooks.

I think we should go with the short-version and have final arbitrator on the presubmit check side. (we also want it to be the lasters stable version of clang-format)

This is somewhat inconvenient and arbitrary. Locally, you then need to know which version is used at the check side. E.g. you can't rely on your IDE or even pre-commit hooks.

Don't tools use whichever clang-format you have installed on your machine? If this is the case the idea would be to always use the version used by CI.

I think we should go with the short-version and have final arbitrator on the presubmit check side. (we also want it to be the lasters stable version of clang-format)

This is somewhat inconvenient and arbitrary. Locally, you then need to know which version is used at the check side. E.g. you can't rely on your IDE or even pre-commit hooks.

Don't tools use whichever clang-format you have installed on your machine? If this is the case the idea would be to always use the version used by CI.

Exactly, tools like IDEs usually use whats on your system. So if you have a newer version then on the kokoro machine (which is true for our workstations), you result in different formattings. The idea of this change would be, that you can use what ever version you want and will result in what is on the kokoro machine.

I think we should go with the short-version and have final arbitrator on the presubmit check side. (we also want it to be the lasters stable version of clang-format)

This is somewhat inconvenient and arbitrary. Locally, you then need to know which version is used at the check side. E.g. you can't rely on your IDE or even pre-commit hooks.

Don't tools use whichever clang-format you have installed on your machine? If this is the case the idea would be to always use the version used by CI.

Exactly, tools like IDEs usually use whats on your system. So if you have a newer version then on the kokoro machine (which is true for our workstations), you result in different formattings. The idea of this change would be, that you can use what ever version you want and will result in what is on the kokoro machine.

But this is not the case right? there are bugs which are fixed in later version which could result in different formatting even if you expand everything. I do not think this is a solution. It seems to me it introduces more problems then it solves. It is hard to read, hard to maintain, if are still capped by whichever version is used to generate this file.

I think we should go with the short-version and have final arbitrator on the presubmit check side. (we also want it to be the lasters stable version of clang-format)

This is somewhat inconvenient and arbitrary. Locally, you then need to know which version is used at the check side. E.g. you can't rely on your IDE or even pre-commit hooks.

Don't tools use whichever clang-format you have installed on your machine? If this is the case the idea would be to always use the version used by CI.

Exactly, tools like IDEs usually use whats on your system. So if you have a newer version then on the kokoro machine (which is true for our workstations), you result in different formattings. The idea of this change would be, that you can use what ever version you want and will result in what is on the kokoro machine.

But this is not the case right? there are bugs which are fixed in later version which could result in different formatting even if you expand everything. I do not think this is a solution. It seems to me it introduces more problems then it solves. It is hard to read, hard to maintain, if are still capped by whichever version is used to generate this file.

As far as I know bugs in clang-format are always fixed by introducing an additional option which is not enabled by default. So having a verbose config will fix that because bugfixes won't be enabled by default.

I think we should go with the short-version and have final arbitrator on the presubmit check side. (we also want it to be the lasters stable version of clang-format)

This is somewhat inconvenient and arbitrary. Locally, you then need to know which version is used at the check side. E.g. you can't rely on your IDE or even pre-commit hooks.

Don't tools use whichever clang-format you have installed on your machine? If this is the case the idea would be to always use the version used by CI.

Exactly, tools like IDEs usually use whats on your system. So if you have a newer version then on the kokoro machine (which is true for our workstations), you result in different formattings. The idea of this change would be, that you can use what ever version you want and will result in what is on the kokoro machine.

But this is not the case right? there are bugs which are fixed in later version which could result in different formatting even if you expand everything. I do not think this is a solution. It seems to me it introduces more problems then it solves. It is hard to read, hard to maintain, if are still capped by whichever version is used to generate this file.

As far as I know bugs in clang-format are always fixed by introducing an additional option which is not enabled by default. So having a verbose config will fix that because bugfixes won't be enabled by default.

And we already had it twice, that system was different to kokoro.

I am still convinced we shouldn't fix the version of Google style. We probably want to move forward with it.

As discussed offline, source of truth is the latest version on the CI and we will add this version to the documentation.

authors: beckerhe dimitry- florian-kuebler

repo: google/orbit


text:
Cut several dependencies of OrbitService on globals and client-only code

Split SymbolsManager in SymbolsService,Client
These were two separate interfaces for the client and the server in the same
class.
Rename CoreApp::InitializeManagers to InitializeClientTransactions and use
it only in the ui, move the server-related logic to OrbitService.
Move GetRemoteMemory logic to new ProcessMemoryClient,Service
Replace CoreApp::SetupClientMemoryTransaction,
OrbitService::SetupServiceMemoryTransaction with new classes
ProcessMemoryClient, ProcessMemoryService.
Split TransactionManager in TransactionClient,TransactionService
Only use TransactionClient in the client, only TransactionService in
OrbitService.
Don't use GCoreApp in OrbitService
Don't use ConnectionManager in OrbitService, make it client-only

The overall goal of this change is to simplify OrbitService, removing dependencies on (or at lest not use) code and classes that should be client-specific. This should make it easier to understand the code flow in the service.
In particular, classes that have a double-interface for the client and the service are split in two. This also allows to reduce the number of globals that OrbitService uses (the only one left is GTcpServer).

In the last commit, can you please move server specific code to OrbitAsioService instead of OrbitService?

@dimitry- Do you mean that OrbitService should be renamed to OrbitAsioService or that OrbitService should be split in two?

In the last commit, can you please move server specific code to OrbitAsioService instead of OrbitService?

@dimitry- Do you mean that OrbitService should be renamed to OrbitAsioService or that OrbitService should be split in two?

I was actually thinking about moving code from ConnectionManager to OrbitAsioService (newly introduced) and keep OrbitService as top level which for the time being runs Grpc and Asio services.

In the last commit, can you please move server specific code to OrbitAsioService instead of OrbitService?

@dimitry- Do you mean that OrbitService should be renamed to OrbitAsioService or that OrbitService should be split in two?

I was actually thinking about moving code from ConnectionManager to OrbitAsioService (newly introduced) and keep OrbitService as top level which for the time being runs Grpc and Asio services.

Ah right, so the use of OrbitGrpcServer should be moved from main to OrbitService.

authors: dimitry- dpallotti


text:
Maven transitive scanning is slow due to the new registry support

Scorecard's public scanning infrastructure has been having some runtime issues since upgrading to v1.9.1. I'm hoping downgrade in our deployment to confirm the issue goes away, but it lines up with when we merged the dependabot PR.
pprof profiling shows a lot of time in deps.dev/util/semver, specifically around the Maven dependencies.

resolve (* APIClient) MatchingVersions 31.57%
resolve (* APIClient) mavenRequirements 31%
semver (*Constraint) Match 24.33%

After chatting with the deps.dev team, it's know for deps.dev/util/semver to be a slow operation. I don't think its usage is new between v1.9.0 and v1.9.1, but perhaps it's used in a new way?
https://github.com/google/osv-scanner/compare/v1.9.0...v1.9.1

Hmm that does line up with a change I made to the Maven resolver https://github.com/google/deps.dev/commit/b3ba03369df10d7148cd6ae39e8147aa21b6454e
Though what benchmarks I did run on it found it should've been faster.

I profiled again before the v1.9.0 downgrade and after, and didn't see the maven code as a hotspot in either. So it's possible we were processing a lot of Java repositories at the time.
However after deploying the new revision to GKE (where the only change was the downgrade), our CPU resources dropped significantly (from ~5.0 CPU to ~1.0 CPU)

@spencerschrock thank you for your updates! I suspect https://github.com/google/osv-scanner/pull/1286 might be the problematic change. I already have a draft PR which should reduce the number of Maven repositories we fetch.

Our p99 latencies for the scan also went from occasional spikes of 4000 seconds back to ~50 seconds. I'll see if I can isolate a problematic repo

One example is github.com/SpringCloud/spring-cloud-gray
which took 3-4 minutes to scan on v1.9.0 and on v1.9.1 I gave up after 15 minutes

[@spencerschrock](https://github.com/spencerschrock) thank you for your updates! I suspect #1286 might be the problematic change. I already have a draft PR which should reduce the number of Maven repositories we fetch.

git bisect agrees that #1286 is the problematic change. I checked out your PR to experiment with and it helps a little but I still have a 4x in runtime compared to before #1286

it is a known issue that Maven resolution is slow due to the new registry support, and I am working on that.
I may change the title of this issue to reflect the root cause.

That change also added the PreFetch() to maven resolution, which is why MatchingVersions -> Match gets used so much.
I've made #1456 to remove that part of it, since it's expensive and not actually helpful.

authors: cuixq michaelkedar spencerschrock

repo: google/osv-scanner


text:
fix: use errgroup to avoid hydration deadlock scenario

The existing code tried to do what errgroup does, limit concurrency and return the first error if present, but had a deadlock scenario.
Fixes #1077

This solution needs to be double checked, I haven't had the time to extensively think about it.

Hmm, writing to a closed channel will result in a panic. So the logic around when to close errChan will need changed if we take this approach, as it would be a different race condition as written.
Perhaps we rewrite this block to use sync.WaitGroup (or similar)?
https://github.com/google/osv-scanner/blob/4fa2fa471b6988600b7e0f6611241c0ff4c97109/pkg/osv/osv.go#L302-L309

Codecov Report
Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 65.88%. Comparing base (0753337) to head (54b4c20).

Files
Patch %
Lines

pkg/osv/osv.go
66.66%
2 Missing and 2 partials :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1078      +/-   ##
==========================================
+ Coverage   65.35%   65.88%   +0.52%
==========================================
  Files         150      150
  Lines       12535     9713    -2822
==========================================
- Hits         8192     6399    -1793
+ Misses       3883     2853    -1030
- Partials      460      461       +1

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

authors: codecov-commenter spencerschrock


text:
feat: write Maven updates to parent pom.xml if possible

WIP...

Codecov Report
Attention: Patch coverage is 55.17241% with 39 lines in your changes missing coverage. Please review.

Project coverage is 66.16%. Comparing base (0ecee7c) to head (0f06db0).

Files
Patch %
Lines

internal/resolution/manifest/maven.go
55.81%
33 Missing and 5 partials :warning:

internal/manifest/maven.go
0.00%
0 Missing and 1 partial :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1182      +/-   ##
==========================================
+ Coverage   65.79%   66.16%   +0.37%
==========================================
  Files         165      165
  Lines       13915    10835    -3080
==========================================
- Hits         9155     7169    -1986
+ Misses       4257     3160    -1097
- Partials      503      506       +3

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

authors: codecov-commenter cuixq


text:
Don't mark deleted git entries as invalid.

The supported way to handle these is to mark entries as "withdrawn" and leave the entry intact.
This also guards against availability issues from source feeds, such as when a bug in their
system causes their entries to be deleted (e.g. https://github.com/github/advisory-database/commit/06071dd8e490ed354657f8ee158880433cf04997)

Could you please add a bit more of the "why" to the description?

Could you please add a bit more of the "why" to the description?

done.

The supported way to handle these is to mark entries as "withdrawn" and leave the entry intact.

Is it correct that this behaviour is not currently implemented?

authors: andrewpollock oliverchang


text:
about new ftrace event

Hello, we are getting a lot of help in development using perfetto.
The question is about new ftrace event.

Even though we did not add a new ftrace event information in the code base as below,
it is displayed well with the structure variable in perfetto ui. Is the guide for other use cases?

https://perfetto.dev/docs/contributing/common-tasks#add-a-new-ftrace-event

Conversely, if i add a new ftrace event according to the guide, the following error occurs and it is not visible in perfetto ui
I would like to ask what to look at about the error

ftrace_bundle_tokenizer_errors

I've really filled out all the new event information according to the guide, but I don't know what code to look at anymore.
Based on the perfetto code, it seems that cpu information or timestamp information are missing.

I don't think I understand what i needs to be modified yet ( for new ftrace event )
Do I need to update the perfetto ui code to add a new event and see it in ui?
( To be exact, it's about the trace processor ? )

The instructions at https://perfetto.dev/docs/contributing/common-tasks#add-a-new-ftrace-event explain exactly what you need to do. It's not just modifying trace processor, you also need to change the collection code so that we can generate the real proto events instead of generic events.

authors: LalitMaganti hojihodi

repo: google/perfetto


text:
Size limit for the JSON trace event format?

Hello, love the UI, very clean and responsive!
I'm wondering if there is still a size limit on the size of uploaded JSON files in the trace event format. My understanding is that chrome://tracing was limited to 256MB: https://github.com/google/trace-viewer/issues/627
I tried to load a 900MB trace file into ui.perfetto.dev, and I got a crash:
To assist with debugging please attach or link to the trace you were viewing.

Viewed on: https://ui.perfetto.dev

Uncaught Error: RuntimeError: abort(undefined). Build with -s ASSERTIONS=1 for more info.
RuntimeError: abort(undefined). Build with -s ASSERTIONS=1 for more info.
    at abort (https://ui.perfetto.dev/v12.1.269/engine_bundle.js:26:11478)
    at _abort (https://ui.perfetto.dev/v12.1.269/engine_bundle.js:26:76163)
    at <anonymous>:wasm-function[42]:0x3131
    at <anonymous>:wasm-function[85]:0x6333
    at <anonymous>:wasm-function[3598]:0x20680d
    at <anonymous>:wasm-function[3581]:0x204ae7
    at <anonymous>:wasm-function[2178]:0x157818
    at <anonymous>:wasm-function[1839]:0x12986b
    at <anonymous>:wasm-function[785]:0x728eb
    at <anonymous>:wasm-function[3429]:0x1f047d

stderr:
undefined

v12.1.269 a1386eaf2121de029e239a8d9b414ebcdd4c8257
UA: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36

The README mentions:

web-based UI to visualize and explore multi-GB traces.

But I figure it might only apply for the Perfetto protobuf format, is that correct?
If yes, is there an existing way to convert from the trace event json format to the Perfetto protobuf format?
Thanks!

Hey! Happy to hear you are enjoying the UI 😄 So by default ui.perfetto.dev is limited the maximum amount memory your browser will allow a WASM application to use. This is normally 2-4gb. When ui.perfetto.dev parses the trace file (whether .json or .proto or another format) it normally ends up using more memory than the underlying trace file, mostly because we trade some memory for better query performance. The exact expansion factor varies based on the format and the content of the trace. In this case it sounds like the 900mb ends up using more than the 2-4gb when loaded.
The bad news is we don't have a way to convert .json traces to .proto traces, and even if we did it wouldn't help with this.
The good news is we have a mode designed exactly for analysing very large trace files in the UI! The steps are here: https://perfetto.dev/docs/quickstart/trace-analysis#setup but in brief:

Build or download the trace_processor_shell binary
You run trace_processor_shell --httpd yourtrace.json on your computer
Open ui.perfetto.dev
It detects that the trace_processor is running locally and offers to connect to it:

Click Yes, use loaded trace

You should then be able to load traces as large as however much RAM you have + full native performance.
The UI should detect OOM conditions and pop up a dialog explaining the --http mode instead of crashing with the error message you saw ...but unfortunately we broke this feature in the most recent UI release. Hopefully this should be fixed in the next UI release.
Hopefully that helps! Let me know if you have any further questions.

@chromy thanks for the detailed explanation!
My main workstation is a Windows 10 desktop, and I ssh to a headless Linux server to collect trace event traces. I tried running the trace processor under WSL2 on this desktop, using netsh to proxy to port 9001 inside the Ubuntu WSL2 VM, but it didn't detect the trace processor for some reason when opening ui.perfetto.dev inside Chrome on Windows.
I then tried on a Linux laptop (trace_processor + Chrome browser) and then it worked like a charm, thanks! I'm wondering, does the trace processor need to sit on localhost? (e.g. as a security limitations?). If not, it might be useful to add an option to configure the URL of the trace_processor server.
Last question: on the Linux laptop, I see 10GB of resident memory when loading this 900MB trace. Does that mean the WASM version of the import would also need 10GB of RAM or are the RAM requirements not directly related?

I've used ssh port forwarding to proxy the port and it has worked correctly so I'd double check that this is working on Windows. Unfortunately, we cannot support arbitrary pointing to arbitrary URLs because of CORS restrictions - we only support localhost as it's safe for all users. With proxying though, you should always be able to port forward and that should work.
10GB of resident memory is pretty out there. We'd usually expect a 2x increase in memory compared to the raw trace but seems like something has gone wrong here as this is more than 10x. We've observed this in some internal bugs as well so seems like a real issue.
I'm currently working on some other projects so I will be unable to look into this for a bit but I will come back to this once those settle a bit more.

Note that with r.android.com/1539396 * trace_processor_shell can be built as a native windows executable. If you want I can build it for you and put the exe somewhere.
Also i am pretty sure I tried it in WSL2 and it worked without having to do any port forwarding. TCP ports opened on 0.0.0.0 on Linux should be reachable from the Windows side (unless you use some custom network config). Would be curious to understand more what's happening here.

Unfortunately it got reverted in r.android.com/1608095 because broke chrome win32, I'll reland in the next weeks

Thanks @LalitMaganti and @primiano for the detailed answers!

If you want I can build it for you and put the exe somewhere.

I'm good for now with my setup, no need to do that just for me. But if you do publish the binary under get.perfetto.dev, I will try.
I'll also take another stab at WSL2 later. The server seemed accessible since I was able to access nginx running under WSL2 from my browser. Trying to access localhost:9001 from my browser yielded connection reset instead of unable to connect, so I suppose I'm able to reach the RPC server (but obviously it didn't like my HTTP GET request).

Wait, now it works fine from WSL2. Perhaps a PEBKAC previously, sorry about that.

The above change should fix the very high memory usage on JSON traces.

Thanks @LalitMaganti!

authors: LalitMaganti chromy flx42 primiano


text:
All versions of third-party tools should be manually pinned

Right now, the docker file always gets the latest version of all tools. We may want to manually pin some of these to ensure that we don't break a stable release. This is especially true of the analyzers.

Fixed in 2e226f92b85194a0d60f2b94ccfc940cc7c246cf.

Reopening, the jshint change was broken.

Did you have to rollback the entire jshint change? Did you try keeping the part that pinned the version?

I rolled back the entire change; was not sure which parts would work without the others.

Once again in phabricator.

authors: ciera supertriceratops tedks

repo: google/shipshape


text:
execprog, stress, prog2c: unify flags to enable additional features

This change makes all syz-execprog, syz-prog2c and syz-stress accept
-enable and -disable flags to enable or disable additional features
(tun, net_dev, net_reset, cgroups and binfmt_misc) instead of having
a separate flag for each of them.
The default (without any flags) behavior isn't changed: syz-execprog
and syz-stress enabled all the features (provided the runtime supports
them) and syz-prog2c disables all of them.

gometalinter says:
pkg/csource/options.go:1::warning: file is not gofmted with -s (gofmt)
pkg/csource/options.go:76:14:warning: should omit 2nd value from range; this loop is equivalent to `for name := range ...` (golint)
tools/syz-execprog/execprog.go:275::warning: line is 123 characters (lll)

Fixed.

Codecov Report

Merging #1028 into master will decrease coverage by 0.16%.
The diff coverage is 25%.

@@            Coverage Diff             @@
##           master    #1028      +/-   ##
==========================================
- Coverage   67.53%   67.37%   -0.17%
==========================================
  Files         114      114
  Lines       20425    20488      +63
==========================================
+ Hits        13794    13803       +9
- Misses       5985     6039      +54
  Partials      646      646

Impacted Files
Coverage Δ

pkg/ipc/ipc.go
50.57% <ø> (ø)
:arrow_up:

pkg/csource/common.go
88.5% <100%> (+0.13%)
:arrow_up:

pkg/runtest/run.go
61.87% <66.66%> (+0.21%)
:arrow_up:

pkg/csource/options.go
33.95% <7.59%> (-15.13%)
:arrow_down:

pkg/repro/repro.go
24.62% <93.33%> (+0.47%)
:arrow_up:

Continue to review full report at Codecov.

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

pkg/csource/options.go	`33.95% <7.59%> (-15.13%)

Option parsing looks well suited for unit testing. No reason to not test it.

Added a test.

PTAL

Running syz-runtest with this change, I've got:
<stdin>:510:13: error: ‘setup_cgroups_loop’ defined but not used [-Werror=unused-function]
cc1: all warnings being treated as errors

Probably should be caught with full pkg/csource tests.

go test ./pkg/csource/... now works.

PTAL

LGTM

authors: codecov-io dvyukov xairy

repo: google/syzkaller


text:
TInky build issue on Fedora

Following the instructions on how to build tinkey I eventually got:

failed to create directory /home/username/.ccache/tmp: Read-only file system

Fixed by:
mkdir -p ~/.ccache
bazel build tinkey --sandbox_writable_path ~/.ccache

If applicable, maybe worth mentioning it in the docs at:
https://github.com/google/tink/blob/master/docs/TINKEY.md
Thanks.

Thanks. Can you send us a PR?

Now you don't have to build Tinkey yourself, but you can install with Homebrew.
On your Linux box, run
brew tap google/tink https://github.com/google/tink
brew install tinkey

authors: bfloch thaidn

repo: google/tink


text:
Hhj

Nm

Hi, please let me know if you have a question or issue that we can address.  Thank you, the Google Team

repo: google/vpn-libraries


text:
Should script/main.js be async ?

Is best practice to use async attribute for the main script tag in index.html?

Apparently, using async when the script tag is already at the bottom of the page allows it to be discoverable by the preloader. This means if the parser is blocked at some earlier point, the script can still be discovered and requested before the parser gets to it.
My only concern with advocating for async use at the bottom of the page is if we have more than one script tag in production (we likely won't, but may) and both are async, afaik, there isn't a guarantee that they will execute in the right order.
cc @igrigorik who may be able to provide more insight into this than I have :)

(we likely won't, but may)

We don't, but other people may. I prefer being safe here.

Since we are now using a userf build block the (possible multiple) JS scripts imports tags get replaced by just one. It would be safe(r) to add the async to the final concatenated script tag but here is not currently a nice option to do so see yeoman/grunt-usemin#391 for the feature request (there is an ugly workaround though). Lets wait until they eventually add this feature (please +1 the issue).

authors: addyosmani nicolasgarnier robbbz sethladd

repo: google/web-starter-kit


text:
Add official generator for Yeoman

Yeoman is great tool.
Please consider it instead of download every once that one project is created.

We used to have https://github.com/yeoman/generator-mobile for WSK, but it didn't get a huge amount of usage so we stopped officially supporting it. I'll keep this open in case others want this or someone wants to take it on as a project.

authors: SandHilt addyosmani


text:
Redesign: Update page background panel

Feature Description
See Figma

[ ] Merge with page background size position
[ ] Update title
[ ] Update toggles for media bg
[ ] Update media display for media bg
[ ] Update color for shape bg

Additional Context

Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria

Implementation Brief

Verified in QA

authors: csossi miina

repo: google/web-stories-wp


text:
Remove "Still Empty" Sections

Fixes #520
Waiting for @samitron7  UX confirmation.

@samitron7 I'm arguing we should keep the animation tab and show some "coming soon" message, but merge the elements and shape panel into one (and keep the icon of the shape panel).
I'd like to merge this soon so we can follow up with https://github.com/google/web-stories-wp/pull/657.
@merapi let's not kill the Search boxes yet, as I want to make sure the styling is sound in the other PR first.

Applied latest comments from Slack: remove the element panel, but keep the animations panel

authors: merapi pbakaus


text:
LROs don't work as expected

LongRunningOperations don't work, because we are not setting credentials to the underlying service instances.

Fix is now in GitHub. Will do a release shortly.

repo: googleads/google-ads-dotnet


text:
Content plays before ad

When content is played, we have a few milliseconds of the ad play first, before the content.
As much as this should be expected when the prerollTimout has been reached, we already have our timeout set to 1000ms (overkill, but I wanted to see if it fixed the problem).
Content with this issue can be seen here.
I have dug into it and it seems a script pulled in by the imasdk pulls in a Youtube script that isn't ready for some time after page load. That's the only lead I have, although it might be a red herring.

Hi there,
Is your sample page still requesting ads? When I visit that I'm only seeing the content - no ads.
Also, did you flip "content" and "ads" in your first sentence? I think what you're trying to say is that you see a few milliseconds of content before your pre-roll, but it sounds like you might be saying the opposite.
Thanks,
Shawn

Hello.
Indeed - I mean content -> ad -> content.
It doesn't seem so, you can however see when it becomes ready still.
Looking at the timeline the ima3 script starts at about 960ms (granted, slow). It then only completes, and the ads become available at about 3015ms. I'm trying to find the bottleneck, any ideas?

I'm still not seeing any ads on your site, so I'm not able to replicate - I click play and I just get sent straight to content, no ads at all.

Ah, I forgot to give you think link with the adtest turned on:
(Here it is](http://www.theguardian.com/commentisfree/video/2016/feb/03/social-mobility-is-cruel-heres-why-video?adtest=tom)...

Hmm I'm still not seeing an ad on that page, though I do get this error in the console:
VIDEOJS: ERROR: The "Vpaid" tech is undefined. Skipped browser support check for that tech.

Do you have the adtest=tom querystring?
That uses a cookie to set the ad to play, so that might be a problem if you're blocking them.
The Vpaid error, we're aware of - it doesn't break anything else.
The error is definitely caused by the fact that the timeout is only respected after all the scripts are run that are included from this script itself. It seems like the running order is:

Page loads, IMA script is loaded
Content plays
Scripts included by the ima script are downloaded and finish running
Timeout kicks in, ads downloaded and played.

I do have the adtest=dom query string, and I'm not doing anything to block cookies. What timeout are you referring to when you say "the timeout is only respected after..."?

We are also experiencing a similar issue.
We briefly have playback on the first few frames of the content, before the preroll add kicks in.
We think it could be fixed by pre-warming IMA before playback is initialized.
In our current setup we have a boot strap service that loads the video.js bundle and the plugins we use after user interaction. If we were to pre-warm IMA we would need to be able to do so without video.js dependencies, since we don't want the most of the code loaded, if the user hasn't interacted.

@aronallen - do you have an example to see if I can compare?
See my stats about how long it takes from ima load -> all the scripts stop running, hence I think it is the pre-warming.

Going to close as a duplicate of #178

Asking to reopen due to this example.
The duplicate bug mentions that it's the first frame - whereas this is a few frames.

Updating example to not have all the other gumpf around it.
See here.

@shawnbuso would you prefer another issue?

Hey James,
Same issue is fine - I think it's the same problem in both cases, just that for some reason your video is playing through further before the ad starts.
Thanks,
Shawn

Just to confirm I'm still having this issue, particular with users with a slower Internet connection.  You can see the bug happening if you get a linear ad in these videos:
http://www.wellplated.com/oatmeal-breakfast-bars/
http://mykoreankitchen.com/spicy-cold-kimchi-noodles/
I'm going to increase my timeout to 5000ms like I read in the other referenced thread, but I wanted to note I'm seeing this bug as well.

Have you tried increasing the timeouts as suggested in #178? That's working for me in the other samples provided.
prerollTimeout: 5000, timeout: 5000

I did and it seems to make the problem a lot less noticeable. However, some slower connections, particularly from a user in Australia, noted they're still seeing the content start for about a second before the ad kicks in.

Those timeout contrib-ads options don't work for me. Even manually triggering player.play() causes a blip of content pre the preroll.
The length of the blip seems to vary depending on the length of the content video, ad video, and network speed.
The CSS hack to hide the video content visually works OK, but audio still plays. I've got a rather elaborate hack to solve for this:
.vjs-ad-loading > video { opacity: 0 }

player.on('adstart', function(imaAdStartEvent) {
    // 2. Because startFromReadyCallback() mirrors player volume, we need to override the muted ads volume on start
    imaAdStartEvent.getAdsManager().setVolume(1);
});

player.on('adend', function() {
    // 3. Re-enable volume, restart video from beginning
   player.setVolume(1);
   player.currentTime(0);
   player.play();
});

// 1. mute video before playing it
player.volume(0);
player.play();

This solution is clearly pretty awful! Some research I've been involved in suggests the blip is likely to irritate users, making them less receptive to the preroll ad, reducing creative performance, etc. Not ideal.
@shawnbuso do you think this issue lies with videojs-ima or videojs-contrib-ads?

I think the issue is a combo - the contrib-ads docs make it look like you must call play on the video player before you can play ads, so that's what we do. If it takes us a long time to get those ads then the content will start before we get ads playing. The contrib-ads plugin, however, does have some samples that show pre-rolls playing before calling play on the player, so if we can figure out how those work and refactor our plugin to behave the same way we might be able to fix this, though I think that will be a rather large refactor.

Any progress or new thoughts on this issue? I'm using @steevee's hack which fixes the volume for me but the css doesn't seem to work for me. I've also set the prerollTime and timeout both to 5000 as well

I'm also experiencing this issue too... any new tips?

Hi all,
We've been looking into this one and it looks like it will require a small re-write of the plugin to work with the latest contrib-ads plugin. That should make our current state machine much more simple and allow us to request and play ads without first playing the content video. This is no small task - right now we're hoping to get that work slated for Q4.
Thanks,
Shawn

Hi @shawnbuso, how are you?
Any update about this issue?
I found that 14 days ago a new version was released (0.8.0) this version resolves this problem?
Thanks in advance.
Greetings!

This one's not fixed by 0.8.0 but it will be fixed in 1.0.0, which will be coming before the end of the year. Stay tuned!

Awesome! Thanks! @shawnbuso

Hi  @shawnbuso I saw that the plugin was updated just few hours ago to v1.0.1 I'd like to know if this version is ready for production?
Thanks in advance!

You should be good to go with that new version, but it is a major version change so we recommend testing it before releasing. We changed the API a bit (you no longer have to call play() on the video player, you just need to initialize the plugin with options). I'd recommend taking a look at the updated sample for whichever sample most closely matches your implementation.

I also experienced the same problem.
Currently I do apply a hacky way on play event:
this.player.on('play', function(){
      var currentItem = _THIS.player.playlist.currentItem();
      var currentItemSource = _THIS.playlist;

        if('undefined'!==typeof _THIS.adTagUrl){
          setTimeout(function () {
            _THIS.player.pause();
          }, 200);
          _THIS.player.ima.initializeAdDisplayContainer();
          _THIS.player.ima.setContentWithAdTag(null, _THIS.adTagUrl, true);
          _THIS.player.ima.requestAds();
        }
});

@canhnm are you testing with >1.0.0? This should be resolved as of that release. Thanks!

@shawnbuso Sound great, I tested on 0.8.0
I am going to test with 1.0.1 soon. Thanks!

Sounds good, let me know how it works! Thanks!

I am still seeing this issue on version 1.11.0

It looks like the video only starts before the preroll when autoplay is enabled.

For any1 who is still facing this issue: Just don't use autoplay: true in the player options. Instead call play() when the player is ready.

authors: Klabauterman Sivitas aronallen canhnm ehoch jamesgorrie jonigl joshuairl shawnbuso steevee

repo: googleads/videojs-ima


text:
techName_ Flash - Cannot read property 'hasAttribute' of null at new ImaPlugin

Hi,
When I try and use vpaid ads with flash tech I get this error.
TypeError: Cannot read property 'hasAttribute' of null at new ImaPlugin

My setup is.
videoPlayer.ima({
    id: "video-player",
    adTagUrl: "https://googleads.g.doubleclick.net/pagead/ads?ad_type=video&client=ca-video-pub-4968145218643279&videoad_start_delay=0&description_url=http%3A%2F%2Fwww.google.com&max_ad_duration=40000&adtest=on"
});

// Remove controls from the player on iPad to stop native controls from stealing
var contentPlayer = document.getElementById("video-player_html5_api');
if ((navigator.userAgent.match(/iPad/i) ||
        navigator.userAgent.match(/Android/i)) &&
    contentPlayer.hasAttribute('controls')) {
    contentPlayer.removeAttribute('controls');
}

var startEvent = 'click';
if (navigator.userAgent.match(/iPhone/i) ||
    navigator.userAgent.match(/iPad/i) ||
    navigator.userAgent.match(/Android/i)) {
    startEvent = 'touchend';
}

// Initialize the ad container when the video player is clicked, but only the
videoPlayer.one(startEvent, function() {

    videoPlayer.ima.initializeAdDisplayContainer();
    videoPlayer.ima.requestAds();
    videoPlayer.play();

});

Any suggests?
I have the following setup.
"video.js": "^5.19.1",
"videojs-contrib-hls": "5.5.3",
"videojs-contrib-ads": "~3.1.2",
"videojs-ima": "0.6.0",

Just as a update i am using this with live streaming hls works fine but if i have rtmp set it wont work.
Thanks

Hi there - are you still seeing this issue? If I test your tag in our advanced example it works fine and I don't see the error. If you still have an issue, do you have a sample page I can take a look at?
Also this may be unrelated but we don't yet have support for the HLS plugin alongside the IMA plugin.

I'm having the same issue with that exact error. I'm using the "simple example". The only difference is that I'm using "techOrder": ["flash", "html5"]

Ah ok is that tech order for the video.js player? The IMA plugin only supports the HTML5 video.js player - we don't have support for the Flash player.

Closing this out since it's been a month with no response, but if you're still seeing this issue please feel free to re-open and we can continue to investigate :)

authors: maddhacker24 samueleastdev shawnbuso


text:
Need to stop using grpc.load

grpc.load is deprecated so we need to switch to proto-loader. This refactor was started in #229 but some more work needs to be done.
Also, I'm planning to rethink the idea of COMMON_PROTOS: since proto-loader supports searching in several directories (includeDirs option), this logic can be offloaded to it.
TODO:

Do not use grpc.load.
Simplify COMMON_PROTOS logic.
Make tests pass.
???
PROFIT!

The merged change fails on LRO, still working on a fix.

repo: googleapis/gax-nodejs


text:
Release Google.Cloud.Security.PrivateCA.V1Beta1 version 1.0.0-beta03

Changes in this release:

Commit ac367e2: feat: Regenerate all APIs to support self-signed JWTs

Created release for Google.Cloud.Security.PrivateCA.V1Beta1-1.0.0-beta03

authors: jskeet yoshi-automation

repo: googleapis/google-cloud-dotnet


text:
feat: [meet] new module for meet

Generated with https://github.com/googleapis/google-cloud-java/actions/workflows/generate_new_client.yaml
Command used:
python generation/new_client/new-client.py generate --api_shortname="meet" --proto-path="google/apps/meet" --name-pretty="Google Meet API" --product-docs="https://developers.google.com/meet/api/guides/overview" --api-description="The Google Meet REST API lets you create and manage meetings for Google Meet and offers entry points to your users directly from your app" --transport="grpc"

This was a test

repo: googleapis/google-cloud-java


text:
feat: added iam troubleshooter v3 and v3beta api clients

New policytroubleshooter client protos are in a different folder than v1. Manually adjusting owlbot file to copy over correctly into the existing module
Tested the Owlbot.yaml file locally and it generates the directories for v3/v3beta correctly:

Command to test locally:
docker run --rm --user $(id -u):$(id -g)   -v $(pwd):/repo -v /tmp/googleapis-gen:/googleapis-gen -w /repo   --env HOME=/tmp   gcr.io/cloud-devrel-public-resources/owlbot-cli:latest copy-code   --source-repo=/googleapis-gen   --config-file=java-policy-troubleshooter/.OwlBot.yaml

Tested the Owlbot.yaml file locally and it generates the directories for v3/v3beta correctly:

Did we ever get a library generation requests for v3beta version? If not, maybe just copy the v3 version? WDTY @suztomo?

Tested the Owlbot.yaml file locally and it generates the directories for v3/v3beta correctly:

Did we ever get a library generation requests for v3beta version? If not, maybe just copy the v3 version? WDYT @suztomo?

We did not get an explicit library generation request for v3beta, but v3beta does exist in the public protos, and in general (I think) our policy has been to generate libraries for whatever exists in the public protos. Can update to whichever is preferred.

In the ticket that requests library generation, the path to the directory containing proto is explicitly specified up to a version, isn't it?

In the ticket that requests library generation, the path to the directory containing proto is explicitly specified up to a version, isn't it?

Yes, but for languages like Java we usually automatically update existing modules with new versions as they are published. This library is a bit unique where the new version is published in a different directory than the existing protos, so owlbot didn't catch the new version.

We did not get an explicit library generation request for v3beta, but v3beta does exist in the public protos, and in general (I think) our policy has been to generate libraries for whatever exists in the public protos.

I don't think this is true. There is a language section in each library generation request, which sometimes only include a subset of languages, I did see Java being excluded sometimes.

authors: alicejli blakeli0 suztomo


text:
Query serialization

This PR adds an API to serialize and deserialize Queries to and from RunQueryRequests. The new API endpoints are Query.serializeToProto and Query.fromSerializedProto.

@BenWhitehead This is now ready for review.

I've just pushed a new commit that refactors things so we don't have to depend on FirestoreImpl as the input and allows for Proxy'd instances to satisfy our constraints.

authors: BenWhitehead schmidt-sebastian

repo: googleapis/java-firestore


text:
Using Firebase Cloud Function with Google API

I was able to create a simple speech to text node program and trigger via "node .js".
But i couldn't convert my node program into Firebase cloud function due to the immature skills.
I also posted in StackOverflow for help.
Very appreciated for the helps and insights!

I'm glad to see it looks like you've resolved the issue on StackOverflow!

authors: stephenplusplus weilies

repo: googleapis/nodejs-speech


text:
Set callback as an optional

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

Open Issue ( Issue Number #876 )
Linter Passed

Fixes #876  🦕

Hi @mahmedmushtaq, this part of the library is actually autogenerated, and actually lives here: https://github.com/googleapis/gax-nodejs
Feel free to open an issue on that library to discuss!

authors: mahmedmushtaq sofisl

repo: googleapis/nodejs-translate


text:
chore: update doc page from googleapis.dev to cloud.google.com

Updating the reference documentation website from googleapis.dev to cloud.google.com for the index pages.

Readme changes need to be made, closing for now.

repo: googleapis/python-data-qna


text:
Storage testbench windows support - Multithreading

just for debugging multi threading issue of waitress

Closing this PR as due to some reason commits were not getting reflected in PR even after the force push. Opened #438

repo: googleapis/storage-testbench


text:
Compiling cartographer & cartographer_ros with a customer install directory for protobuf3

I am trying to build/install cartographer and cartographer_ros with a custom location for protobuf3 while not adding the protobuf3 to the install folder. I do not want to add protobuf3 to my current catkin workspace directory as I have different packages depended on the system installation of protobuf2 (If i add protobuf3 to the install directory all works fine, but I need to use a custom location).
I have forked cartographer (see: fork). With this fork and the changes to the cmakelist I am able to compile cartographer but no longer able to compile cartographer_ros due to conflicting version of protobuf. See error:
 error: #error This file was generated by a newer version of protoc which is
 #error This file was generated by a newer version of protoc which is

I feel like I am missing something in the cmakelist of cartographer.

Protobuf has a compiler and a library, all have to match in both cartographer and cartographer_ros builds.
I think you can select which protobuf to use in the cmake flags
 Protobuf_INCLUDE_DIR             /usr/local/include
 Protobuf_LIBRARY_DEBUG           /usr/local/lib/libprotobuf.so
 Protobuf_LIBRARY_RELEASE         /usr/local/lib/libprotobuf.so
 Protobuf_LITE_LIBRARY_DEBUG      /usr/local/lib/libprotobuf-lite.so
 Protobuf_LITE_LIBRARY_RELEASE    /usr/local/lib/libprotobuf-lite.so
 Protobuf_PROTOC_EXECUTABLE       /usr/local/bin/protoc
 Protobuf_PROTOC_LIBRARY_DEBUG    /usr/local/lib/libprotoc.so
 Protobuf_PROTOC_LIBRARY_RELEAS   /usr/local/lib/libprotoc.so

Of course, you would install protobuf3 in a non-system folder, not in /usr/local.
Perhaps your solution is almost working, just look at the (hidden) cmake flags for both cartographer and cartographer_ros.
Yet another alternative solution is the install script here: https://github.com/googlecartographer/cartographer_ros/issues/625#issuecomment-358318701

Closing as answered

authors: gaschler jochemverboom

repo: googlecartographer/cartographer


text:
Update ogre_slice.h

Add three head files. Fix the error during compiling in Arch Linux.

@XuHaiwang Thanks for the PR. Is it not sufficient to add these headers to the .cc?

@XuHaiwang Friendly ping.

hi, it is better that these headers exist in ogre_slice.h because of the GCC version in Arch Linux.

Can you add more details? Which GCC version, what symbols are used in ogre_slice.h which are found in these headers?

authors: XuHaiwang cschuet ojura


text:
Chrome stops feeding camera stream and shows gray background

Here is a video showing a problem I have with these demos:
https://youtu.be/htXAzbYrAkU
When starting any of the demos the background of the webpage turns gray and camera live feed stops. The tracking seems to still work when moving the phone.

Device: Samsung S8 (SM-G950F) and Samsung S7 Edge
Both devices have:

Android version 8.0.0
Chrome Canary version 70.0.3501.0
ARCore version 1.3.180604066
I have turned on the #webxr and #webxr-hit-test flags and nothing else.

The "phone-ar-hit-test.html" and "phone-ar.html" demos work nicely on the immersive-web github page:
https://github.com/immersive-web/webxr-samples/tree/master/proposals
Also the Chacmool demo works at: https://web-education-ar-demo.appspot.com/
Any idea what is causing the problem?

something wrong with shadow. I removed shadow and it started to work

You need three.js >=94 where setFramebuffer was added in order to use render targets with three.js, since before that revision, it assumes the default framebuffer, which is not the case when using AR. This is my guess since it works once removing shadows @vziatkov.
Does that fix your issue as well @jsalli?

Actually, this demo does not yet use three 94 with setFramebuffer yet, hence https://github.com/googlecodelabs/ar-with-webxr/issues/2 this outstanding issue, but there is a workaround for older versions as seen in the demo code of DemoUtils.fixFramebuffer()

I commented out all lines on final/app.js and shared/utils.js which have "shadow" on them and made function createLitScene() in shared/utils.js to return only an empty scene. But still I get the gray background.
@vziatkov Did you do something else to remove the shadows?
I also tried to use the three 94 instead of the three 89 but couldn't make things work. I replaced the line DemoUtils.fixFramebuffer(this); with this.renderer.setFramebuffer(this.session.baseLayer.framebuffer); but that didn't help at all. I also tried couple of other ways but nothing worked.
@jsantell How should I setup the setFramebuffer() function when using three 94?

This sample here uses three 94 + setFramebuffer if you want to see it in action.
Do these demos work for you unaltered? https://googlecodelabs.github.io/ar-with-webxr/final/
Also, you must be using https or localhost since the WebXR API requires those

None of the samples (final, work, step-05, step-06) work from https://googlecodelabs.github.io/ar-with-webxr/ . The same problem with gray background is still there.
I can't make your repo work either on my S8.

I modified your repo's code so that every second tap on the screen removes the fox-object from the scene following tap adds it again. I also removed the reticle-object and the directional light. The only light in the scene is the ambient light which can't cast shadow. I removed also the the fox-object's shadow casting. Also set the the this.renderer.shadowMap.enabled = false
After this when the fox is removed from the scene the camera feed comes back and when the fox is added again the camera live feed disappears.
My dev server is using https (self-generated certificate on local dev machine which does work with other things needing https like getUserMedia() ) so that should not be causing a problem.
Any idea how to get this working? WebXR is a really usuful and we have a use for it in our company so would be really good to get this working. Thanks for all the help :)

try comment //directionalLight.castShadow = true;
How it works for me https://www.youtube.com/watch?v=w9MIDWK175E&feature=youtu.be
https://www.youtube.com/watch?v=S-0fl-Eykbk&feature=youtu.be

@vziatkov Which versions of Chrome Canary and ARCore you have on the S9+?
Have you made other changes to the code than commenting directionalLight.castShadow = true; out ? You are using three 94dev but the original is using three 89. Have you taken the setFramebuffer into use?
I took the original repo of https://googlecodelabs.github.io/ar-with-webxr/final/ in which I commented out the line directionalLight.castShadow = true; in the shared/utils.js. I tried with THREE revisions 89, 91, 94, 94dev and 95dev but none of them fix this.
Also tried this.renderer.setFramebuffer(this.session.baseLayer.framebuffer); in place of DemoUtils.fixFramebuffer(this); in app.js while using THREE 94dev but it didn't work either.

What about https://googlecodelabs.github.io/ar-with-webxr/work/ ? This is a more simple scene (no shadows, shouldn't be prone to issues with setting framebuffers) that should result in a sea of cubes on top of a camera feed

The https://googlecodelabs.github.io/ar-with-webxr/work/ also has the gray background as shown in the image below

The Chacmool demo at https://web-education-ar-demo.appspot.com/ works well as in the image below. It seems to use THREE revision 91

Can anyone else reproduce this? Can it be some combination of ARCore, Chrome Canary and THREE versions that cause this?

This is what I get when trying the https://googlecodelabs.github.io/ar-with-webxr/final/
An image of the Chrome console:

Two adb logcat files of 2 different occasions entering the site, clicking the button to enter AR and placing the fox.
logfile_1.txt
logfile_2.txt
Some lines seem interesting like:
1 W/native: data_synchro.cc:69 Can not add image for camera 0: image-valid status is 1 and image-expiry status is 1.
2 E/chromium: [ERROR:gles2_cmd_decoder.cc(18066)] [.RendererMainThread-0xcb195200]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
@billorr-google Is this of any help? Do you need something else?

This is happening to me as well with the same error on utils.js

@jsalli , yes that is helpful to understand at a very high level what is happening.  Unfortunately, I think I'll need a repro to really investigate.
We're thinking this may potentially be a hardware-specific problem.  For those hitting it, what type of phone are you using?  In particular, what GPU in the phone?
I filed Chrome bug http://crbug.com/867118 to investigate on the Chrome side.

@billorr-google These are our findings:
S8 SM-G950F with GPU: Mali-G71 MP20 Has this error.
S7 Edge: SM-G935F with GPU Mali-T880 MP12 Has this error.
S7 SM-G930F with GPU Mali-T880 MP12 Works well.

@jsantell I confirm all my three devices, including the S8 and the S7 Edge can successfully run the Chacmool demo.

I have Galaxy S9 SM-G960F and the Chacmool demo works successfully, but the ar-with-webxr demo is leading to the grey background screen.

So the differences between the 3 projects that I can see (and mentioning the framebuffer work arounds, although I don't think that's related if this demo from the codelab doesn't require it and still does not work for some folks):

Codelab ❌: three.js r89, uses framebuffer hack in step-05, step-06 and final (not work directory)
Chacmool ✅: three.js r91, puts canvas in fullscreen, uses similar FB workaround used in codelab
web-ar-samples ❌: three.js r94dev, uses three's framebuffer handling

I wonder if using three.js r91 in the codelab/web-ar-samples changes anything, but not optimistic about that.

Changing  codelab/web-ar-samples to use three.js r91 causes the this.renderer.setFramebuffer at line 154 of the reticle.html to be undefined. No problem, I comment that and all the shadow stuff out. After that the same problem appears, gray background. The environmental tracking of ARCore works well like every time before, there is just no camera feed in the background of the page.
Using the codelab/web-ar-samples with  three.js r91 above and setting the page fullscreen when pressing the button and then after the "webkitfullscreenchange"-event running the onEnterAR() makes no difference. Still gray background.
TheChacmool seems to have also two canvases: one with id="gl-canvas" and the other with id="xr-canvas". The "xr-canvas"-canvas is used to get the ctx for the "this.device.requestSession"-function. The "gl-canvas"-canvas is given to the "this.renderer = new THREE.WebGLRenderer" which then handles the rendering of the scene. I don't quite understand why this is done. The "xr-canvas"-canvas is never used for rendering anything it seems.

Some background info on three.js features and WebXR multi canvases:
renderer.setFramebuffer was added to three r94 for WebXR I believe, so that's why there is the fixFramebuffer hack in the demos using r89 and r91, but like you said, not using WebGLRenderTargets (like the shadows in three.js) will alleviate the need for this.
The double canvas technique in Chacmool is necessary for all magic window or mirroring use cases of WebXR, and is a bit confusing. There's a WebGL canvas that you render to (wrap up in three's WebGLRenderer) that doesn't/shouldn't be in the DOM, and gets copied to the XRPresentationContext defined in the device.requestSession({ outputContext: xrPresentCtx }) call -- you can see that in the codelab code as well, with creating an XRPresentationContext, and when we create the WebGLRenderer, that creates its own canvas that we write/render to that never is injected in the DOM

That being said, thanks for checking out those alternatives! Unfortunately it still doesn't seem obvious what the issue is and why Chacmool works. I wonder if there's something in permissions in Chrome that prevents it from displaying the camera feed, since the AR integration is still obviously working, but either way sounds like an issue in Chrome.

This sounds like an issue I am having on my Moto G6 Plus.  I think I'm right in saying that versions up to 69.0.3494.0 work fine, then the grey background appears on later versions.
Maybe this might give a clue as to what change caused the breakage?

I have observed the same gray background problem (with demos step-05, step-06 and work/) on Huawei P20 Android 8.1.0. Chrome canary 70.0.3530.0 and 69.0.3494.0.
After some investigation and experimentation, I commented out "this.renderer.clearDepth()" in onXRFrame(). Then problem has been solved. This also works fine on Google Pixel device.
Is it something to do with THREE.js or may be hardware specific.

I can confirm that commenting out this.renderer.clearDepth() makes it work on my Samsung Galaxy S8 too. Thank you very much for finding this, @sarathsi!

I can confirm this also that commenting out this.renderer.clearDepth() works with demos step-05, step-06 and work on my Samsung Galaxy S8. With final-demo it does not work and the gray background is still there.

In ar-with-webxr example I can see that they have this.renderer.clearDepth(); on onXRFrame (probably added this line after you guys wrote your comments), however, I can still see the gray background.
Chacmool still works fine thought . . .
Chrome Canary (71.0.3562.0)
Samsung Galaxy S9+
Any ideas?

For me removing this.renderer.clearDepth(); did the trick 🤔

Same here on Samsung Galaxy S7, commenting out this.renderer.clearDepth(); fixed the issue.
Works either way on a Nexus 5X.

On the Pixel 3, the camera feed doesn't seem to work properly for any of these demos (chacmool, cubes), the background color changes to a solid color that seems to be a random sampling of the camera feed. (If I point the camera at something red, then entire camera feed background turns red) Has anyone else experienced this?

@dangerbahn that seems to be the case for the last couple of days.
Looks like another Chrome issue.

I've updated the framebuffer fix and removed clear depth. I'm seeing a session failure in Chrome 70 currently (before and after landing #11, will file a chrome bug), but working in 72

Gray screen only (no tracking, no camera) with latest Chrome Canary (and latest ARCore, both through Google Play installations).
Reverted back to Canary 72.0.3592.2 (with latest ARCore through Google Play) to make it work again.

authors: PaulTVungle alon-grinshpoon billorr-google dangerbahn freinbichler jsalli jsantell ranbuch sarathsi vziatkov ybinstock

repo: googlecodelabs/ar-with-webxr


text:
Build list firsts before converting to dataframes

Pandas/numpy tables are not like Python lists - they have a fixed size, so if you build up the table a row at a time, you're resizing it each time you do so, which is very slow. Instead, we build up the data in a Python list, then pass it to pandas.

This is amazing. Thank you. 10x speed compared to before my earlier changes today!

authors: simoncozens yanone

repo: googlefonts/fontquant


text:
packager: make prs draft

In last Thursday's pipeline meeting, @yanone mentioned that he'd like the packager to submit draft prs. We liked the idea since a PR made by the packager made need further tweaking.

Tested on https://github.com/google/fonts/pull/7169

Please include a print statement that informs the user about the draft status of the PR.

repo: googlefonts/gftools


text:
Support interop between v8 and v9+

This enables v8 proxies and relays communicate with v9+ proxies and relays. I'm not sure why the version of quilkin gets bumped to a -dev version each release, as it means we can't just do a point release of this for 0.9 easily, but I'll leave that to others to figure out.

I'll have to add additional debugging for this, I thought it was flakiness but it's consistently happening on the same step of the test but the test output doesn't actually show logs for any of the components.

I'll have to add additional debugging for this, I thought it was flakiness but it's consistently happening on the same step of the test but the test output doesn't actually show logs for any of the components.

If you aren't able to run the tests locally (or it can be useful)
https://github.com/googleforgames/quilkin/blob/339294270abab5d08c273f611913594d8b3cd965/crates/agones/src/lib.rs#L692
Is available to get logs and event data for groups of pods if you want to see what's happening behind the scenes.

authors: Jake-Shadle markmandel

repo: googleforgames/quilkin