Updates for runId/resultId for artifacts#38
Conversation
Reviewer's GuideThis PR enriches the artifact API's upload methods by marking result_id and run_id as mutually exclusive parameters in both code annotations and documentation, and aligns the SDK version strings across package metadata and client settings. Class diagram for updated Artifact API upload methodsclassDiagram
class ArtifactApi {
+upload_artifact(filename: str, file: bytearray, result_id: UUID|None, run_id: UUID|None, additional_metadata: dict|None)
+upload_artifact_with_http_info(filename: str, file: bytearray, result_id: UUID|None, run_id: UUID|None, additional_metadata: dict|None)
+upload_artifact_without_preload_content(filename: str, file: bytearray, result_id: UUID|None, run_id: UUID|None, additional_metadata: dict|None)
}
ArtifactApi : result_id "ID of result to attach artifact to (mutually exclusive with runId)"
ArtifactApi : run_id "ID of run to attach artifact to (mutually exclusive with resultId)"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull Request Overview
This PR updates version information and clarifies parameter descriptions for artifact uploads to indicate mutual exclusivity between runId and resultId parameters.
- Updates SDK package version from 3.1.0 to 3.0.3 across multiple files
- Adds clarification in Field descriptions that runId and resultId parameters are mutually exclusive
- Updates corresponding documentation to reflect the mutual exclusivity constraint
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ibutsu_client/configuration.py | Updates SDK package version string in debug report |
| ibutsu_client/api_client.py | Updates user agent version string |
| ibutsu_client/init.py | Updates package version constant |
| ibutsu_client/api/artifact_api.py | Enhances Field descriptions to clarify mutual exclusivity of runId/resultId parameters |
| docs/ArtifactApi.md | Updates documentation to reflect mutual exclusivity in parameter descriptions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- The SDK version was downgraded from 3.1.0 to 3.0.3—please bump to a new appropriate version (e.g. 3.1.1) rather than rolling back.
- You note that result_id and run_id are mutually exclusive, but there’s no validation enforcing this—consider adding a client-side check to prevent both from being supplied simultaneously.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The SDK version was downgraded from 3.1.0 to 3.0.3—please bump to a new appropriate version (e.g. 3.1.1) rather than rolling back.
- You note that result_id and run_id are mutually exclusive, but there’s no validation enforcing this—consider adding a client-side check to prevent both from being supplied simultaneously.
## Individual Comments
### Comment 1
<location> `ibutsu_client/api/artifact_api.py:988` </location>
<code_context>
- UUID | None, Field(description="ID of run to attach artifact to")
+ UUID | None,
+ Field(
+ description="ID of run to attach artifact to (mutually exclusive with resultId)"
+ ),
] = None,
</code_context>
<issue_to_address>
**nitpick:** Field description uses inconsistent casing for mutually exclusive parameter names.
Use consistent naming and casing for parameter references in descriptions, such as 'result_id' and 'run_id', to improve clarity.
</issue_to_address>
### Comment 2
<location> `docs/ArtifactApi.md:383-384` </location>
<code_context>
**file** | **bytearray**| file to upload |
- **result_id** | **str**| ID of result to attach artifact to | [optional]
- **run_id** | **str**| ID of run to attach artifact to | [optional]
+ **result_id** | **str**| ID of result to attach artifact to (mutually exclusive with runId) | [optional]
+ **run_id** | **str**| ID of run to attach artifact to (mutually exclusive with resultId) | [optional]
**additional_metadata** | [**object**](object.md)| Additional data to pass to server | [optional]
</code_context>
<issue_to_address>
**suggestion:** Maintain consistent naming conventions in parameter descriptions.
Update the descriptions to use 'result_id' and 'run_id' for consistency with the parameter names.
```suggestion
**result_id** | **str**| ID of result to attach artifact to (mutually exclusive with run_id) | [optional]
**run_id** | **str**| ID of run to attach artifact to (mutually exclusive with result_id) | [optional]
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
9a0ba05 to
cd67dae
Compare
cd67dae to
8a1af94
Compare
Generated with apispec for 2.8.3 commit
8a1af94 to
a162b6b
Compare
Pairs with:
ibutsu/ibutsu-server#735
Summary by Sourcery
Clarify mutual exclusivity between run_id and result_id in artifact upload endpoints, update corresponding documentation and examples, and bump SDK version and client metadata
Enhancements:
Build:
Documentation: