sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: kubernetes
Issue: sample-apiserver returns "$type does not implement the protobuf marshalling interface and cannot be encoded to a protobuf message" error instead of falling back to second Accept type
Labels: kind/bug,sig/api-machinery,priority/important-longterm,lifecycle/frozen

**What happened**:
Creating an example object against the sample-apiserver returns the following error with a default client:
```
test/e2e/framework/framework.go:639
Dec 13 01:57:24.796: creating a new flunders resource
Unexpected error:
    <*errors.StatusError | 0xc0011a4aa0>: {
        ErrStatus: {
            TypeMeta: {Kind: "", APIVersion: ""},
            ListMeta: {
                SelfLink: "",
                ResourceVersion: "",
                Continue: "",
                RemainingItemCount: nil,
            },
            Status: "Failure",
            Message: "object *v1alpha1.Flunder does not implement the protobuf marshalling interface and cannot be encoded to a protobuf message",
            Reason: "NotAcceptable",
            Details: nil,
            Code: 406,
        },
    }
    object *v1alpha1.Flunder does not implement the protobuf marshalling interface and cannot be encoded to a protobuf message
occurred
test/e2e/apimachinery/aggregator.go:396
```

**What you expected to happen**:
The sample-apiserver would fall back to encoding the object in json

**How to reproduce it (as minimally and precisely as possible)**:
* Define a type that does not support protobuf
* Create a client that accepts protobuf,json
* Use that client to submit an object to the server

**Anything else we need to know?**:
Seen in a PR attempting to update the sample-apiserver used in e2e to 1.17.0 levels (https://github.com/kubernetes/kubernetes/pull/84735, https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/84735/pull-kubernetes-e2e-kind/1205296180716638211)

/sig api-machinery
/assign @smarterclayton
Repository: flutter
Issue: Support different dependencies when using flavors
Labels: c: new feature,tool,c: performance,customer: crowd,c: proposal,perf: app size,P3,team-tool,triaged-tool

##  Use case
When building or running with the `--flavor` option we often need to change the logic slightly, and in many cases, we need the ability to change the dependencies as well. Sometimes it's just a small library, but often times it's a large library that we would only want included in a specific flavor of the application. An ads SDK is a good example of this (perhaps a "Pro" and a "Lite" flavor where the only difference was ads).

## Proposal
Instead of spawning different versions of the same app for this, (or creating our own pre-build tools to create a custom `pubspec.yaml`), we want to use flavors to specify different dependencies. After all, the vast majority of the code is the same, so it would be nice to be able to maintain it all in the same place without resorting to other build tricks or app composing strategies. Otherwise, the flavor feature is doing very little other than simply using the native builders with different build settings. In fact, if we need any special config, we still have to "roll our own" solution for that as well. So the way it's implemented right now can be vastly improved to help the Flutter community be even more productive.

NOTE: This is very similar to what is being requested in #21682 (different assets per flavor) but here I'm asking that we implement this same type of control for dependencies as well.
Repository: go
Issue: crypto/tls: add docs detailing the sequence before/after Read()/Write() during TLS handshake
Labels: Documentation,NeedsInvestigation

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.5 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes.


### What did you expect to see?
Documentation (e.g. for Listen()) telling that actual TLS handshake would only occur after Read(), Write() or explicit call to Handshake() as described here: https://github.com/golang/go/blob/c2edcf4b1253fdebc13df8a25979904c3ef01c66/src/crypto/tls/conn.go#L1324


### What did you see instead?
Explicit information only in the Handshake() documentation: https://github.com/golang/go/blob/c2edcf4b1253fdebc13df8a25979904c3ef01c66/src/crypto/tls/conn.go#L1324
Repository: go
Issue: cmd/go: describe difference in `go mod verify` vs verification during 'go mod tidy'
Labels: NeedsInvestigation

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ gotip version
go version devel +ef3ef8fcdf Wed Dec 11 15:43:50 2019 +0000 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ gotip env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="$HOME/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="$HOME/golang/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="$HOME/golang/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/tmp/s/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build777528967=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
tainted the hash in the `go.sum` file in workspace (e.g. modifying the hash values manually) and ran `go mod tidy` and `go mod verify`

### What did you expect to see?

`go mod verify` reports the problem. 

### What did you see instead?
`go mod verify` reports everything is all good.
Thankfully, `go mod tidy` detects the problem.
```
$ go mod verify
all modules verified
$  go mod tidy
verifying golang.org/x/text@v0.0.0-20170915032832-14c0d48ead0c: checksum mismatch
	downloaded: h1:qgOY6WgZOaTkIIMiVjBQcw93ERBE4m30iBm00nkL0i8=
	go.sum:     h1:qgOY6WgZOaTkIIMiVjBQcw93ERBE4m30iBm00nkl0i8=

SECURITY ERROR
...
```

I guess it's because `go mod verify` checks only whether the version in the cache is valid. `go mod help verify` implies that already, but I found this behavior somewhat surprising.
Repository: vscode
Issue: "editor.suggestSelection": "first" does not work as described
Labels: snippets,suggest,under-discussion

<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
**vscode version**

Version: 1.41.0
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T17:58:38.338Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 19.0.0
Steps to Reproduce:

**system os version**

macOS 10.15.1 (19B88)

## Issue

`editor.suggestSelection` does not work as described.
When I type `lv+tab` in the editor then the selected suggestion is not the `lv` snippet which is at the very top instead it suggests a function below it. To select `lv` I have to use the up arrow keys to change the selection. 
This is particularly annoying because typing `iferr`, `for` and `forr` always inserted the correct snippets previously and I frequently used them, now it will always insert something random based on the current context.

![ezgif-6-795b6df54fba](https://user-images.githubusercontent.com/14206503/70816475-dbb92080-1dcf-11ea-91ce-fb5940802cdf.gif)

I have the following user settings defined
```json
{
    "editor.snippetSuggestions": "top",
    "editor.suggestSelection": "first"
}
```


## Current behaviour

`lv+tab` inserts: `client.Redemptions.ListInvoice()`

## Expected behaviour

`lv+tab` should insert: `log.Printf("var: %#+v\n", var)`


<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: IntelliSense does not work at all when extensions are disabled
Repository: flutter
Issue: [web] Shrine login page crash on assert for Chrome on Android
Labels: c: crash,engine,platform-web,c: rendering,P2,team-web,triaged-web

In order to see the console log, use remote devices tab in chrome developer tools.

Run the app:
flutter run -d chrome --local-engine=host_debug_unopt  --web-port=8080
Go to shrine login page. The text editing gives assertion exception in screen_builder.dart

https://github.com/flutter/engine/blob/master/lib/web_ui/lib/src/engine/surface/scene_builder.dart#L227

note: all the page is very slow with ddc. this error is not visible in release mode since the asserts are not there.
note: text editing in other pages still work.
Repository: node
Issue: fs async functions (both callback and promises APIs) return Errors without stack trace
Labels: confirmed-bug,fs

* **Version**: 13.3.0
* **Platform**: Windows 10 x64
```js
const fs = require('fs')
fs.readFile('nonexistentfile', (err) => console.log(err.stack))
```
**What is the expected output?**
The err.stack should contain error text and stack
Same as readFileSync function:
> Error: ENOENT: no such file or directory, open 'nonexistentfile'
>     at Object.openSync (fs.js:446:3)
>     at Object.readFileSync (fs.js:348:35)
> ...

**What do you see instead?**
err.stack only contains error text
> Error: ENOENT: no such file or directory, open 'C:\dev\projects\ntest\nonexistentfile'


`fs.writeFile` have same trouble
Аnother strange thing is that the error text is also different (local/absolute path)
Repository: pytorch
Issue: Script method can't call a scripted function when it is decorated with `@torch.no_grad`
Labels: oncall: jit,triaged

## 🐛 Bug

With the new JIT API, a script method can no longer call a scripted function when it is decorated with `@torch.no_grad`

## To Reproduce

This issue can be reproduced with the example below:

```
$ cat test1.py
import torch
import torch.nn as nn

@torch.jit.script
@torch.no_grad()
def foo(x):
    return x + 1

class Test1(torch.jit.ScriptModule):
    @torch.jit.script_method
    @torch.no_grad()
    def forward(self, x):
        return foo(x)

m1 = Test1()
print(m1.graph_for(torch.zeros(4, 3)))

$ python test1.py
graph(%self : ClassType<Test1>,
      %x.1 : Float(*, *)):
  %2 : int = prim::Constant[value=1]() # /home/selee/conda/envs/plugin/lib/python3.7/site-packages/torch/autograd/grad_mode.py:7:15
  %3 : Float(*, *) = aten::add(%x.1, %2, %2) # /home/selee/conda/envs/plugin/lib/python3.7/site-packages/torch/autograd/grad_mode.py:7:11
  return (%3)

$ cat test2.py
import torch
import torch.nn as nn

@torch.jit.script
@torch.no_grad()
def foo(x):
    return x + 1

class Test2(nn.Module):
    @torch.no_grad()
    def forward(self, x):
        return foo(x)

m2 = torch.jit.script(Test2())
print(m2.graph_for(torch.zeros(4, 3)))

$ python test2.py
Traceback (most recent call last):
  File "test2.py", line 14, in <module>
    m2 = torch.jit.script(Test2())
  File "/home/selee/conda/envs/plugin/lib/python3.7/site-packages/torch/jit/__init__.py", line 1203, in script
    return torch.jit.torch.jit._recursive.recursive_script(obj)
  File "/home/selee/conda/envs/plugin/lib/python3.7/site-packages/torch/jit/_recursive.py", line 173, in recursive_script
    return copy_to_script_module(mod, overload_stubs + stubs)
  File "/home/selee/conda/envs/plugin/lib/python3.7/site-packages/torch/jit/_recursive.py", line 95, in copy_to_script_module
    torch.jit._create_methods_from_stubs(script_module, stubs)
  File "/home/selee/conda/envs/plugin/lib/python3.7/site-packages/torch/jit/__init__.py", line 1423, in _create_methods_from_stubs
    self._c._create_methods(self, defs, rcbs, defaults)
RuntimeError:
undefined value foo:
at /home/selee/conda/envs/plugin/lib/python3.7/site-packages/torch/autograd/grad_mode.py:12:15
    @torch.no_grad()
    def forward(self, x):
        return foo(x)
               ~~~ <--- HERE
```

`test1.py` uses the deprecated JIT API, and `forward` in `Test1` can call the scripted `foo` as expected.
However, `test2.py` uses the new JIT API, and `forward` in `Test2` cannot call the scripted `foo`.

This looks like a regression with the new API.

## Expected behavior

The new API is expected to support it as the old API does.

## Environment

 - PyTorch Version (e.g., 1.0): 1.3.1
 - OS (e.g., Linux): Ubuntu 18.04.3 LTS
 - How you installed PyTorch (`conda`, `pip`, source): `conda`
 - Build command you used (if compiling from source):
 - Python version: 3.7

## Additional context

<!-- Add any other context about the problem here. -->


cc @suo
Repository: pytorch
Issue: pinned memory requires DeviceGuard in multi-process envs
Labels: module: docs,module: multiprocessing,module: cuda,triaged

`THCCachingHostAllocator` mentions that:

https://github.com/pytorch/pytorch/blob/af638ad5d7c8fc9ff97f0ad1cd2bbcfa3ced514e/aten/src/THC/THCCachingHostAllocator.cpp#L85-L88

However @baobablyh discovers that, if multiple processes call pinned memory with the same default device, it could hang either at the pinned memory tensor creation or some subsequent D2H communication (see #31095 for more discussion, #28883 and #30945 for code). We haven't found out the root cause yet, but it looks like pinned memory would have some side effect on the current device. While we continue investigating the root cause, we should add an `N.B.` to the above comments and `pinned_memory` API doc to warn future users/devs.


cc @ngimel
Repository: godot
Issue: AnimationPlayer - Change material properties not work 
Labels: bug,topic:core

**Godot version:**
3.1.2 stable official
**OS/device including version:**
ubuntu 18
**Issue description:**
If you use AnimationPlayer and change during animation the emission property for example, but 
change the material itself during the animation to, this new material does not get the emission property changed.
**Steps to reproduce:**
create an animation to a model with certain material, animate it changing material properties like emission, on another track change the material itself.
Repository: go
Issue: math/rand: documentation on rng.go is lacking important context and information
Labels: Documentation,NeedsInvestigation

<!-- Please answer these questions before submitting your issue. Thanks! -->

### Does this issue reproduce with the latest release?
Yes


### What did you expect to see?
Details about the algorithm used, links to source material, context about why this algorithm was used and how it differs from other methods.


### What did you see instead?
https://github.com/golang/go/blob/c2edcf4b1253fdebc13df8a25979904c3ef01c66/src/math/rand/rng.go#L7-L12
A single vague comment listing two names, without the title of sources used, the name of the algorithm used, or any details whatsoever. The names alone don't seem to be sufficient for finding the source material (at least based on a good amount of googling)
It seems like I'm not the only person having this issue:
https://www.seehuhn.de/blog/134.html

Could provide some more context on what algorithm is being used, why it was chosen, and how it differs from something like mersenne twister? I think it would be valuable knowledge, and a good addition to that documentation.
Repository: flutter
Issue: Readable plural messages in arb files
Labels: framework,a: internationalization,P3,team-framework,triaged-framework

Currently, arb file plural messages are parsed as a single massive string as follows:
`"helloWorlds": "{count,plural, =0{Hello}=1{Hello World}=2{Hello two worlds}few{Hello {count} worlds}many{Hello all {count} worlds}other{Hello other {count} worlds}}"`

However, it would be more readable if it could be something like:
```
"helloWorlds": "{
    count,
    plural, 
    =0{Hello}
    =1{Hello World}
    =2{Hello two worlds}
    few{Hello {count} worlds}
    many{Hello all {count} worlds}
    other{Hello other {count} worlds}
}"
```

The problem with this is that newlines are control characters (see [SO post](https://stackoverflow.com/questions/16690101/can-a-json-value-contain-a-multiline-string) for some clarity) so you cannot have a literal newline within the string. 

This means that a workaround would be something like an array of strings:
```
  "helloWorlds": [
    "count",
    "plural", 
    "=0{Hello}",
    "=1{Hello World}"
    "=2{Hello two worlds}",
    "few{Hello {count} worlds}",
    "many{Hello all {count} worlds}",
    "other{Hello other {count} worlds}"
  ]
```

I'd like to hear some thoughts on what our limitations are with how we can define [arb files](https://github.com/google/app-resource-bundle/wiki/ApplicationResourceBundleSpecification#plural-and-gender-support) such that it adheres to the [ICU standard for plural messages](http://userguide.icu-project.org/formatparse/messages). In other words, if there are alternative suggestions based on experiences with handling plural messages arb files, please feel free to chime in!

I tried concatenating using "+" as in the arb file spec, but using `json.decode` with this formatting resulted in an exception.

cc/ @rami-a @HansMuller
Repository: godot
Issue: "drivers/unix/net_socket_posix.cpp:190 - Socket Error: 10054" while loading a scene that uses NativeScript
Labels: bug,topic:gdextension,crash

**Godot version:** v3.1.2.stable.official 

**OS/device including version:** Windows 10

**Issue description:** While (I suppose) my game is loading NativeScript, it immediately crashes and prints " drivers/unix/net_socket_posix.cpp:190 - Socket error: 10054". It isn't the first time that I use GdNative, in another project GdNative works perfectly.

**Steps to reproduce:**
1. Compile the code on the minimal reproduction project (I am using visual studio 2019, but it worked before)
2. Make a .gdnlib and .gdns file, assign the latter an Area2D

**Minimal reproduction project:**
(I couldn't upload the godot_headers and include folders)
https://github.com/GbaCretin/eve_eternal_rain_bullet/
Repository: go
Issue: x/website/_content: consider reusing repo list from x/build/repos instead of maintaining own hard-coded copy
Labels: NeedsInvestigation

This is an extension of #36047. /cc @bradfitz

There are hard-coded lists in the static templates for `x/website/cmd/golangorg` and `x/tools/cmd/godoc`, e.g.:

https://github.com/golang/website/blob/12a8390500dd3fedb41561111a59df98883b92b9/content/static/packageroot.html#L122-L138

In theory, `x/website` can be modified to get the list of repos from `x/build/repos` and pass that list to the template. However, that would require modifying `golang.org/x/tools/godoc` to either be able to pass data through from `x/website`, or having `golang.org/x/tools/godoc` itself get the list from `x/build`.

There may or may not be a constraint about whether we should add a requirement on `x/build` to `x/tools`, since `x/tools` contains many stable packages, while `x/build` is more internal and less oriented to be imported by library modules (e.g., see #29935).

I don't think it's worth implementing right now, because it's a lot of forced changes and not a lot of benefit. But there are changes planned in order to resolve #29206, and this may become more viable after that. Filing this issue to track this task.
Repository: flutter
Issue: Engine is sending async trace events with id collisions
Labels: engine,e: embedder,P2,team-engine,triaged-engine

Each async event tree should have a unique id (see [Trace Event Format](https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/edit#heading=h.jh64i9l3vwa1))

Events are being sent from the engine with colliding async ids
```
{name: Frame Request Pending, cat: Embedder, tid: 250009, pid: 249458, ts: 269544881397, ph: b, id: 1014a, args: {}},
{name: Frame Request Pending, cat: Embedder, tid: 250009, pid: 249458, ts: 269544897542, ph: e, id: 1014a, args: {}},
{name: PipelineItem, cat: Embedder, tid: 250009, pid: 249458, ts: 269547362701, ph: b, id: 1014a, args: {}},
{name: PipelineItem, cat: Embedder, tid: 250010, pid: 249458, ts: 269547367756, ph: e, id: 1014a, args: {}},
```

These events do not have a parent child relationship, as you can infer by their disjoint timestamps, so they should have different ids. I have only seen this issue on a dream(g3) simulator.
Repository: pytorch
Issue: nn.MultiHeadAttention with different similarity measures
Labels: module: nn,triaged,function request

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

## Motivation

<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->

## Pitch

<!-- A clear and concise description of what you want to happen. -->

Current nn.MultiHeadAttention uses matrix multiplication similarity, i.e., (Q@K.t()), but variants of this similarity are not available directly, for example, 

dot product similarity, i.e., 
```(Q*K.t())```, 

additive similarity, 
```(Wq*Q.t() + Wk*K.t())```, 

general dot product similarity, 
```(Q*W*K.t())```.

These variants should also be in PyTorch.


## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->


cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @zhangguanheng66
Repository: flutter
Issue: Duplicate trace events are being fired
Labels: framework,engine,P2,team-engine,triaged-engine

Example:

I have seen this with Duration events as well as Async events. Sometimes we see an extra begin event, an extra end event, or both.

```
{"name":"PipelineItem","cat":"Dart","tid":250009,"pid":249458,"ts":267504008453,"ph":"e","id":"1124","args":{"isolateId":"isolates/1022783825870871"}},
{"name":"PipelineItem","cat":"Dart","tid":250009,"pid":249458,"ts":267504008453,"ph":"e","id":"1124","args":{"isolateId":"isolates/1022783825870871"}},
```
Repository: godot
Issue: KinematicBody2D can push other KinematicBody2D
Labels: bug,discussion,confirmed,topic:physics

**Godot version:**
3.2, beta 3

**OS/device including version:**
Windows 10

**Issue description:**
A kinematicbody2d can unintentionally move another kinematicbody2d when the latter should not be able to move in a given direction.

**Steps to reproduce:**
Try the example project. Block on the left is stock KinematicBody2D and cannot be moved by the player. Block on the right is the same but with a script to implement gravity. That block can be pushed by player although there is no code to implement its horizontal motion.

**Minimal reproduction project:**
[test_unwanted_pushblock.zip](https://github.com/godotengine/godot/files/3963412/test_unwanted_pushblock.zip)