Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions app_dart/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,12 @@ dynamicTestSuppression: true
# The Gemini model to use for log analysis.
geminiModel: gemini-3-flash-preview

# Whether to allow unified check run flow to specific users or to everyone.
unifiedCheckRunFlow:
useForAll: true
# Whether to allow reset failed check run back to in progress to specific users or to everyone.
resetFailedCheckRun:
useForAll: false
useForUsers:
- ievdokdm
- eyebrowsoffire
- andywolff
- camsim99
- walley892
- loic-sharma
- vashworth
- mboetger
- justinmc

# Whether to process LUCI notifications of builds progress ordered within check run.
orderedPresubmit:
Expand Down
13 changes: 3 additions & 10 deletions app_dart/lib/src/generated_config.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 14 additions & 11 deletions app_dart/lib/src/service/flags/dynamic_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'ci_yaml_flags.dart';
import 'content_aware_hashing_flags.dart';
import 'dynamic_config_updater.dart';
import 'ordered_presubmit_flags.dart';
import 'unified_check_run_flow_flags.dart';
import 'reset_failed_check_run.dart';

part 'dynamic_config.g.dart';

Expand All @@ -39,7 +39,7 @@ final class DynamicConfig {
contentAwareHashing: ContentAwareHashing.defaultInstance,
closeMqGuardAfterPresubmit: false,
enableGeminiLogAnalysis: false,
unifiedCheckRunFlow: UnifiedCheckRunFlow.defaultInstance,
resetFailedCheckRun: ResetFailedCheckRun.defaultInstance,
orderedPresubmit: OrderedPresubmit.defaultInstance,
dynamicTestSuppression: false,
geminiModel: 'gemini-3-flash-preview',
Expand Down Expand Up @@ -69,9 +69,9 @@ final class DynamicConfig {
@JsonKey()
final bool enableGeminiLogAnalysis;

/// Flags related tp unified check-run flow configuration.
/// Flags related to checks suite flow.
@JsonKey()
final UnifiedCheckRunFlow unifiedCheckRunFlow;
final ResetFailedCheckRun resetFailedCheckRun;

/// Flags related to ordered presubmit configuration.
@JsonKey()
Expand All @@ -91,7 +91,7 @@ final class DynamicConfig {
required this.contentAwareHashing,
required this.closeMqGuardAfterPresubmit,
required this.enableGeminiLogAnalysis,
required this.unifiedCheckRunFlow,
required this.resetFailedCheckRun,
required this.orderedPresubmit,
required this.dynamicTestSuppression,
required this.geminiModel,
Expand All @@ -106,7 +106,7 @@ final class DynamicConfig {
ContentAwareHashing? contentAwareHashing,
bool? closeMqGuardAfterPresubmit,
bool? enableGeminiLogAnalysis,
UnifiedCheckRunFlow? unifiedCheckRunFlow,
ResetFailedCheckRun? resetFailedCheckRun,
OrderedPresubmit? orderedPresubmit,
bool? dynamicTestSuppression,
String? geminiModel,
Expand All @@ -122,8 +122,8 @@ final class DynamicConfig {
defaultInstance.closeMqGuardAfterPresubmit,
enableGeminiLogAnalysis:
enableGeminiLogAnalysis ?? defaultInstance.enableGeminiLogAnalysis,
unifiedCheckRunFlow:
unifiedCheckRunFlow ?? defaultInstance.unifiedCheckRunFlow,
resetFailedCheckRun:
resetFailedCheckRun ?? defaultInstance.resetFailedCheckRun,
orderedPresubmit: orderedPresubmit ?? defaultInstance.orderedPresubmit,
dynamicTestSuppression:
dynamicTestSuppression ?? defaultInstance.dynamicTestSuppression,
Expand Down Expand Up @@ -159,11 +159,14 @@ final class DynamicConfig {
/// The inverse operation of [DynamicConfig.fromJson].
Map<String, Object?> toJson() => _$DynamicConfigToJson(this);

bool isUnifiedCheckRunFlowEnabledForUser(String githubUsername) {
if (unifiedCheckRunFlow.useForAll) {
bool isResetFailedCheckRunEnabledForUser(String githubUsername) {
if (resetFailedCheckRun.useForAll) {
return true;
}
return unifiedCheckRunFlow.useForUsers.contains(githubUsername);
final usernameLower = githubUsername.toLowerCase();
return resetFailedCheckRun.useForUsers.any(
(user) => user.toLowerCase() == usernameLower,
);
}

bool isOrderedPresubmitEnabledForUser(String githubUsername) {
Expand Down
8 changes: 4 additions & 4 deletions app_dart/lib/src/service/flags/dynamic_config.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions app_dart/lib/src/service/flags/reset_failed_check_run.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright 2026 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:json_annotation/json_annotation.dart';
import 'package:meta/meta.dart';

part 'reset_failed_check_run.g.dart';

/// Flag that controls whether to reset failed check run to in progress.
@JsonSerializable()
@immutable
final class ResetFailedCheckRun {
/// Default configuration for [ResetFailedCheckRun].
static const defaultInstance = ResetFailedCheckRun._(
useForAll: false,
useForUsers: [],
);

/// Whether to to reset failed check run to in progress for all users.
@JsonKey()
final bool useForAll;

/// List of users to to reset failed check run to in progress.
@JsonKey()
final List<String> useForUsers;

const ResetFailedCheckRun._({
required this.useForAll,
required this.useForUsers,
});

/// Creates [ResetFailedCheckRun] flags from the provided fields.
///
/// Any omitted fields default to the values in [defaultInstance].
factory ResetFailedCheckRun({bool? useForAll, List<String>? useForUsers}) {
return ResetFailedCheckRun._(
useForAll: useForAll ?? defaultInstance.useForAll,
useForUsers: useForUsers != null
? List<String>.unmodifiable(useForUsers)
: defaultInstance.useForUsers,
);
}

/// Creates [ResetFailedCheckRun] flags from a [json] object.
///
/// Any omitted fields default to the values in [defaultInstance].
factory ResetFailedCheckRun.fromJson(Map<String, Object?>? json) {
return _$ResetFailedCheckRunFromJson(json ?? {});
}

/// The inverse operation of [ResetFailedCheckRun.fromJson].
Map<String, Object?> toJson() => _$ResetFailedCheckRunToJson(this);
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 0 additions & 53 deletions app_dart/lib/src/service/flags/unified_check_run_flow_flags.dart

This file was deleted.

Loading