Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

--params option not sufficient for global configuration

Aperta
#93 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Inizia da TspClient.post_configuration(), dove la richiesta attualmente costruisce un body contenente solo la mappa dei parametri. Confronta questo comportamento con il modo in cui le configurazioni di output pubblicate usando un file JSON forniscono un nome definito dall’utente, quindi verifica che il body del POST della configurazione includa questo nome richiesto dal backend.

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

Descrizione

Bug Description:

--params option not sufficient for global configuration because it's only for the parameters passed as parameters map in the ConfigurationQueryParameters. There is no way to add the name to ConfigurationQueryParameters which is passed in the post_configuration() method of the TspClient. The "post_configuration" method() creates the query parameters without name:

def post_configuration(self, type_id, params):
        api_url = '{0}config/types/{1}/configs'.format(self.base_url, type_id)
        parameters = {'parameters': params}
        response = requests.post(api_url, json=parameters, headers=headers)
...

The handwritten python client doesn't verify if name is passed to the body of HTTP post call. However, generated clients will verify it because it's a required field.

Moreover, backend implemenation of a configuration source will rely on it because it's required. Note, that the XMLConfigurationSource of the Trace Compass server is the sole implementation in Trace Compass so far and it doesn't require a name and ignores it. The filename of the xml file configured in the path variable is assigned as name.

Change python code to pass a user defined name similarly when posting output configurations using a json file.

Steps to Reproduce:

No easy way to reproduce. Just debug the client code (TspClient.post_configuration()) and see that the name is not passed.

Additional Information
  • Operating System:
Lingua principale
Python
Stelle
6
Fork
16
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

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.

Altre issue di eclipse-cdt-cloud/tsp-python-client

Tutte le issue di eclipse-cdt-cloud/tsp-python-client

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.