sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: kubernetes
Issue: Umbrella: Improvements to API documentation
Labels: priority/important-soon,kind/documentation,area/api,sig/api-machinery,sig/docs,lifecycle/frozen,wg/api-expression

the public API documentation on kubernetes.io is very challenging to understand compared with projects like Docker, OpenStack.

The first and most challenging issue is that all of the API operations
are listed on one massive page, there isn't any grouping or index. I
have to use the browser find to search within the page and guess what
I'm looking for.

The second issue is that the docs are automatically generated so a lot
of the descriptions are not helpful, for example "proxy PUT requests
to Pod" : PUT /api/v1/proxy/namespaces/{namespace}/pods/{name} - I
have no idea what this does or what it is supposed to do.

Third issue is that the models 'required' for each of the fields are
not entirely correct. I was trying to create a pod. The docs say :
http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod
that a pod spec is required, but none of the fields are required.
The API returns and gives an error saying fields are missing. I had to
use trial and error to discover which fields are required at a minimum
(turns out, metadata.name, containers[0].name and
containers[0].image).

@caesarxuchao
@brendandburns
@bgrant0607
Repository: rust
Issue: Improve typed pretty printing
Labels: A-pretty,C-enhancement,E-mentor

Currently you can use `--unpretty=hir,typed` to print out the HIR with type annotations in comments. This could be vastly improved so that it is actually a useful for the user:
- use type ascription rather than comments
- map the types back from the HIR to the AST
- use the original program's formatting (or if that isn't possible, use rustfmt, rather than the pretty printer)
- output only a specified portion of the program, rather than the whole program

If we do all of those things, then this should probably be a tool external to the compiler. The first item could just fix `--unpretty=hir,typed`, the second could provide `--unpretty=typed`.
Repository: go
Issue: x/tools/cmd/oracle: `describe` operation doesn't work with import "C" statements
Labels: Tools

Take this source for file `/devel/go-workspace/src/foo/foo.go`: 

```
package main

/*
#include <time.h>
#include <stdlib.h>
*/
import "C"
import "fmt"

func Random() int {
    return int(C.rand())
}

func Seed() {
    C.srand(C.uint(C.time(nil)))
}

func main() {
  Seed()
  fmt.Print(Random())
}
```

Then trying to run oracle describe doesn't work:
`oracle -pos=/devel/go-workspace/src/foo/foo.go:#8,#8 describe ___`
This results in error:
`oracle: no buildable Go source files in /devel/go-workspace/src/foo`
Repository: kubernetes
Issue: kubectl should suggest next kubectl commands
Labels: priority/backlog,area/usability,area/kubectl,sig/cli,lifecycle/frozen

If I do `kubectl describe replicationcontroller/foo`, there is a good chance that the next
thing I want to do is to see details about the pods created by that replication controller.

Therefore, `kubectl` should suggest these next steps to me.  I'm thinking an output format like this:

``` console
$ ./kubectl describe rc/foo
$ ./kubectl describe rc/temp
Name:       temp
Namespace:  default
Image(s):   redis
Selector:   run=temp
Labels:     run=temp
Replicas:   1 current / 1 desired
Pods Status:    1 Running / 0 Waiting / 0 Succeeded / 0 Failed
No volumes.
No events.
...
Suggested Next Commands:
      # List all pods created by this replication controller.
      kubectl get pods -l run=temp
      # Describe a running pod created by this replication controller.
      kubectl get pods temp-d729d
      # Get logs from first container of the last failed pod of this replication controller.
      kubectl logs -p  pods temp-5sj4k
```

Since we don't use URLs and HATEOAS in kubernetes, and since new users do not understand the
conventions by which controllers add labels, it is hard for users to know what to do next.  As we get more levels of controllers (Deployment/Rc/Pod, ScheduledJob/Workflow/Job/Pod) and as we get more types of objects created by the same controller (PetSet/{Secret,ConfigMap,RC}), it will become tedious for users to navigate the hierarchy even if they know the right commands.  

Other example of this feature:
- Job: 
  - show Pods it created
  - show all still running pods
  - show last failed pod (if there was a failure)
- RC: 
  - show all pods created by the RC
  - show all 
- Service:
  - show all pods matching the selector
- ScheduledJob: 
  - show Jobs or Workflows it created 
- Workflow: 
  - show Jobs it created
- Pod: 
  - show logs of its containers 
  - show logs of previous invokation (if there has been a failure).
- Deployment: 
  - show its RCs (since there are typically only 2 or 3 RCs, maybe show one command for individually listing each RC?
Repository: rust
Issue:  -C link-args and -C llvm-args can't pass arguments with spaces
Labels: A-frontend,C-enhancement,T-compiler

The arguments passed in -C link-args and -C llvm-args is split by spaces making it impossible to pass along paths with spaces in them.
Repository: youtube-dl
Issue: add support for metrolyrics.com
Labels: site-support-request

```
$ youtube-dl --proxy '' --verbose http://www.metrolyrics.com/news-story-watch-adele-absolutely-crush-her-carpool-karaoke-appearance.html
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--proxy', u'', u'--verbose', u'http://www.metrolyrics.com/news-story-watch-adele-absolutely-crush-her-carpool-karaoke-appearance.html']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.01.15
[debug] Python version 2.7.10 - CYGWIN_NT-6.1-WOW-2.2.1-0.289-5-3-i686-32bit
[debug] exe versions: none
[debug] Proxy map: {}
[generic] news-story-watch-adele-absolutely-crush-her-carpool-karaoke-appearance: Requesting header
WARNING: Falling back on generic information extractor.
[generic] news-story-watch-adele-absolutely-crush-her-carpool-karaoke-appearance: Downloading webpage
[generic] news-story-watch-adele-absolutely-crush-her-carpool-karaoke-appearance: Extracting information
ERROR: Unsupported URL: http://www.metrolyrics.com/news-story-watch-adele-absolutely-crush-her-carpool-karaoke-appearance.html
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/generic.py", line 1289, in _real_extract
    doc = compat_etree_fromstring(webpage.encode('utf-8'))
  File "/usr/lib/python2.7/site-packages/youtube_dl/compat.py", line 248, in compat_etree_fromstring
    doc = _XML(text, parser=etree.XMLParser(target=etree.TreeBuilder(element_factory=_element_factory)))
  File "/usr/lib/python2.7/site-packages/youtube_dl/compat.py", line 237, in _XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 21, column 1218
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 665, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 312, in extract
    return self._real_extract(url)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/generic.py", line 1908, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: http://www.metrolyrics.com/news-story-watch-adele-absolutely-crush-her-carpool-karaoke-appearance.html

```
Repository: java-design-patterns
Issue: Application Controller pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
The Application Controller design pattern centralizes the request handling by routing incoming requests to appropriate handlers. This pattern is particularly useful for applications with complex request processing logic, as it decouples the request handling from the request processing, promoting modularity and ease of maintenance. Key elements of this pattern include:

1. **Application Controller:** A central controller that handles incoming requests and delegates them to appropriate handlers.
2. **Handlers:** Specific components or services that perform the business logic associated with a request.
3. **Request:** Represents the client request to be processed.
4. **Response:** Represents the outcome of the request processing, which is sent back to the client.
5. **Command:** Encapsulates a request as an object, thereby decoupling the sender of a request from its receiver.

**References:**
- [Application Controller Design Pattern](https://martinfowler.com/eaaCatalog/applicationController.html)
- [Project Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

**Acceptance Criteria:**
1. Implement the Application Controller class that can route incoming requests to appropriate handlers.
2. Create at least two handler classes demonstrating different business logic processes.
3. Ensure comprehensive unit tests are written to validate the functionality of the Application Controller and handlers.
Repository: java-design-patterns
Issue: Association Table Mapping pattern
Labels: info: help wanted,epic: pattern,type: feature

### Description:
The Association Table Mapping design pattern is used to manage many-to-many relationships between objects by using an intermediary table (association table) in the database. This pattern is particularly useful when an application requires handling complex relationships where each object can have multiple associations with objects of another type.

**Main elements of the pattern:**
- **Entities:** These are the objects that have a many-to-many relationship.
- **Association Table:** A table that holds the foreign keys referencing the primary keys of the associated tables.
- **Mappings:** The process of defining how the objects are related through the association table.
- **Database Operations:** CRUD operations need to account for the intermediary table to properly maintain the relationships.

### References:
- [Association Table Mapping - Martin Fowler](https://martinfowler.com/eaaCatalog/associationTableMapping.html)
- [Project Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

### Acceptance Criteria:
1. Create an association table to manage many-to-many relationships between two entities.
2. Implement CRUD operations ensuring the association table is appropriately updated.
3. Provide unit tests demonstrating the correct implementation and functionality of the Association Table Mapping pattern.
Repository: java-design-patterns
Issue: Plugin pattern
Labels: info: help wanted,epic: pattern,type: feature

## Description
The Plugin design pattern allows a software application to support extension through third-party plugins, providing flexibility and scalability. This pattern is particularly useful for applications requiring dynamic and interchangeable components.

### Main Elements of the Plugin Design Pattern:
1. **Plugin Interface**: Defines the methods that plugins must implement.
2. **Concrete Plugins**: Implementations of the plugin interface, providing specific functionality.
3. **Plugin Manager**: Responsible for loading, initializing, and managing the lifecycle of plugins.
4. **Application Core**: The main application that uses the plugin manager to interact with plugins.

### References:
- [Plugin](http://martinfowler.com/eaaCatalog/plugin.html)
- [Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

### Acceptance Criteria:
1. A Plugin Interface is defined with necessary methods that plugins must implement.
2. At least two Concrete Plugin implementations are created, showcasing different functionalities.
3. A Plugin Manager class is implemented to handle loading, initializing, and managing the plugins.
4. Demonstration of the pattern in a sample application, showing dynamic loading and usage of plugins.
Repository: nvm
Issue: Unable to install custom non-nvm managed version
Labels: feature requests

Hi,

I'm currently using N|Solid for some projects and would like to be able to switch between this and other versions during development.

I've tried copying the N|Solid distribution into the versions directory, but it isn't picked up. Is there a way to do this? And if not, can this feature be added?

Cheers,
Nathan
Repository: flutter
Issue: Need a way to set app icon from setTaskDescription on Android
Labels: c: new feature,platform-android,framework,engine,P3,team-android,triaged-android

the `Title` widget, and the `Activity` mojo service that backs it, doesn't support sending a bitmap to Android to set the app icon.
Repository: rust
Issue: Linking to rustc_llvm with --llvm-root
Labels: A-LLVM,T-compiler,C-bug

If you link to rustc_llvm with a rustc configured with --llvm-root the path to the LLVM libraries is not passed to the linker resulting in linking errors
Repository: You-Dont-Know-JS
Issue: "this & Object Prototypes" - ch6 Behavior Delegation - Minor grammatical error
Labels: for second edition

Not 100% on this but the following sentence doesn't seem to flow well for me:

> These instances have **copies both** of the general Task defined behavior as well as the specific XYZ defined behavior.

While I think this might be better:

> These instances have **copies of both** the general Task defined behavior as well as the specific XYZ defined behavior.

By the way, thanks for making this series happening. I have been enjoying and learning a lot thus far!
Repository: rust
Issue: Fulfillment context should support DAGs better, integrate with caching better
Labels: C-enhancement,A-trait-system,I-compiletime,T-compiler

The new fulfillment context introduced in #30533 could be more efficient in a number of ways in terms of pruning the work it has to do. First, it currently considers obligations to be formed in a tree, but really it ought to detect arbitrary DAGs and avoiding adding needless work. In particular, if a given obligation O is also found elsewhere in the tree -- but NOT as an ancestor! -- then we can drop it. We have some limited support for this where we drop duplicate _siblings_. This may be good enough, but we can do better.

It seems like we could integrate this with cycle detection. Currently, we wait until the overflow counter trips and then walk back up and look for a cycle. This is perfectly fine. But I could also imagine that we might have some kind of per-tree hashtable (the current `ObligationForest` doesn't support "per-tree" data, but it seems like an easy enough extension) that tracks obligations currently in the tree. If we find when adding a new obligation O that it is already present, then we could go look for a cycle and otherwise consider it a duplicate. This seems nice, but there is a wrinkle.

In particular, I am wary of getting things wrong around inference variables! We can always add things to the set in their current state, and if unifications occur then the obligation is just kind of out-of-date, but I want to be sure we don't accidentally fail to notice that something is our ancestor. I decided this was subtle enough to merit its own PR.

Another related issue is that it's not clear when is the best time to refresh inference variables. We might be able to find a perfect time, or maybe we should just make it very cheap to do and then do it all over the place.

cc @aturon @arielb1
Repository: opencv
Issue: Color convert under CPU and GPU is not consistant
Labels: bug,category: gpu/cuda (contrib)

When trying to convert a color from Lab to RGB using cvtColor there is an inconsistency between some of the results returned from the GPU (cuda) and CPU.

For example:

Lab(1.1, 68.34847, 64.08946) --> RGB(0.3326095 , 0.0, 0.0) under CPU
Lab(1.1, 68.34847, 64.08946) --> RGB(0.332609445 , -0.1881216 , 0.234428525) under GPU

While a & b values in Lab colorsapce can be negative, in RGB space they can't. All the values are single floats as requested by opencv documentation...

This was tested under opencv 3.0 and opencv 3.1
Repository: go
Issue: os: on unix Process.Kill() can kill the wrong process
Labels: OS-OpenBSD,OS-Solaris

This is somewhat similar to the issue #9382. On Unix Process.Kill() just calls Process.Signal(Kill). As https://golang.org/src/os/exec_unix.go#L39 indicates, the Signal function invokes syscall.Kill(p.Pid) outside any lock after checking if the process still runs. Thus at the point when the signal is called the process could finish and Process.Wait() from another thread return. Thus OS is free to reuse the pid for another unrelated process. If this happens, Process.Kill() kills that process. 

Due to this race it is impossible to write a correct platform-independent code in Go that kills the process if it does not terminate after a pause. I.e. the code fragment from #9382 is not correct on Unix:

```
func spawnAndKill(exePath string, counter int) error {
    cmd := exec.Command(exePath, fmt.Sprintf("%d", counter))
    err := cmd.Start()
    if err != nil {
        return err
    }
    go func() {
        time.Sleep(1000 * time.Millisecond)
        cmd.Process.Kill()
    }()
    cmd.Wait()
    return nil
}
```
Repository: javascript
Issue: Lint the readme
Labels: enhancement,pull request wanted

Don't know if there's already an issue to do this, but @btmills published https://github.com/eslint/eslint-plugin-markdown. So you should be able to lint the readme with the eslint config?
Repository: You-Dont-Know-JS
Issue: Async & Performance - ch2 - Timeoutify callback arguments
Labels: for second edition

If I'm right, this callback always called with `err == null` and real `err` argument will be second parameter as `data`

``` javascript
fn.apply( this, [ null ].concat( [].slice.call( arguments ) ) );
```
Repository: go
Issue: cmd/pprof: svg profiles are broken for rpc services
Labels: compiler/runtime

go version devel +c7754c8 Tue Jan 19 06:20:36 2016 +0000 linux/amd64

SVG profile for my program shows:

![svg](https://cloud.githubusercontent.com/assets/1095328/12417130/323aeb56-bea6-11e5-925c-29545b8a6991.png)

You can see that as if reflect.Value.call directly allocates a lot. This does not make sense.

In text profile I see records that are probably these reflect.Value.call allocations. But in SVG they are trimmed at reflect.Value.call. RPC servers can allocate most of its memory during request serving, so this is pretty unfortunate.

```
944: 3866624 [15104: 61865984] @ 0x452e65 0x56df40 0x56d0b5 0x40b72d 0x40bf66 0x46d5ae 0x8a17ed 0x8a04b1 0x832e52 0x46fbc1
#   0x56df40    github.com/google/syzkaller/prog.calcDynamicPrio+0xb0       gopath/src/github.com/google/syzkaller/prog/prio.go:153
#   0x56d0b5    github.com/google/syzkaller/prog.CalculatePriorities+0x75   gopath/src/github.com/google/syzkaller/prog/prio.go:31
#   0x40b72d    main.(*Manager).minimizeCorpus+0x9ed                gopath/src/github.com/google/syzkaller/syz-manager/manager.go:341
#   0x40bf66    main.(*Manager).Connect+0x216                   gopath/src/github.com/google/syzkaller/syz-manager/manager.go:363
#   0x46d5ae    runtime.call64+0x3e                     go/src/runtime/asm_amd64.s:473
#   0x8a17ed    reflect.Value.call+0x120d                   go/src/reflect/value.go:435
#   0x8a04b1    reflect.Value.Call+0xb1                     go/src/reflect/value.go:303
#   0x832e52    net/rpc.(*service).call+0x1c2                   go/src/net/rpc/server.go:383

1: 1761280 [1: 1761280] @ 0x453261 0x40c701 0x46d5ae 0x8a17ed 0x8a04b1 0x832e52 0x46fbc1
#   0x40c701    main.(*Manager).NewInput+0x611  gopath/src/github.com/google/syzkaller/syz-manager/manager.go:383
#   0x46d5ae    runtime.call64+0x3e     go/src/runtime/asm_amd64.s:473
#   0x8a17ed    reflect.Value.call+0x120d   go/src/reflect/value.go:435
#   0x8a04b1    reflect.Value.Call+0xb1     go/src/reflect/value.go:303
#   0x832e52    net/rpc.(*service).call+0x1c2   go/src/net/rpc/server.go:383

1: 1515520 [1: 1515520] @ 0x453261 0x40d8fb 0x40c6b9 0x46d5ae 0x8a17ed 0x8a04b1 0x832e52 0x46fbc1
#   0x40d8fb    main.(*PersistentSet).add+0x49b gopath/src/github.com/google/syzkaller/syz-manager/persistent.go:100
#   0x40c6b9    main.(*Manager).NewInput+0x5c9  gopath/src/github.com/google/syzkaller/syz-manager/manager.go:385
#   0x46d5ae    runtime.call64+0x3e     go/src/runtime/asm_amd64.s:473
#   0x8a17ed    reflect.Value.call+0x120d   go/src/reflect/value.go:435
#   0x8a04b1    reflect.Value.Call+0xb1     go/src/reflect/value.go:303
#   0x832e52    net/rpc.(*service).call+0x1c2   go/src/net/rpc/server.go:383
```
Repository: rust
Issue: Bad macro usage error message does not include correct error location
Labels: C-enhancement,A-diagnostics,A-macros,T-compiler,D-papercut

Consider this reduced test case:

``` rust
macro_rules! match_ignore_ascii_case {
    (@inner $value:expr) => { () };
    ( $($rest:tt)* ) => { match_ignore_ascii_case!(@inner $($rest)*) };
}

fn main() {
    // This is fine
    match_ignore_ascii_case!(1);

    // This causes an error as it doesn’t match the expected syntax
    // but the error message does not the location of the actual error.
    match_ignore_ascii_case!(2 => 3);
}
```

The `@inner` indirection exists because the non-reduced macro is recursive:
- https://play.rust-lang.org/?gist=f8b1652f43cc720f89a3&version=nightly
- https://users.rust-lang.org/t/writing-a-macro-rules-macro-used-like-a-match-expression/4328

This fails to compile (as it should) but the error message does not include the real location of the error, which is line 12. It can be hard to track down in a large crate with many users of the macro.

``` rust
a.rs:3:52: 3:53 error: unexpected token: `@`
a.rs:3     ( $($rest:tt)* ) => { match_ignore_ascii_case!(@inner $($rest)*) };
```

The error message looks even worse when the macro is used (with incorrect syntax) from another crate

```
<cssparser macros>:12:1: 12:2 error: unexpected token: `@`
<cssparser macros>:12 @ inner $ value , ( $ ( $ rest ) * ) -> (
```
Repository: go
Issue: cmd/compile: Need better type propagation
Labels: Performance,compiler/runtime

When this code is compiled with `-m`, several heap allocations can be seen because `hash.Hash64` is an interface type and it's not possible (in general) to know how the parameters to its methods are treated:

```
package foo

import (
    "hash"
    "hash/fnv"
)

func harsh(fieldVals []interface{}) uint64 {
    if len(fieldVals) == 0 {
        // Avoid allocating the hasher if there are no fieldVals
        return 0
    }

    h := fnv.New64a() // .(*fnv.Sum64a)

    for _, v := range fieldVals {
        switch v := v.(type) {
        case string:
            h.Write([]byte(v))
        case int, int32:
            vi, ok := v.(int32)
            if !ok {
                vi = int32(v.(int))
            }
            b := [4]byte{}
            for i := 0; i < 4; i++ {
                b[i] = byte(vi & 0xFF)
                vi >>= 8
            }
            h.Write(b[:])
        case bool:
            if v {
                h.Write([]byte{1})
            } else {
                h.Write([]byte{0})
            }
        }
    }
    return h.Sum64()
}
```

If the package-private type actually allocated by `fnv.New64a` is exposed and cast to (see the commented out `.(*fnv.Sum64a)` ), it becomes possible to see which functions are actually called and either inline them or determine that they do not leak their parameters, and heap allocations are avoided.  This type information is available and can be propagated forward in tandem with the declared type, and used to better escape-analyze interface method calls (that are really monomorphic).  Right now inlining can reveal it, ideally the summary information can include more precise information about returned types if there is any to be had.