Skip to content

Conversation

@ievdokdm
Copy link
Contributor

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

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.
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.
…nt tracks, and update the track registry and product documentation.
@ievdokdm ievdokdm requested a review from jtmcdole February 11, 2026 23:49
@ievdokdm ievdokdm changed the title guard summaries for pr 176990 Implement get presubmit guard summaries api Feb 11, 2026
ievdokdm and others added 3 commits February 12, 2026 13:43
)

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.
@ievdokdm ievdokdm added the autosubmit Merge PR when tree becomes green via auto submit App. label Feb 12, 2026
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App. label Feb 12, 2026
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 12, 2026

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.

@ievdokdm ievdokdm added the autosubmit Merge PR when tree becomes green via auto submit App. label Feb 12, 2026
@auto-submit auto-submit bot merged commit 86dbdcd into flutter:main Feb 12, 2026
20 checks passed
@ievdokdm ievdokdm added autosubmit Merge PR when tree becomes green via auto submit App. and removed autosubmit Merge PR when tree becomes green via auto submit App. labels Feb 12, 2026
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Dashboard back-end for LUCI Tests statuses

2 participants