--params option not sufficient for global configuration
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu tại TspClient.post_configuration(), nơi request hiện đang xây dựng một body chỉ chứa map tham số. So sánh điều này với cách các output configurations được POST bằng tệp JSON cung cấp một tên do người dùng định nghĩa, sau đó xác minh rằng configuration POST body bao gồm tên bắt buộc đó cho backend.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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:
- Ngôn ngữ chính
- Python
- Star
- 6
- Fork
- 16
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eclipse-cdt-cloud/tsp-python-client
-
"Set" classes are not iterable Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
eclipse-cdt-cloud/tsp-python-client#45 · 1 bình luận ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
Tất cả issue của eclipse-cdt-cloud/tsp-python-client
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stephrobert/dsoxlab#238 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sublimehq/package_control#1780 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nwg-piotr/nwg-displays#145 ·