sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: kubernetes
Issue: Default RBAC role "admin" does not allow for ephemeral container usage
Labels: kind/documentation,sig/node,sig/security,needs-triage

### What happened?

Hey folks,
I noticed the default clusterrole admin does not have enough permissions for the newish Ephemeral Containers functionality https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/277-ephemeral-containers/README.md

My team provides an EKS-based platform for development teams in which we provision a namespace (e.g. "bogus") and grant them the default ClusterRole of "admin" inside that namespace via a RoleBinding to a Group, and then use aws-auth to map an AWS IAM Role to the respective group. 

The role has this subset of APIs "write-enabled" for the Pods endpoints:

```
- apiGroups:
  - ""
  resources:
  - pods
  - pods/attach
  - pods/exec
  - pods/portforward
  - pods/proxy
  verbs:
  - create
  - delete
  - deletecollection
  - patch
  - update
```
My expectation is that every namespaced Kubernetes functionality would be available to those users.

### What did you expect to happen?

Users should be able to use `kubectl debug` to debug any pods with in their namespace if they have the default ClusterRole admin bound to a namespace with a RoleBinding, or use it in any namespace with a ClusterRoleBinding.

### How can we reproduce it (as minimally and precisely as possible)?

- Get a RoleBinding in namespace foo to the default ClusterRole admin with a subject that you can easily authenticate as.
- Follow the necessary authentication method to access the cluster with that subject.
- kubectl run nginx --image=nginx --restart=Never -n foo
- kubectl debug nginx -it --image=nginx -n foo

You will get a forbidden error such as

```
Error from server (Forbidden): pods "nginx" is forbidden: User "foo-admin" cannot patch resource "pods/ephemeralcontainers" in API group "" in the namespace "foo"
```

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean", BuildDate:"2022-11-09T13:36:36Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"24+", GitVersion:"v1.24.16-eks-2d98532", GitCommit:"af930c12e26ef9d1e8fac7e3532ff4bcc1b2b509", GitTreeState:"clean", BuildDate:"2023-07-28T16:52:47Z", GoVersion:"go1.20.6", Compiler:"gc", Platform:"linux/amd64"}
```

</details>


### Cloud provider

<details>
AWS
</details>


### OS version

<details>

```console
Darwin Jos-Maias-MacBook-Pro-M1.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 arm64
```

</details>
Repository: TypeScript
Issue: SARIF output for tsc failures
Labels: Suggestion,Awaiting More Feedback

### 🔍 Search Terms

sarif

### ✅ Viability Checklist

- [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [X] This wouldn't change the runtime behavior of existing JavaScript code
- [X] This could be implemented without emitting different JS based on the types of the expressions
- [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

### ⭐ Suggestion

Today the `@typescript-eslint/eslint-plugin` plugin will not output errors that happen during compile time. This is [by design](https://github.com/typescript-eslint/typescript-eslint/issues/352).

So in my CI (Github Actions) I use eslint but I also need to run a `tsc --noEmit` in order to check compile-time errors.

Ok so far. The pipeline will fail and PR merge will be prevented.

Let's make the developer experience better. Today, in case of a failure in `tsc --noEmit`, the developer will need to read the step logs to see the failures of the command. 

ESlint already supports the `@microsoft/eslint-formatter-sarif` to output SARIF format outputs in case of failures and github can take those failures and beautifully display them in the PR for the developer. [Link to the Github feature](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning). I already use that for eslint and the typescript plugin.

My feature request is for `tsc` CLI to have same functionality and output SARIF format files in the output if requested. This can be a flag or implement an interface where output formatters can be implemented separately like ESlint.

### 📃 Motivating Example

This feature improves the developer experience around the git workflow in Github and in any other version control system.

### 💻 Use Cases

Showed in the suggestion
Repository: vscode
Issue: clarity changing 
Labels: bug,upstream,editor-rendering,gpu,chromium,mitigated


![image_2023-09-27_154752513](https://github.com/microsoft/vscode/assets/143600998/2f220f8e-a551-4f49-ab2d-2c22aea993a9)
<img width="1280" alt="Screenshot 2023-09-27 154737" src="https://github.com/microsoft/vscode/assets/143600998/3ada6713-8f74-4eb3-bb10-f054bf9f7883">


on my vsc word clarity changing badly 

VS Code version: Code 1.82.2 (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:55:25.390Z)
OS version: Windows_NT x64 10.0.22621
Repository: pytorch
Issue: ValueError: args contained 2 None's after flattening. When exporting a ScriptModule or ScriptFunction, no args may be None because that breaks type propagation.
Labels: module: onnx,module: nn,triaged

### 🐛 Describe the bug

when I export model to ONNX I found the error `RuntimeError: ScalarType UNKNOWN_SCALAR is an unexpected tensor scalar type`.
then I debug 1 line to 1 line , I found `torch.nn.MultiheadAttention` thrown it !

I pick a small unit to debug it 
```python
import torch
from torch import Tensor, nn
d_model = 256
dropout = 0.0
n_heads = 8
model = nn.MultiheadAttention(d_model, n_heads, dropout=dropout) 

tgt = torch.randn(6, 1, 256, dtype=torch.float32)
q = torch.randn(6, 1, 256, dtype=torch.float32)
k = torch.randn(6, 1, 256, dtype=torch.float32)

args = (
    tgt, q, k
)

scripted_model = torch.jit.script(model)
scripted_model.save("model.pt")
torch.onnx.export(model=scripted_model, args=args, f="model.onnx", verbose=True,opset_version=17)
```
then an error thrown 
```sh
=========== Diagnostic Run torch.onnx.export version 2.1.0a0+b5021ba ===========
verbose: False, log level: 40
======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================

Traceback (most recent call last):
  File "script_save_export_onnx.py", line 331, in <module>
    torch.onnx.export(model=scripted_model, args=args, f="model.onnx", verbose=True,opset_version=17)
  File "/usr/local/lib/python3.10/dist-packages/torch/onnx/utils.py", line 507, in export
    _export(
  File "/usr/local/lib/python3.10/dist-packages/torch/onnx/utils.py", line 1567, in _export
    graph, params_dict, torch_out = _model_to_graph(
  File "/usr/local/lib/python3.10/dist-packages/torch/onnx/utils.py", line 1124, in _model_to_graph
    graph, params, torch_out, module = _create_jit_graph(model, args)
  File "/usr/local/lib/python3.10/dist-packages/torch/onnx/utils.py", line 968, in _create_jit_graph
    _check_flatten_did_not_remove(args, flattened_args)
  File "/usr/local/lib/python3.10/dist-packages/torch/onnx/utils.py", line 956, in _check_flatten_did_not_remove
    raise ValueError(
ValueError: args contained 2 None's after flattening. When exporting a ScriptModule or ScriptFunction, no args may be None because that breaks type propagation.
```


### Versions

docker pull nvcr.io/nvidia/pytorch:23.07-py3

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: next.js
Issue: Bugs with heuristic to "detect file by whether it has a dot" with trailingSlash
Labels: bug,Navigation

### Link to the code that reproduces this issue

https://github.com/taoky-playground/nextjs-remove-trailing-with-dot-bug

### To Reproduce

1. ~~`next export`~~ `yarn build`
2. In exported `index.html`:
    ```html
    <div><a href="/a/">a/</a><br/><a href="/b.git">b.git/</a></div>
    ```
    While:
    ```console
    > ls out/
    404/  404.html  _next/  a/  b.git/  favicon.ico  index.html
    ```

### Current vs. Expected behavior

Current: `<a href="/b.git">b.git/</a>`

Expected: `<a href="/b.git/">b.git/</a>`

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Wed, 13 Sep 2023 08:37:40 +0000
Binaries:
  Node: 18.13.0
  npm: 8.19.3
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 13.5.4-canary.1
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Routing (next/router, next/navigation, next/link)

### Additional context

Related (they are all locked):
- https://github.com/vercel/next.js/issues/31472
- https://github.com/vercel/next.js/issues/25103
- https://github.com/vercel/next.js/pull/14681

It is fundamentally broken to "detect file" by checking whether it has a `.` or not -- this is not a Windows-only world, after all. Although most HTTP server could help redirect to the URL with a trailing slash:

- It takes an extra HTTP request.
- This is not fully supported by all servers -- for example, our project is deployed on Cloudflare Pages and unfortunately, it just throws a HTTP 404 in this case.

Thus I believe that https://github.com/vercel/next.js/blob/3eadfe925bb49e116f1b97d81a1d51fa0e33166d/packages/next/src/client/normalize-trailing-slash.ts#L15 shall be removed (who will intentionally put a trailing slash after a file?).
Repository: go
Issue: proposal: testing: add TB.CleanupErr
Labels: Proposal

https://github.com/golang/go/issues/32111 added `TB.Cleanup`, which I find really useful. However, more often than not I actually have a `func() error` rather than a `func()` - and I want the cleanup to fail the test if a non-nil error appears.

Right now you can sort of get away with this by either ignoring the error, e.g. `t.Cleanup(func() { returnsErr() })`, or something similar which checks the error and calls `t.Error` if it's not nil.

```
t.Cleanup(func() {
    if err := returnsErr(); err != nil {
        t.Error(err)
    }
})
```

I'm left wishing for `t.CleanupErr` taking `func() error` due to this being a relatively common scenario in my experience - then I could do e.g. `t.CleanupErr(returnsErr)`, or `t.CleanupErr(f.Close)`, or `t.CleanupErr(cmd.Wait)`, or `t.CleanupErr(proc.Kill)`, etc.

The API would call `TB.Error` instead of `TB.Fatal` if an error is returned, since we still want all cleanups to run even when some of them fail. If an early cleanup fails and makes others fail as well, getting more errors is better than skipping some cleanups and potentially not releasing/deleting resources.

In https://github.com/golang/go/issues/32111#issuecomment-535419156, @egonelbre suggested that `TB.Cleanup` should have taken `func() error` from the start, and I _disagreed_ with that, funnily enough :) I've changed my mind since then per the above. It's worth noting that I still think the `func()` form is useful - plenty of use cases don't return an error, such as `t.Cleanup(cancel)` or `t.Cleanup(func() { global = nil })`.

Worth noting that this should also make cases where parameters are involved simpler, even if a func literal would still be needed. For example,

```
t.Cleanup(func() {
    if err := os.Chdir(orig); err != nil {
        t.Error(err)
    }
})
```

could become just `t.CleanupErr(func() error { return os.Chdir(orig) })`, avoiding the need for multiple lines.

I'm also reminded of the new `sync.OnceX` APIs too - `OnceFunc` takes `func()`, `OnceValue` takes `func() T`, `OnceValues` takes `func() (T1, T2)`. I don't think generics make sense here, since the testing package can only do something reasonably useful with an error.
Repository: pytorch
Issue: Add _worker_end_fn_t to the DataLoader
Labels: module: dataloader,triaged,module: data

### 🚀 The feature, motivation and pitch

For my particular use case, I need the dataset to perform some operations when the data loaders workers are terminated. When the `iteration_end` value in the `worker.py` file is True.

Similar to `_worker_init_fn_t` for setting the seeds, I would like to have a `_worker_end_fn_t`  that takes the dataset as an argument.

### Alternatives

I haven't considered any other solutions but right now, I need to patch PyTorch.

### Additional context

This is required for the dataset to persist some data on termination.

cc @SsnL @VitalyFedyunin @ejguan @dzhulgakov
Repository: storybook
Issue: [Bug]:  Controls are not resettable if 'Reset control’ is pressed in RAW object opened mode
Labels: bug,good first issue,help wanted,addon: controls,sev:S3

### Describe the bug

If we open RAW mode and add new item and after that we want to reset the source won't work, beside that on UI works.

Repo steps:
1. Add other items in the "Items list" source.
2. Click on "Reset Controls".

Actual: Items which were added are not deleted from the source if we click on "Reset Controls".

Expected: If we click on "Reset Controls", items should be deleted from the source.

*Note:  we need to close the RAW mode in order to reset the source.

See below video example:
https://github.com/storybookjs/storybook/assets/64419619/b3452fa1-c9e0-41ed-a733-6a9ac0666702



### To Reproduce

Repo steps:
1. Add other items in the "Items list" source.
2. Click on "Reset Controls".

Actual: Items which were added are not deleted from the source if we click on "Reset Controls".

Expected: If we click on "Reset Controls", items should be deleted from the source.

### System

```bash
Environment Info:

  System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
  Binaries:
    Node: 18.17.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (117.0.2045.43)
  npmPackages:
    @storybook/addon-actions: 7.0.20 => 7.0.20
    @storybook/addon-backgrounds: 7.0.20 => 7.0.20
    @storybook/addon-controls: 7.0.20 => 7.0.20
    @storybook/addon-links: 7.0.20 => 7.0.20
    @storybook/addons: 7.0.20 => 7.0.20
    @storybook/angular: 7.0.20 => 7.0.20
```


### Additional context

Saw an issues that looks mostly the same as mine which was closed:
https://github.com/storybookjs/storybook/issues/17616
Repository: PowerToys
Issue: Keyboard shortcut remapping doesn't work after pressing calculator keyboard key
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Priority-2

### Microsoft PowerToys version

0.74.0

### Installation method

Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

While the remapped shortcuts are working, press the special calculator key given on my laptop and the remapped shortcuts don't work anymore.

### ✔️ Expected Behavior

Alt + Q mapped to Alt + F4.
Alt + Q closes the window in focus.

### ❌ Actual Behavior

Alt + Q doesn't close the window in focus.

### Other Software

_No response_
Repository: flutter
Issue: Separate creation of flutter SDK and release of flutter SDK into their own recipes
Labels: P2,team-release
Repository: flutter
Issue: Upload artifacts into a different bucket before provenance validation
Labels: P2,team-release
Repository: vscode
Issue: Command center - make it leaner?
Labels: under-discussion,command-center

Love the command center, but my biggest issue is the height in pixels. It just takes too much of my screen real estate.
Could we save a couple of pixels to make it look lean? This way the title area looks too bloated compared to other apps.

@hediet had similar concerns

fyi @hbons @joaomoreno 

![Screenshot 2023-09-27 at 17 28 21](https://github.com/microsoft/vscode/assets/1926584/8cdbbe68-09d2-406a-9f1b-becf3b377bd7)
Repository: next.js
Issue: Pages router API routes memory leak
Labels: bug

### Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/stoic-shadow-pzvg4w?file=%2Fpages%2Fapi%2Fupload.js%3A13%2C3

### To Reproduce

1. Start the production server
2. Open the url
3. Select a very large file (4GB or above) and click upload

### Current vs. Expected behavior

When an upload fails, the data stored inside memory for the failed API call should be freed (.i.e through garbage collection or somthing else). However it stays inside the memory indefinitely.

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 22.6.0: Fri Sep 15 13:39:54 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T8112
Binaries:
  Node: 18.18.0
  npm: 10.1.0
  Yarn: 1.22.19
  pnpm: 7.14.0
Relevant Packages:
  next: 13.5.3
  eslint-config-next: 13.5.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Additional context

I tested this on CodeSanbox, local machine, inside k8s, inside docker, all showing the same problem.
Repository: PowerToys
Issue: SVG not rendered correctly.
Labels: Issue-Bug,Product-File Explorer

### Microsoft PowerToys version

0.74.0

### Installation method

PowerToys auto-update

### Running as admin

None

### Area(s) with issue?

File Explorer: Thumbnail preview

### Steps to reproduce

Some SVG files do not render correctly.

[source.zip](https://github.com/microsoft/PowerToys/files/12740990/source.zip) (svg file zipped)


### ✔️ Expected Behavior

Rendered in browser.
![rendered_browser](https://github.com/microsoft/PowerToys/assets/60390085/c9b62887-85ea-4fbf-9e03-6329818e5fb5)


### ❌ Actual Behavior

Rendered in explorer (Win10).

![rendered_explorer](https://github.com/microsoft/PowerToys/assets/60390085/c37094aa-29fc-4926-a50a-a6471d15d5e4)

Missing checkmark. (hole)
Some files with hole works, other not. I cannot reproduce. I played with some styles etc in text editor. Maybe it's only on specific positions of points... I wonder if we could use a more proven/robust web renderer for SVGs (the underlaying lib of browsers). 

### Other Software

_No response_
Repository: godot
Issue: Removing scripts from objects can violate gdscript static typing
Labels: discussion,topic:core,topic:gdscript,documentation

### Godot version

4.1.1

### System information

Windows 10, amd rx 480 gpu

### Issue description

If you have a statically typed variable of an instance of a user-defined gdscript class, and then assign null over its script property, then it the instance is no longer of that type. This violates static typing guarantees and will make optimizations around custom class types harder in the future. (For example, `myobj.property` could never optimize down to a single chase-pointers-then-access-array operation, even if myobj is statically typed, because the script might be removed or replaced with a script of another type.)

This will break compatibility, but IMO, set_script() and assigning to the script property of statically-typed `Object`s should throw errors.

### Steps to reproduce

Run a scene with this script attached:

```gdscript
extends Node2D

class MyClass extends RefCounted:
    var x = 0.0

func _init():
    var myobj : MyClass = MyClass.new()
    print(myobj is MyClass)
    myobj.script = null
    print(myobj is MyClass)
```

### Minimal reproduction project

N/A
Repository: node
Issue: parallel/test-cluster-primary-kill is flaky
Labels: flaky-test

### Test

`parallel/test-cluster-primary-kill`

### Platform

Other

### Console output

```console
=== release test-cluster-primary-kill ===
Path: parallel/test-cluster-primary-kill
Error: Command: out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/parallel/test-cluster-primary-kill.js
--- TIMEOUT ---

===
=== 1 tests failed
===

Failed tests:
out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/parallel/test-cluster-primary-kill.js
make[1]: *** [Makefile:550: test-ci] Error 1
make: *** [Makefile:579: run-ci] Error 2
```


### Build links

- https://github.com/nodejs/node/actions/runs/6326471325/job/17180107996?pr=49863

### Additional information

_No response_
Repository: neovim
Issue: vertically align cursor mode in main buffer
Labels: enhancement,needs:vim-patch,normal-mode

### Problem

Have cursor always aligned vertically and move content instead in main working buffer.

I've tried to research this and the current way of configuring this is to first set `vim.opt.scrolloff=42069` and start appending all keybindings with `zz` at the end to center the cursor. Example `dd` will delete current line but, will also jump off center. Current suggestions I've seen is to replace `dd` with `ddzz`.

Problems:
- there are many key bindings to replace -> big configs.
- screen flicker because the initial key binding does one jump and the second `zz` jumps back to the center.

- everything gets centered including side panels, and "pop-up windows" that should not be centered.

- https://vi.stackexchange.com/questions/6005/scroll-without-changing-the-cursor-position
- https://github.com/neovim/neovim/issues/20431'[Screencast from 2023-09-27

[18-52-25.webm](https://github.com/neovim/neovim/assets/38912521/b58ec991-6d26-4d82-9af8-d724f0270cf9)

### Expected behavior

Why is this useful?
- you don't have to look for the cursor
- when searching from the top of the file for a function you'll only see function signature and not the entire body

From what I can tell there is no 'native' of making this work and there is [interest](https://vi.stackexchange.com/search?q=center+cursor) in this functionality. I didn't [find any feature request](https://github.com/neovim/neovim/issues?q=is%3Aissue+center+cursor+) similar to this one.

I think it would be useful to have a native way of creating buffers with centered mode on so that supporting buffers like debug panels, file explorers and terminals would not get affected.