-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(explorer): allow client to control and inspect coding state #104502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #104502 +/- ##
=========================================
Coverage 80.50% 80.51%
=========================================
Files 9352 9352
Lines 400285 400464 +179
Branches 25704 25704
=========================================
+ Hits 322264 322418 +154
- Misses 77553 77578 +25
Partials 468 468 |
| ) | ||
|
|
||
| if not any_creating: | ||
| return state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Polling loop exits early if PR state not yet initialized
The push_changes polling loop will exit immediately if repo_pr_states is empty or doesn't contain any PR with pr_creation_status == "creating". Since any() on an empty iterable returns False, if the server hasn't yet populated repo_pr_states with the new PR being created by the time the first fetch_run_status call returns, the method will return prematurely with stale data instead of waiting for the PR creation to complete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong, the update endpoint call won't return until the state is updated already with "creating"
| "insert_index": insert_index, | ||
| "on_page_context": on_page_context, | ||
| "is_interactive": self.is_interactive, | ||
| "enable_coding": self.enable_coding, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is set in init so maybe we don't need this?
Do we expect users to update client.enable_coding to disable/enable coding after the run starts? Maybe we can have an optional param for this fx to pass the new value of the flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is following the same pattern as is_interactive where if users change the flag on the client, then future iterations in the run will update the flag. Otherwise, this doesn't have any impact
| loading: bool = False | ||
| artifacts: list[Artifact] = [] | ||
| file_patches: list[ExplorerFilePatch] = [] | ||
| pr_commit_shas: dict[str, str] | None = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats this mapping between? could we add a comment
…4502) The explorer client can now enable/disable coding tools, view returned file patches, and make and view PRs Part of AIML-1698 Requires getsentry/seer#4200
The explorer client can now enable/disable coding tools, view returned file patches, and make and view PRs
Part of AIML-1698
Requires https://github.com/getsentry/seer/pull/4200/