WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Bug report.

Kubernetes version (use kubectl version):

master

Environment:

Others: CI envionment

What happened:

=== RUN TestDeploymentController_dontSyncDeploymentsWithEmptyPodSelector
E1012 02:19:51.546404 12596 reflector.go:311] pkg/controller/informers/factory.go:73: Failed to watch *extensions.ReplicaSet: unhandled watch: core.WatchActionImpl{ActionImpl:core.ActionImpl{Namespace:"", Verb:"watch", Resource:unversioned.GroupVersionResource{Group:"extensions", Version:"", Resource:"replicasets"}, Subresource:""}, WatchRestrictions:core.WatchRestrictions{Labels:labels.internalSelector{}, Fields:fields.andTerm{}, ResourceVersion:""}}
E1012 02:19:51.556930 12596 reflector.go:311] pkg/controller/informers/factory.go:73: Failed to watch *api.Pod: unhandled watch: core.WatchActionImpl{ActionImpl:core.ActionImpl{Namespace:"", Verb:"watch", Resource:unversioned.GroupVersionResource{Group:"", Version:"", Resource:"pods"}, Subresource:""}, WatchRestrictions:core.WatchRestrictions{Labels:labels.internalSelector{}, Fields:fields.andTerm{}, ResourceVersion:""}}
E1012 02:19:51.561232 12596 reflector.go:311] pkg/controller/informers/factory.go:73: Failed to watch *extensions.Deployment: unhandled watch: core.WatchActionImpl{ActionImpl:core.ActionImpl{Namespace:"", Verb:"watch", Resource:unversioned.GroupVersionResource{Group:"extensions", Version:"", Resource:"deployments"}, Subresource:""}, WatchRestrictions:core.WatchRestrictions{Labels:labels.internalSelector{}, Fields:fields.andTerm{}, ResourceVersion:""}}
--- FAIL: TestDeploymentController_dontSyncDeploymentsWithEmptyPodSelector (0.03s)
deployment_controller_test.go:270: expected deployment controller to not take action

How to reproduce it (as minimally and precisely as possible):

Flake test on #33546 (https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/33546/kubernetes-pull-test-unit-integration/48867/), but can not reproduce locally (Mac).

Issue 2:
The link to the "Pod API object" at the bottom of the Pods page in the user guide points to a page that can't be loaded:

https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/v1.0.1/docs/api-reference/definitions.html#_v1_pod
Issue 1:
Do you want to request a feature or report a bug?

Bug (maybe)

What is the current behavior?

If wrapped in React.StrictMode and a function component contains a call to useState, the function (render) is called twice - even if the state setter is never called.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

https://codesandbox.io/s/lyw9514j4q

(please see console)

What is the expected behavior?

I would expect it to only render once.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

16.8.3 in Chrome on macOS Mojave; requires hooks so not tested with previous versions.

This may be related to #12961 - but note that nowhere am I setting state (only initializing it).

If this is expected behavior please feel free to close. Thank you!

Issue 2:
Do you want to request a feature or report a bug?

Probably a feature, I'd like to know why the useState hook does not have a second argument to compare inputs similar to other hooks.

What is the current behavior?

I'm trying to implement custom hooks for a timer and countdown library that we use at work. However, for this example I would like to describe a more minimal example with a counter that counts up from a provided initial value.

I created a small fiddle with a custom hook useCountUp that takes an initial value and increments it each second. The counter should reset itself, when the initialValue that is passed to the custom hook changes. As the fiddle demonstrates, it is currently not really possible to reset the state of the useState hook. As a hack, the hook compares the inputs in a useMemo function and updates the state in the next useEffect run. This however, leads to a duplicate render, which would not be necessary.

My question: Why did the useState hook API not receive a second argument to use reset the state to the provided initalValue when certain inputs change, similar to useMemo, useEffect and other hooks? Without this, we need to re-render twice with the same state in this example to ensure that the counter's state is consistent.

As a comparison, a Component with render props would have no problems with reseting the state when necessary: https://codesandbox.io/s/3vrpnxo2kq

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

React Version: 16.7.0-alpha.2-next
Issue 1:
TypeScript Version:

1.8.2

Code

foo.ts

var foo: number = "s";

tsconfig.json

{
"compilerOptions": {
"module": "commonjs",
"target": "es5"
},
"exclude": [
"foo.ts"
]
}

Expected behavior:

In an NTVS typescript console application using the above tsconfig.json, and a file foo.ts containing an error, the build and run initiated by Visual Studio should succeed because the file containing the error is excluded.

Actual behavior:

The build fails with an error in foo.ts. Compiling from command line, the build succeeds. Also, if foo.ts is put inside a folder, and the folder is listed in the exclude array, the VS build succeeds.

This is currently breaking projects using the typings tool, because it generates two sets of type definitions, and the other set cannot be excluded.

Issue 2:
Hi,

I think that the ///<amd-dependency /> functionality exhibits odd behavior when combined with an ES6 import.

For example, this TypeScript code:

/// <amd-dependency name="jquery" path="/jquery/jquery.min.js" />
import 'jquery';

$('#myDiv').html('Hello');

emits as this JS when using AMD module mode:

define(["require", "exports", "/jquery/jquery.min.js", 'jquery'], function (require, exports, jquery) {
$('#myDiv').html('Hello');
});

In the emitted JS, the string 'jquery' is included in the requirements for the module (causing an HTTP 404 error at runtime). My expectation would be that 'jquery' here would be considered the same as the 'jquery' inside the amd-dependency comment, so it would be de-duplicated and that only "/jquery/jquery.min.js" would be passed along to the emitted JS.

I can simply remove the ES6-style import and the emit works as expected.

Am I crazy on this?

I know this will probably be moot once #2338 hits.

Possibly related: #4004.
Issue 1:
Debugging an extension does not work if the WiFi adapter is disabled on my laptop. (i.e in airplane mode). I get the message "Cannot connect to runtime process (reason: [object Object])", while the debug window said it could not connect to the debugger.

Additionally it would be nice for the debugging window to give a better message than [object Object], and for it to log the message in the debug console.

Issue 2:
If my wifi is offline or my laptop is in flight mode I am unable to launch the VSCode debugger for debugging extensions.

Steps to repo

Clone a repository with an extension (or yo code)

Restore npm packages

Open extension in VS Code

Press F5

When doing so the following error is displayed:

I've reproduced it on my machine while network disconnected and while in flight mode. Once wifi connectivity is reestablished it works just fine, I didn't close/open VS Code in between.

System info

Windows 10 (latest updates via fast ring)

VS Code 0.10.1

Node.js 4.0.0

npm 3.4.1
Issue 1:
rollaxis has an optional start parameter that, if specified, moves the axis to the position before start. Or, as the documentation puts it

The axis is rolled until it lies before this position. The default, 0, results in a “complete” roll.

(Just by the way: The last sentence is unclear. What's a "complete roll"? Better be explicit: The default, 0, moves the axis to the beginning.)

E.g.,

a = numpy.ones((1, 2, 3, 4))
b = numpy.rollaxis(a, 0, 3)
print(b.shape)

moves the axis at position 0 to the place before position 3, and hence the above will print (2, 3, 1, 4).

This before logic results in the fact that there are always two start indices which will do exactly the same thing, namely numpy.rollaxis(a, i, i) and numpy.rollaxis(a, i, i+1) – nothing. As a trade-off for this duplication, what you can't seem to do is to move the axis in the last place, since there is no axis that comes after.

I used the word seem, because you can actually do numpy.rollaxis(a, i, len(a.shape)) to insert it axis i before the imaginary axis at position len(a.shape). This is not explicitly documented.

On top of that, why is the parameter called start? I have no idea.

Edit The following suggestion is actually just what moveaxis does.

A more consistent approach would be to have a parameter target (or target_position) that can be used to specify the position of axis i after the roll. E.g.,

a = numpy.ones((1, 2, 3, 4))
numpy.rollaxis(a, 0, target=0).shape # (1, 2, 3, 4)
numpy.rollaxis(a, 0, target=1).shape # (2, 1, 3, 4)
numpy.rollaxis(a, 0, target=len(a.shape)) # error
numpy.rollaxis(a, 0, target=-1).shape # (2, 3, 4, 1)

The last example shows how to move the first axis to the last position without recalling len(a.shape).

Issue 2:
In Anaconda3(numpy 1.90).

I think there are something wrong to the results of the matrix inverse function below.

import numpy as np

a = np.mat('1,2,3;4,5,6;7,8,9')

print(a.I.I)

G:\Anaconda3\python.exe C:/Users/4078/test/chap3.22.py

[[ 2.38095238 3.0952381 3.80952381]

[ 2.85714286 3.21428571 3.57142857]

[ 3.33333333 3.33333333 3.33333333]]

And if you change a = np.mat('1,2,3;4,5,6;7,8,9') to a = np.mat('1,2,3;4,5,6;7,8,9.1') or any other number (not Singular matrix)the result would be correct.
Issue 1:
I know there are more than a few target environment options, but was thinking it would be nice if there were some basic targets of "es5" or "es6" so that for modern node/iojs where generators and other es6 features are in the box, they can be used (as well as newer browsers)...

I'm just thinking it would be nice if there were a less boilerplate option for those environments that have the needed capabilities... or for that matter, a self-detecting browser shim for a few different classes...

IE9 and IE10 need a lot more than say current chrome/ff or ie-edge. And node 0.xx more than iojs 2.x ... Just a small wishlist, and just some ideas on this.. I'm sure it's probably been discussed

Issue 2:
Possibly through a blacklistUserAgent option or something. Would use the kangax compat-table. Important to note that it does not guarantee complete spec compliancy on the vendors end.

References:

https://github.com/kangax/compat-table

https://github.com/Fyrd/caniuse

https://github.com/3rd-Eden/useragent
Issue 1:
This code worked with babel 5.x and doesn't with babel 6.x. The expectation is that countdown1 and countdown2 both produce the same results:

'use strict';

function sleep(timeout) {
return new Promise(function (resolve, reject) {
setTimeout(function () {
resolve();
}, timeout);
});
}

const countdown1 = async function (count) {
console.log(count);
await sleep(1000);
if (--count) {
await countdown1(count);
}
};

async function countdown2(count) {
console.log(count);
await sleep(1000);
if (--count) {
await countdown2(count);
}
};

countdown1(5)
.then(function () {
console.log('countdown1 done');
return countdown2(5);
})
.then(function () {
console.log('countdown2 done');
});

From the produced code, it looks like the transformed countdown2 is getting shadowed by inner functions using the same name.

Issue 2:
If named async function recursively calls itself by name then the compiled code is wrong.

Workaround is to assign anonymous async function to a variable and do recursive calls via that variable.

Problematic code:

async function x( a ) { if ( a ) return a; else return await x( 42 ); }
x().then( a => console.log( a ) )

Output:

> GeneratorFunctionPrototype { _invoke: [Function: invoke] }

But:

const x = async function ( a ) { if ( a ) return a; else return await x( 42 ); }
x().then( a => console.log( a ) )

Output:

> 42
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Mark TextField as an error state when form validation fail

Current Behavior

Do nothing when in an error state

Steps to Reproduce

https://codesandbox.io/s/qk17pp2vlq

Context

I'm looking for a simplest approach to do a validation on my project and I would like to hear some feedback about this way.

I have searched on issues but found nothing about that... sorry if out of topic and please put me on the right way

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)

Your Environment

Tech
Version

Material-UI
^1.0.0-beta.29

React
^16.2.0

react-router
^4.2.0
Issue 1:
mRequestOptions = new RequestOptions();
mRequestOptions.transform(new RoundedCorners(8));

Glide.with(mContext).load(url).apply(mRequestOptions).into(iv);

Issue 2:
In library module I need to use glide loading with generated API customization.

Using AppGlideModule class runs to Duplicate entry ZipException in main app, LIbraryGlideModule not generate any class to use Glide loading in library module.

How can I use Glide customized loading in my android library module?
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When consuming packages with both transpiled and untranspiled modules, as defined in their package.json with main: pointing to the transpiled version and module: pointing to the untranspiled one, Next5 picks up the module: entry. I'm expecting Next to pick the main entry.

Current Behavior

Next5 picks up the module: entry.

Steps to Reproduce (for bugs)

Install a package that has both main: and module: defined in a package.json. For example:

main: 'dist/index.js'
module: `src/index.js`

Check that Next.js picks up src/index.js instead of dist/index.js

Context

Your Environment

Tech
Version

next
5.0.0

node
8.9.4

OS
macOS 10.13.2

browser
Firefox 58.0.2

etc

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

should have a asPath key in url object as documented

Current Behavior

url.asPath does not exist

Context

I noticed there's already a PR merged for this issue, but it requires breaking change (next@4 & react@16)

It's not easy to upgrade for big projects since Enzyme v3 has some bugs when rendering react16.

While finding workaround or helping them to fix it, I'm wondering is it possible to release a patch for v3?

Thanks!

Your Environment

Tech
Version

next
3.2.2

node
8.4.0
Issue 1:
Perhaps a re-opening of #15123, (which we thought was a duplicate of #15895,) but also may be a new issue.

Worth noting this is only happening when nodes are at 1.1; when nodes are at 1.0, these tests pass.

See kubernetes-upgrade-1.0-1.1-gke-step5-e2e-old Jenkins job:

Kubectl client Update Demo should scale a replication controller

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:107
Resources left running after stop:
update-demo-nautilus-dh1ty 0/1 Error 0 27s
update-demo-nautilus-uhtk0 0/1 Error 0 7s

Kubectl client Update Demo should create and stop a replication controller

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:93
Resources left running after stop:
update-demo-nautilus-aaq9h 0/1 Error 0 9s
update-demo-nautilus-obcb9 0/1 Error 0 9s

Kubectl client Guestbook application should create and stop a working application

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:138
Resources left running after stop:
frontend-3a81w 1/1 Running 0 1m
frontend-milh3 1/1 Running 0 1m
frontend-mjcix 1/1 Running 0 1m

Kubectl client Kubectl label should update the label on a resource

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:217
Resources left running after stop:
nginx 0/1 Error 0 17s

Kubectl client Simple pod should support port-forward

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:153
Resources left running after stop:
nginx 0/1 Error 0 16s

Kubectl client Simple pod should support exec

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:153
Resources left running after stop:
nginx 0/1 Error 0 17s

cc @mikedanese

Issue 2:
See: https://github.com/kubernetes/kubernetes/blob/v1.6.0-alpha.0/pkg/master/controller.go#L126

This code should make several attempts before Fatalfing. Alternatively, we could consider not listening for connections until this code has succeeded.
Issue 1:
📝 Provide a description of the new feature

I do like when there is a few icons in my traybar but they are informative for me. Unfortunately, PT isn't in this list. So I would like to have an ability to hide icon like in most applications like NVIDIA Control Panel, PhysX, etc.

Would it be possible?

Thanks in advance!

If you'd like to see this feature implemented, add a 👍 reaction to this post.

Issue 2:
Just an option to hide the system tray icon directly in the settings of the app.

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Issue 1:
It failed in gce suite. I honestly have no idea under which team it falls: @bgrant0607 @thockin @ixdy @wojtek-t.

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/es_cluster_logging.go:46 Nov 27 02:50:59.145: Failed to find all 300 log lines

Issue 2:
What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): secret permission mode

Kubernetes version (use kubectl version):

v1.5.0-alpha.0.1251+e05e8664d5dd7a

Environment:

OS (e.g. from /etc/os-release): Red Hat Enterprise Linux Server 7.2

Kernel (e.g. uname -a): 3.10.0-327.22.2.el7.x86_64

What happened:

Didn't handle invalid permission mode: '0008' properly. I think we don't need to change to 0010 with octonary number in here. We should add limitation for these invalid value, such as 8 and 9. For reference, linux os doesn't allow user set "chmod 008" always.

How to reproduce it (as minimally and precisely as possible):

1. Create a secret: kubectl create -f secret.yaml

apiVersion: v1
kind: Secret
metadata:
name: test-secret
data:
data-1: dmFsdWUtMQ0K
data-2: dmFsdWUtMg0KDQo=

2. Create a pod with specifying secret permission mode(0008): kubectl create -f secret-permission-pod.yaml

apiVersion: v1
kind: Pod
metadata:
name: secret-permission-pod
spec:
containers:
- name: secret-permission-pod
image: redis
volumeMounts:
- name: foo-volume
mountPath: "/etc/foo"
volumes:
- name: foo-volume
secret:
secretName: test-secret
defaultMode: 8

Actual results:

Created succeful and set 0010 for files in secret volume.

# kc create -f secret-permission-pod.yaml
pod "secret-permission-pod" created
# kc get pod
NAME READY STATUS RESTARTS AGE
secret-permission-pod 1/1 Running 0 19s
# kc exec -it secret-permission-pod sh
# ls -l /etc/foo/..data/
total 8
------x---. 1 root root 9 Sep 26 05:13 data-1
------x---. 1 root root 11 Sep 26 05:13 data-2

Expected results:

Pod should be created failed with properly warnning info.
Issue 1:
Challenge Factorialize a Number has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.26.2840.71 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

var factor =1;
function factorialize(num) {
for (var i=1; i<=num; i++){
factor *=i;
}
return factor;
}

factorialize(10);

Issue 2:
Challenge Factorialize a Number has an issue.

User Agent is: Mozilla/5.0 (Windows NT 5.1; rv:47.0) Gecko/20100101 Firefox/47.0.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

var count=1;
function factorialize(num) {
for(var i=1; i<=num;i++){

count= count * i;

}
return count;

}

factorialize(0);
Issue 1:
Similar to how npm uninstall works, I would like this feature to be added. You can pass the full URL used during the installation. Examples:

$ deno uninstall https://deno.land/std/node/module.ts # Uninstall via URL
$ deno un https://deno.land/std/path/mod.ts # Shorthand for `uninstall`

This way, we can uninstall modules faster rather than browsing the ~/.deno/bin directory and uninstall the desired module

Issue 2:
As the title says: I have an API program which I want to turn into a single executable using deno compile. Everything works fine when using deno run, but using deno compile produces an executable which fails with:

error: Uncaught SyntaxError: Identifier 'i2' has already been declared
at file://$deno$/bundle.js:7872:0

I've managed to narrow the error down to the following fragment:

export { Database } from 'https://deno.land/x/denodb@v1.0.18/mod.ts';

console.log('Hello world.');

The export is the issue. Changing this to an import makes the binary work. (In the original program this export is in my deps.ts, so changing it to import is not an option.) It also seems to happen only with denodb, but I'm not sure about what exactly triggers this.

Any ideas on how to further debug this?
Issue 1:
Electron version: 0.37.5

Operating system: Windows 10

Hi! Here's a minimal Electron app to reproduce the bug: electron-webview-resize-bug.zip

Run the app

Click the button to hide the webview

Resize window

Click the button again to show webview

Bug: Notice the webview hasn't been resized (if you resize the window now then the bug disappears)

GIF demo:

Actual use case where I hit the bug: tabbed UI with hidden <webview>s for non-active tabs.

Bonus bug found while creating the testcase:

Remove the <script>...</script> tag in index.html

Launch the app

Bug: The webview doesn't show up at all.

Try reloading with Ctrl+R, still doesn't show up

Open devtools with Ctrl+Shift+I.

Try realoding with Ctrl+R, notice the webview shows up.

The absence of a script / not having the devtools open seems to prevent the webview from showing? ¯_(ツ)_/¯

Issue 2:
I have a very little demo like this:

<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<webview src="https://www.google.com/" autosize="on" minwidth="576" minheight="432"></webview>
</body>
</html>

When I run the application, I get a blank page, nothing displayed. But if I add some script to the page, the webview will render. e.g.:

<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<script>console.log("Hello World");</script>
<webview src="http://www.baidu.com/" autosize="on" minwidth="576" minheight="432"></webview>
</body>
</html>
Issue 1:
Ran into the same problem #2315 , that's what I Deno.run:

clang -std=c++2a -g -IC:\Users\rs\***\***\*** -c -fno-exceptions -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-c99-extensions -fsanitize=address C:\Users\rs\***\Projects\***\***\src\node.cc -o C:\Temp\***\temp\src\node.cc.o

deno --version
deno 1.4.1
v8 8.7.75
typescript 4.0.2

systeminfo
...
OS Name: Microsoft Windows 10 Home Single Language
OS Version: 10.0.19041 N/A Build 19041
...

code: https://deno.land/x/buildsystem@0.1.5/mod.ts#L411

Issue 2:
Reproduction

Generate test file:

echo "hello world" > file.txt
for i in {1..10}; do cat file.txt file.txt > file2.txt && mv file2.txt file.txt; done

create test.js

const proc = Deno.run({
cmd: ["cat", "test.json"],
stdout: "piped",
stderr: "piped"
});

const status = await proc.status();

run test.ts

deno --allow-run test.js

Deno gets stuck on await proc.status().