microsoft / microsoft/azure-devops-python-api

"filter_contains" argument causes get_refs to find no matches

Aperta
#307 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

question
Lingua principale
Python
Stelle
684
Fork
218
Merge medio
8g 10h
PR unite (30g)
1

Descrizione

Hi,

I have a piece of code that uses get_refs with a prefix filter argument. I observed the results and then I put in filter_contains a character that I can see exists in all the refs returned from the first call to get_refs. The call with the filter_contains returns 0 refs.

refs = self._connection.clients_v5_1.get_git_client().get_refs(repository_id = repo_id,
                                      project = project_id,
                                      filter = prefix_filter,
                                      peel_tags = True,
                                      include_statuses = True,
                                      latest_statuses_only = True,
                                      top = 100,
                                      continuation_token = continuation_token)

In this example, all relevant ref name field contain the character 'V'. The call:

refs = self._connection.clients_v5_1.get_git_client().get_refs(repository_id = repo_id,
                                      project = project_id,
                                      filter = prefix_filter,
                                      peel_tags = True,
                                      include_statuses = True,
                                      latest_statuses_only = True,
                                      top = 100,
                                      continuation_token = continuation_token,
                                      filter_contains = "V")

results in refs containing 0 results, and the call returns almost immediately, as opposed to taking several seconds in the first call.

Thanks.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Parti dall'entry point get_refs del client Python e verifica come vengono inviati gli argomenti filter e filter_contains. Riproduci il caso segnalato con refs contenenti 'V', quindi verifica che filter_contains restituisca quelle refs corrispondenti invece di un risultato vuoto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api, devops
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.