Skip to content

183195 add slug into presubmit_check document and appropriate apis#4972

Open
ievdokdm wants to merge 15 commits intoflutter:mainfrom
ievdokdm:183195-add-slug
Open

183195 add slug into presubmit_check document and appropriate apis#4972
ievdokdm wants to merge 15 commits intoflutter:mainfrom
ievdokdm:183195-add-slug

Conversation

@ievdokdm
Copy link
Contributor

@ievdokdm ievdokdm commented Mar 4, 2026

Add a slug field to presubmit_checks document and appropriate apis to properly handle same check-run id on multiple repositories.

Fix: flutter/flutter#183195

ievdokdm added 14 commits March 3, 2026 16:15
Task: Update PresubmitCheck Model
Summary: Added RepositorySlug to PresubmitCheckId and PresubmitCheck, updated documentId format to include owner and repo, and updated UnifiedCheckRun to handle these changes.
Files: app_dart/lib/src/model/firestore/presubmit_check.dart, app_dart/lib/src/service/firestore/unified_check_run.dart, app_dart/test/model/firestore/presubmit_check_test.dart
Why: To align PresubmitCheck with PresubmitGuard and support unified API parameters.
Task: Update Backend APIs
Summary: Updated GetPresubmitChecks and GetPresubmitGuard to use owner and repo parameters instead of slug, and updated UnifiedCheckRun.getPresubmitCheckDetails to support slug filtering.
Files: app_dart/lib/src/request_handlers/get_presubmit_checks.dart, app_dart/lib/src/request_handlers/get_presubmit_guard.dart, app_dart/lib/src/service/firestore/unified_check_run.dart, app_dart/test/request_handlers/get_presubmit_checks_test.dart, app_dart/test/request_handlers/get_presubmit_guard_test.dart, app_dart/test/service/firestore/unified_check_run_test.dart
Why: To provide a more consistent and unified API surface for the dashboard.
…bmit APIs

Task: Update Frontend Service and State
Summary: Updated CocoonService and AppEngineCocoonService to use owner and repo parameters with defaults, updated PresubmitState to pass these parameters, and updated DataSeeder and tests to match.
Files: dashboard/lib/service/cocoon.dart, dashboard/lib/service/appengine_cocoon.dart, dashboard/lib/service/data_seeder.dart, dashboard/lib/state/presubmit.dart, dashboard/test/service/appengine_cocoon_test.dart, dashboard/test/state/presubmit_test.dart, dashboard/test/utils/mocks.mocks.dart
Why: To align the dashboard with the updated backend API and support multi-repo presubmit views.
…dlers

Task: Update Backend API Defaults
Summary: Updated GetPresubmitChecks, GetPresubmitGuardSummaries, and GetPresubmitGuard to default the repo parameter to 'flutter' and made it optional in query parameter validation where appropriate.
Files: app_dart/lib/src/request_handlers/get_presubmit_checks.dart, app_dart/lib/src/request_handlers/get_presubmit_guard_summaries.dart, app_dart/lib/src/request_handlers/get_presubmit_guard.dart
Why: To simplify API calls from the dashboard and maintain consistency with other Cocoon APIs.
- Removed unnecessary null comparison in GetPresubmitChecks.
- Fixed missing 'slug' arguments in scheduler_test.dart.
- Formatted dashboard tests.
- Finalized track archival by staging deletions.
@ievdokdm ievdokdm requested a review from jtmcdole March 4, 2026 01:17
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.

Add slug to presubmit_checks

1 participant