-
Notifications
You must be signed in to change notification settings - Fork 100
176990 Implement get presubmit guard summaries api #4946
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task: Implement GuardStatus.calculate Summary: Added a static method 'calculate' to the GuardStatus enum and created corresponding unit tests. Files: packages/cocoon_common/lib/guard_status.dart, packages/cocoon_common/test/guard_status_test.dart Why: Centralizes guard status logic for reuse across services.
Task: Update GetPresubmitGuard Summary: Replaced inline guard status logic with GuardStatus.calculate from cocoon_common. Files: app_dart/lib/src/request_handlers/get_presubmit_guard.dart Why: Ensures consistent status calculation and reduces code duplication.
Task: Implement GetPresubmitGuards Handler Summary: Added GetPresubmitGuards handler to retrieve all guards for a PR. Registered route /api/get-presubmit-guards. Files: app_dart/lib/src/request_handlers/get_presubmit_guards.dart, app_dart/lib/server.dart, app_dart/test/request_handlers/get_presubmit_guards_test.dart Why: Enables the dashboard to show history of presubmit guards for a specific PR.
Task: Create RPC model and Update Handler Summary: Added PresubmitGuardsResponse RPC model and updated GetPresubmitGuards to return it. Files: packages/cocoon_common/lib/src/rpc_model/presubmit_guards_response.dart, packages/cocoon_common/lib/rpc_model.dart, app_dart/lib/src/request_handlers/get_presubmit_guards.dart, app_dart/test/request_handlers/get_presubmit_guards_test.dart Why: Provides a structured and typed response for the new API.
…odels Task: Fix TaskStatus Serialization Summary: Renamed _schemaValue to value in TaskStatus to fix JsonEnum serialization. Regenerated RPC models. Files: packages/cocoon_common/lib/task_status.dart, packages/cocoon_common/lib/src/rpc_model/presubmit_guard.g.dart Why: Fixed a regression in existing tests caused by build_runner regeneration.
…est request handler' as complete
Task: Group Guards by Commit SHA Summary: Updated GetPresubmitGuards to group guards by commitSha and calculate aggregated status. Removed checkRunId from RPC model. Files: packages/cocoon_common/lib/src/rpc_model/presubmit_guards_response.dart, app_dart/lib/src/request_handlers/get_presubmit_guards.dart, app_dart/test/request_handlers/get_presubmit_guards_test.dart Why: Provides a cleaner view for the dashboard where multiple stages for the same commit are summarized together.
…evel array Task: Refactor to PresubmitGuardSummary Summary: Renamed PresubmitGuardItem to PresubmitGuardSummary and removed wrapper. Updated handler to return List<PresubmitGuardSummary>. Files: packages/cocoon_common/lib/src/rpc_model/presubmit_guard_summary.dart, app_dart/lib/src/request_handlers/get_presubmit_guards.dart, app_dart/test/request_handlers/get_presubmit_guards_test.dart Why: Simplifies the API response to a top-level JSON array of summary objects.
…maries Task: Rename Handler to GetPresubmitGuardSummaries Summary: Renamed the class and file for GetPresubmitGuards to GetPresubmitGuardSummaries to better reflect its new purpose. Files: app_dart/lib/src/request_handlers/get_presubmit_guard_summaries.dart, app_dart/lib/server.dart, app_dart/test/request_handlers/get_presubmit_guard_summaries_test.dart Why: The handler now returns a summary of guards grouped by commit SHA.
Task: Update API URL Summary: Changed the API endpoint URL from /api/get-presubmit-guards to /api/get-presubmit-guard-summaries to match the renamed handler. Files: app_dart/lib/server.dart, app_dart/lib/src/request_handlers/get_presubmit_guard_summaries.dart Why: Consistency with the handler and model names.
…ardsForPullRequest request handler'
…equest request handler'
…nt tracks, and update the track registry and product documentation.
jtmcdole
reviewed
Feb 12, 2026
app_dart/lib/src/request_handlers/get_presubmit_guard_summaries.dart
Outdated
Show resolved
Hide resolved
app_dart/test/request_handlers/get_presubmit_guard_summaries_test.dart
Outdated
Show resolved
Hide resolved
jtmcdole
approved these changes
Feb 12, 2026
… guard and update test entity generation.
) This much shows we can run tests against the backend implementation with fakes. * new package `packages/cocoon_integration_test` * moved fakes / models / etc to here * decoupled app_dart from appengine/mirrors via ClientContext abstraction. * implemented IntegrationHttpClient for in-memory client-server communication. * added FakeCacheService to avoid test flakiness. * added dashboard integration test for test suppression. Next PR includes changes to defang "dart:io" from `app_dart/lib/**` so we can run it in the browser with dev_dashboard.
Contributor
|
autosubmit label was removed for flutter/cocoon/4946, because - The status or check suite test-app-dart has failed. Please fix the issues identified (or deflake) before re-applying this label. |
…_integration_test` utilities.
ievdokdm
added a commit
to ievdokdm/cocoon
that referenced
this pull request
Feb 12, 2026
List of sha's with its guard status and creation timestamp to fill dropdown with sha's on a dashboard presubmit view Partial Fix: flutter/flutter#176990
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
List of sha's with its guard status and creation timestamp to fill dropdown with sha's on a dashboard presubmit view
Partial Fix: flutter/flutter#176990