eclipse-cdt-cloud / eclipse-cdt-cloud/tsp-python-client

--params option not sufficient for global configuration

Aberta
#93 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
6
Forks
16
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

### 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:

```python
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:

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece em TspClient.post_configuration(), onde a solicitação atualmente constrói um body contendo apenas o mapa de parâmetros. Compare isso com a forma como as configurações de saída enviadas usando um arquivo JSON fornecem um nome definido pelo usuário e, em seguida, verifique se o body do POST da configuração inclui esse nome exigido pelo backend.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
api
Tipo de issue
Bug
Dificuldade
2/5
Tempo estimado
1-3 horas
Status de atividade
Estagnada
Clareza
Claramente especificada
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.