Skip to content

Updates for runId/resultId for artifacts#38

Merged
mshriver merged 1 commit into
mainfrom
spec-update-artifact
Oct 21, 2025
Merged

Updates for runId/resultId for artifacts#38
mshriver merged 1 commit into
mainfrom
spec-update-artifact

Conversation

@mshriver
Copy link
Copy Markdown
Contributor

@mshriver mshriver commented Oct 20, 2025

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:

  • Clarify that runId and resultId parameters for artifact uploads are mutually exclusive

Build:

  • Bump SDK package version to 3.0.3 and update client user-agent string

Documentation:

  • Update ArtifactApi.md usage examples and parameter table to reflect mutual exclusivity
  • Adjust docstrings in upload_artifact methods to note mutual exclusivity between runId and resultId

Copilot AI review requested due to automatic review settings October 20, 2025 12:24
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Oct 20, 2025

Reviewer's Guide

This 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 methods

classDiagram
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)"
Loading

File-Level Changes

Change Details Files
Add mutual exclusivity notes for result_id and run_id parameters in upload methods
  • Annotated Field descriptions for result_id and run_id in upload_artifact to mention mutual exclusivity
  • Updated docstring @param descriptions accordingly
  • Applied the same annotation updates in upload_artifact_with_http_info and upload_artifact_without_preload_content
ibutsu_client/api/artifact_api.py
Update documentation examples and parameter table to reflect mutual exclusivity
  • Modified example code snippet to include mutually exclusive note for result_id and run_id
  • Updated parameter table entries to mark result_id and run_id as mutually exclusive
docs/ArtifactApi.md
Align SDK version strings across package metadata and client settings
  • Changed version in init.py from 3.1.0 to 3.0.3
  • Updated default User-Agent header in api_client.py to reflect 3.0.3
  • Adjusted SDK Package Version in configuration.py debug report to 3.0.3
ibutsu_client/__init__.py
ibutsu_client/api_client.py
ibutsu_client/configuration.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread ibutsu_client/api/artifact_api.py
Comment thread docs/ArtifactApi.md
@mshriver mshriver force-pushed the spec-update-artifact branch 2 times, most recently from 9a0ba05 to cd67dae Compare October 20, 2025 12:58
@mshriver mshriver force-pushed the spec-update-artifact branch from cd67dae to 8a1af94 Compare October 20, 2025 13:12
Generated with apispec for 2.8.3 commit
@mshriver mshriver force-pushed the spec-update-artifact branch from 8a1af94 to a162b6b Compare October 21, 2025 13:51
@mshriver mshriver merged commit a45249f into main Oct 21, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants