sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: kubernetes
Issue: Slow `GVSpec`  called for every object in `kubectl apply`, leading to excessive CPU usage
Labels: sig/api-machinery,triage/accepted

I am trying to apply a YAML file with 2264 objects. They are fairly small; 99996 lines total, or ~44 lines of YAML per object. They are all the same type

This takes 4 minutes to do a dry run. https://flamegraph.com/share/e60dcf49-6a0b-11ef-aba3-6a3d1814cbe4 shows a flamegraph.

The root cause of this is doing a full unmarshal of the OpenAPI v3 document for each input.

A quick hack to cache these results drops this down to only 15s:

```diff
diff --git a/staging/src/k8s.io/client-go/openapi3/root.go b/staging/src/k8s.io/client-go/openapi3/root.go
index 4333e8628f6..9c15fd7df2d 100644
--- a/staging/src/k8s.io/client-go/openapi3/root.go
+++ b/staging/src/k8s.io/client-go/openapi3/root.go
@@ -59,6 +59,7 @@ type Root interface {
 type root struct {
        // OpenAPI client to retrieve the OpenAPI V3 documents.
        client openapi.Client
+       cache map[schema.GroupVersion]*spec3.OpenAPI
 }

 // Validate root implements the Root interface.
@@ -67,7 +68,7 @@ var _ Root = &root{}
 // NewRoot returns a structure implementing the Root interface,
 // created with the passed rest client.
 func NewRoot(client openapi.Client) Root {
-       return &root{client: client}
+       return &root{client: client, cache: make(map[schema.GroupVersion]*spec3.OpenAPI)}
 }

 func (r *root) GroupVersions() ([]schema.GroupVersion, error) {
@@ -93,6 +94,9 @@ func (r *root) GroupVersions() ([]schema.GroupVersion, error) {
 }

 func (r *root) GVSpec(gv schema.GroupVersion) (*spec3.OpenAPI, error) {
+       if c, f := r.cache[gv]; f {
+               return c, nil
+       }
        openAPISchemaBytes, err := r.retrieveGVBytes(gv)
        if err != nil {
                return nil, err
@@ -100,6 +104,7 @@ func (r *root) GVSpec(gv schema.GroupVersion) (*spec3.OpenAPI, error) {
        // Unmarshal the downloaded Group/Version bytes into the spec3.OpenAPI struct.
        var parsedV3Schema spec3.OpenAPI
        err = json.Unmarshal(openAPISchemaBytes, &parsedV3Schema)
+       r.cache[gv] = &parsedV3Schema
        return &parsedV3Schema, err
 }
```

I am submitting this as an issue instead of a PR since I don't really have a clue how this open API stuff is used more broadly, so not sure if an unbounded unconditional cache is appropriate
Repository: flutter
Issue: ScrollViewKeyboardDismissBehavior.onDrag doesn't work when a scroll view is scrollable via AlwaysScrollableScrollPhysics
Labels: platform-android,framework,f: scrolling,has reproducible steps,P2,team-text-input,triaged-text-input,found in release: 3.24,found in release: 3.25

### Steps to reproduce

On a phone:

1. Create a CustomScrollView with AlwaysScrollableScrollPhysics and ScrollViewKeyboardDismissBehavior.onDrag.
2. Add a Sliver inside containing a text field (one that fits on screen even with the keyboard open).
3. Tap inside the text field to make the keyboard appear.
4. Drag inside the scroll view.

### Expected results

The keyboard disappears.

### Actual results

The keyboard stays.

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key, required this.title});
  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(title),
      ),
      body: const CustomScrollView(
        keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
        physics: AlwaysScrollableScrollPhysics(),
        slivers: [SliverToBoxAdapter(child: TextField())],
      ),
    );
  }
}
```

</details>

### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.6.1 23G93 darwin-arm64, locale
    en-CZ)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] Connected device (4 available)
    ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with
      the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!
```

</details>
Repository: flutter
Issue: Inherited Theme: zero rebuilds
Labels: design doc,:scroll:,f: theming

### Document Link

[flutter.dev/go/zero-rebuilds](https://flutter.dev/go/zero-rebuilds)

### What problem are you solving?

- https://github.com/flutter/flutter/issues/89127

<br>

### Sub-issues

- [x] #155849
- [x] #155851
- [x] #155852
- [ ] #155853
Repository: angular
Issue: Generic types of components/directives are inferred as `any` when some corresponding inputs are omitted
Labels: state: has PR,area: compiler,core: inputs / outputs,P3,compiler: template type-checking,bug

### Command

serve

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

I recently started to notice that after introducing `strictTemplates` and `strictNullChecks` in my project, WebStorm still sometimes highlights types incompatibility. So I started investigating whether it's my IDE's problem or not.

Let's assume that we have a method in component, which accepts string as an argument. If we try to call it from a template with `undefined` or `null` explicitly, compiler would throw an error. However, this is not the case when library is involved. In my example [<mat-calendar>](https://material.angular.io/components/datepicker/api#MatCalendar) is used along with `(selectedChange)`.

`$event` can be null. And if I try to call that method with `$event.toString()`, compiler would not complain. Even something like `$event?.toString()` or `$event?.toString() ?? undefined` or `$event?.toString() || undefined` would still be fine for the compiler. At the same time something like `'' || undefined` will trigger a compilation error.

Here is the StackBlitz [link](https://stackblitz.com/edit/4yhgc4?file=src%2Fexample%2Fdatepicker-inline-calendar-example.html). This is a fork from the [official example](https://material.angular.io/components/datepicker/overview#using-mat-calendar-inline).

### Minimal Reproduction

- init strict application with `strictTemplates` & `strictNullChecks`
- create component with a method, which accepts string as a single argument
- call that method from the template using third-party library's component where `$event` can be `null`. E.g. `myMethod($event.toString())`

### Exception or Error

```text
This is what I would actually expect to see in such case, but no error was given.
```


### Your Environment

```text
Angular CLI: 18.2.1
Node: 18.20.3
Package Manager: npm 10.2.3
OS: linux x64

Angular: 18.2.2
... animations, cdk, common, compiler, compiler-cli, core, forms
... localize, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.1
@angular-devkit/build-angular   18.2.1
@angular-devkit/core            18.2.1
@angular-devkit/schematics      18.2.1
@angular/cli                    18.2.1
@schematics/angular             18.2.1
rxjs                            7.4.0
typescript                      5.5.4
zone.js                         0.14.10
```


### Anything else relevant?

_No response_
Repository: excalidraw
Issue: Digital pen eraser button not interacting with Excalidraw
Labels: tablet

I own both a Samsung Tablet and laptop. In my laptop, when I open an Excalidraw drawing, the digital pen's eraser button does perform the erasing action while on the tablet it does nothing.
Repository: pytorch
Issue: reinplacing logging is scary
Labels: triaged,oncall: pt2,module: inductor

"torch/_inductor/fx_passes/reinplace.py:543] [12/1_1] For node _attn_bwd, attempted to reinplace ['DQ', 'DK', 'DV']. We were unable to reinplace []; [] (if non-empty) are possible missed reinplacing opportunities that may be bad for memory usage and performance."

I got asked what this logging message means. This one is positive: all tensors were reinplaced correctly. We should reword it to sound less scary.

cc @ezyang @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire
Repository: go
Issue: runtime: implement procyield as ISB instruction on arm64
Labels: Performance,NeedsInvestigation,arch-arm64,compiler/runtime

When looking into #68578, I found that the implementation of `runtime.procyield` on GOARCH=arm64 uses the `YIELD` instruction, and that the `YIELD` instruction is in effect a (fast) `NOP`.

The current code is at https://github.com/golang/go/blob/9a4fe7e14a4f71267f929c5545916f9830a89187/src/runtime/asm_arm64.s#L917-L923 , and I added a benchmark, `runtime.BenchmarkProcYield`, at https://go.dev/cl/601396 .

The difference in delay between amd64 (slow, using `PAUSE`) and arm64 (fast, using `YIELD`) makes it hard to be confident in the tuning of the `runtime.lock2` spin loop. Note that it's easy to tune the spin loop for the specific duration of a microbenchmark's critical section, which might not be the best tuning for Go overall.

It looks like Rust uses `ISB SY`, https://github.com/rust-lang/rust/blob/d6c8169c186ab16a3404cd0d0866674018e8a19e/library/core/src/hint.rs#L291-L295 , changed in https://github.com/rust-lang/rust/commit/c064b6560b7ce0adeb9bbf5d7dcf12b1acb0c807 . I've confirmed that using `ISB` results in a longer delay on the hardware most easily available to me (M1 MacBook Air), which I'd expect to be a benefit to `runtime.lock2`, both reducing the likelihood of acquiring the lock without a sleep and controlling the electrical energy used to do so.

What I'd most prefer is for Go 1.24 to include a fix for #68578 , and for that to be the _only_ change to `runtime.lock2` in the Go 1.24 cycle (so it's clear whether that change is to blame for any changes in mutex performance). But I'm opening this now so we at least don't lose track of it.

CC @golang/runtime @golang/arm
Repository: go
Issue: os: TestGetwdDeep failures [consistent failure]
Labels: NeedsFix

```
#!watchflakes
default <- pkg == "os" && test == "TestGetwdDeep"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8737801713094473073)):

    === RUN   TestGetwdDeep
        getwd_unix_test.go:57: Getwd len: 262
        getwd_unix_test.go:57: Getwd len: 463
        getwd_unix_test.go:57: Getwd len: 664
        getwd_unix_test.go:57: Getwd len: 865
        getwd_unix_test.go:57: Getwd len: 0
        getwd_unix_test.go:59: getwd: invalid argument
    --- FAIL: TestGetwdDeep (0.07s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: ui
Issue: [bug]: AccordionTrigger throws error with asChild
Labels: bug

### Describe the bug

If you try to use the asChild prop with AccordionTrigger React throws an error because we try to render a icon and our children, but it can only render 1 (Radix limitation)

### Affected component/components

Accordion

### How to reproduce

Add asChild prop to an AccordionTrigger

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
None
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: godot
Issue: Meshes without UV2 cannot block light / contribute to LightmapGI
Labels: discussion,topic:rendering,documentation,topic:3d

### Tested versions

- Tested in Godot 4.3-stable

### System information

Godot v4.3.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; 31.0.15.3742) - Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 Threads)

### Issue description

Meshes that have no UV2, even when the GeometryInstance3D `gi_mode` is set to Static, do not appear to contribute any shadows to the LightmapGI. 
![image](https://github.com/user-attachments/assets/35abca56-f1c4-4b93-b4c1-3adfb0e52f13)

Unwrapping the UV2 does allow things to contribute, but to me this doesn't make any sense. They should still be capable of being rasterized by the lightmapper for direct light even if they have no UV2 to allow for writing to the lightmap, and it should be up to the `gi_mode` to dictate if it is contributing. I'd understand if they couldn't have bounce light when `use_texture_for_bounces` is true, but it should still be visible to the direct light.
![image](https://github.com/user-attachments/assets/5dce82d6-e73c-4660-a6d8-83993a4c9672)

Currently this makes setting up "light blockers", like gobos (although texture gobos wouldn't work anyway without #90109),  or to prevent light bleeding, annoying. You have to make sure they have UV2s, and then having a hint size small to not waste space on the atlas. There doesn't seem to be a better way to do it then that



### Steps to reproduce

Just bake a LightmapGI in a scene with meshes that have no UV2 alongside meshes that do.

### Minimal reproduction project (MRP)

N/A
Repository: flutter
Issue: [iOS] Consider using Skia PathOps to compute path intersections for iOS platform views.
Labels: engine,P2,team-ios,triaged-ios

In https://github.com/flutter/engine/pull/54820#pullrequestreview-2278206731 , we need to fall back to using software rasterized clips when a platform view is impacted by multiple clip paths. The iOS clipping path treats the path values as a union, whereas we need an intersection.

Instead , we could use skia's path ops library to compute the intersected path ourselves. We'd need the original mutator SkPaths for this, but it should otherwise be possible.
Repository: deno
Issue: [webgpu] backend not found when use onnxruntime-web
Labels: bug,webgpu,node compat

Version: Deno 1.46.2

```ts
import { InferenceSession } from "npm:onnxruntime-web";

const modelFile = await Deno.readFile("./model.onnx");

InferenceSession.create(modelFile, {
  executionProviders: ["webgpu"],
});
```
`DENO_FUTURE=1 deno run -A main.ts`

The error:
```
error: Uncaught (in promise) Error: no available backend found. ERR: [webgpu] backend not found.
    at resolveBackendAndExecutionProviders (file:///home/jlucaso/.cache/deno/npm/registry.npmjs.org/onnxruntime-common/1.19.0/dist/esm/backend-impl.js:120:15)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async Function.create (file:///home/jlucaso/.cache/deno/npm/registry.npmjs.org/onnxruntime-common/1.19.0/dist/esm/inference-session-impl.js:180:52)
```
Repository: go
Issue: x/crypto/ssh/test: TestRunCommandStdin failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "golang.org/x/crypto/ssh/test" && test == "TestRunCommandStdin"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8738963458115434353)):

    === RUN   TestRunCommandStdin
        session_test.go:78: session failed: EOF
        test_unix_test.go:246: sshd:
            Error reading managed configuration (2: No such file or directory). Proceeding with default configuration.
            /Users/swarming/.swarming/w/ir/x/t/sshtest1408656954/sshd_config line 10: Deprecated option KeyRegenerationInterval
            /Users/swarming/.swarming/w/ir/x/t/sshtest1408656954/sshd_config line 11: Deprecated option ServerKeyBits
            /Users/swarming/.swarming/w/ir/x/t/sshtest1408656954/sshd_config line 17: Deprecated option RSAAuthentication
            /Users/swarming/.swarming/w/ir/x/t/sshtest1408656954/sshd_config line 22: Deprecated option RhostsRSAAuthentication
            debug1: inetd sockets after dupping: 4, 5
            BSM audit: getaddrinfo failed for UNKNOWN: nodename nor servname provided, or not known
    ...
            debug1: auth_activate_options: setting new authentication options
            Accepted publickey for swarming from UNKNOWN port 65535 ssh2: ECDSA SHA256:DbuSF5a8c3JMmpZ5WiK8oLAx97Uu8zIAFReb/NyTPuo
            debug1: monitor_child_preauth: user swarming authenticated by privileged process
            debug1: auth_activate_options: setting new authentication options [preauth]
            debug2: userauth_pubkey: authenticated 1 pkalg ecdsa-sha2-nistp256 [preauth]
            debug1: monitor_read_log: child log fd closed
            BSM audit: bsm_audit_session_setup: setaudit_addr failed: Invalid argument
            Could not create new audit session
            debug1: do_cleanup
    --- FAIL: TestRunCommandStdin (0.13s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: vscode
Issue: API to expose the shell's actual environment to extensions
Labels: feature-request,api,on-testplan,api-proposal,terminal-shell-integration
Repository: vscode
Issue: SQL syntax highlighting breaks with string inside f-string
Labels: bug,notebook

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: Version: 1.92.2
- OS Version: macOS Sequoia 15.0 public beta 

Steps to Reproduce:

1. When inside a cell of a jupyter notebook, create an f-string to store SQL query text. 
2. As soon as a string is used inside of the f-string, the syntax highlighting breaks

Attached image:
1. Examples of broken syntax, non broken syntax without a string, and .sql file with correct syntax of this example
[syntax_highlighting_bug.pdf](https://github.com/user-attachments/files/16854452/syntax_highlighting_bug.pdf)
Repository: TypeScript
Issue: Adjust relative imports in TypeScript when using copy-paste
Labels: Suggestion,Experience Enhancement

When copying an import from a file, it would be nice if pasting it in another file would adjust the path

Copying the import from `src/folder1/a.ts`:
```
//@filename: src/folder1/a.ts
import { x } from './b';
```

It would be very useful if pasting it in `src/folder2/a.ts` would generate (note how the import path was correctly adjusted):
```
//@filename: src/folder2/a.ts
import { x } from '../folder1/b';
```

This will be very useful once we switch to relative imports starting from tomorrow.
Repository: pytorch
Issue: Setting a `bool` tensor both to `min` and `max` argument of `clamp()` gets error while setting a `bool` tensor only to `min` or `max` argument of `clamp()` works
Labels: triaged,actionable,module: python frontend,module: edge cases

### 🐛 Describe the bug

Setting a `bool` tensor both to `min` and `max` argument of [clamp()](https://pytorch.org/docs/stable/generated/torch.clamp.html) gets the error as shown below:

```python
import torch

my_tensor = torch.tensor([True, False, True, False])

torch.clamp(input=my_tensor,
            min=torch.tensor([False, True, False, True]),
            max=torch.tensor([False, True, False, True])) # Error
```

> RuntimeError: "clamp_cpu" not implemented for 'Bool'

But setting a `bool` tensor only to `min` or `max` argument of `clamp()` works as shown below:

```python
import torch

my_tensor = torch.tensor([True, False, True, False])

torch.clamp(input=my_tensor,
            min=torch.tensor([False, True, False, True]))
# tensor([True, True, True, True])

torch.clamp(input=my_tensor,
            max=torch.tensor([False, True, False, True]))
# tensor([False, False, False, False])
```

### Versions

```python
import torch

torch.__version__ # 2.4.0+cu121
```

cc @albanD @malfet
Repository: PowerToys
Issue: Mouse Without Borders Issues + Question
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.84

### Installation method

GitHub

### Running as admin

None

### Area(s) with issue?

Mouse Without Borders

### Steps to reproduce

I have not seen any errors produced in Event Viewer.

1. After waking from sleep it stops working.

2. Running as a service does not work because I have to open the programs again after a restart to work again.

Question. I only have 2 PCs connected and I want to only control one via the other and not vice versa. Is there a way to accomplish this?



### ✔️ Expected Behavior

_No response_

### ❌ Actual Behavior

_No response_

### Other Software

PC 1: Windows 10
PC 2: Windows 11
Repository: pytorch
Issue: Setting a scalar and a 0D tensor or a 0D tensor and a scalar to `min` and `max` argument of `clamp()` respectively works
Labels: triaged,actionable,module: python frontend,module: edge cases

### 🐛 Describe the bug

Setting a scalar and a 1D tensor or a 1D tensor and a scalar to `min` and `max` argument of [clamp()](https://pytorch.org/docs/stable/generated/torch.clamp.html) respectively gets the error messages as shown below:

```python
import torch

my_tensor = torch.tensor([0., 1., 2., 3., 4., 5., 6., 7.])

torch.clamp(input=my_tensor, min=2., max=torch.tensor([5.])) # Error

torch.clamp(input=my_tensor, min=torch.tensor([2.]), max=5.) # Error
```

```
TypeError: clamp() received an invalid combination of arguments - got (max=Tensor, min=float, input=Tensor, ), but expected one of:
 * (Tensor input, Tensor min = None, Tensor max = None, *, Tensor out = None)
 * (Tensor input, Number min = None, Number max = None, *, Tensor out = None)
```

```
TypeError: clamp() received an invalid combination of arguments - got (max=float, min=Tensor, input=Tensor, ), but expected one of:
 * (Tensor input, Tensor min = None, Tensor max = None, *, Tensor out = None)
 * (Tensor input, Number min = None, Number max = None, *, Tensor out = None)
```

But setting a scalar and a 0D tensor or a 0D tensor and a scalar to `min` and `max` argument of `clamp()` respectively works as shown below:

```python
import torch

my_tensor = torch.tensor([0., 1., 2., 3., 4., 5., 6., 7.])

torch.clamp(input=my_tensor, min=2., max=torch.tensor(5.))
torch.clamp(input=my_tensor, min=torch.tensor(2.), max=5.)
# tensor([2., 2., 2., 3., 4., 5., 5., 5.])
```

### Versions

```python
import torch

torch.__version__ # 2.4.0+cu121
```

cc @albanD