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
4 changes: 2 additions & 2 deletions app_dart/lib/src/model/google/grpc.g.dart

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

20 changes: 9 additions & 11 deletions app_dart/lib/src/model/luci/pubsub_message.g.dart

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright 2025 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 'consolidated_check_run_flow_flags.g.dart';

/// Flags related to content-aware hashing.
@JsonSerializable()
@immutable
final class ConsolidatedCheckRunFlow {
/// Default configuration for [ConsolidatedCheckRunFlow] flags.
static const defaultInstance = ConsolidatedCheckRunFlow._(
useForAll: false,
useForUsers: [],
);

/// Whether to use consolidated check-run flow with only one check-run created
/// for all LUCI tests or legacy check-run flow.
@JsonKey()
final bool useForAll;

/// List of users to use consolidated check-run flow.
@JsonKey()
final List<String> useForUsers;

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

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

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

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

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

10 changes: 10 additions & 0 deletions app_dart/lib/src/service/flags/dynamic_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'package:path/path.dart' as p;
import 'package:yaml/yaml.dart';

import 'ci_yaml_flags.dart';
import 'consolidated_check_run_flow_flags.dart';
import 'content_aware_hashing_flags.dart';
import 'dynamic_config_updater.dart';

Expand All @@ -38,6 +39,7 @@ final class DynamicConfig {
ciYaml: CiYamlFlags.defaultInstance,
contentAwareHashing: ContentAwareHashing.defaultInstance,
closeMqGuardAfterPresubmit: false,
consolidatedCheckRunFlow: ConsolidatedCheckRunFlow.defaultInstance,
);

/// Upper limit of commit rows to be backfilled in API call.
Expand All @@ -60,11 +62,16 @@ final class DynamicConfig {
@JsonKey()
final bool closeMqGuardAfterPresubmit;

/// Flags related tp consolidated check-run flow configuration.
@JsonKey()
final ConsolidatedCheckRunFlow consolidatedCheckRunFlow;

const DynamicConfig._({
required this.backfillerCommitLimit,
required this.ciYaml,
required this.contentAwareHashing,
required this.closeMqGuardAfterPresubmit,
required this.consolidatedCheckRunFlow,
});

/// Creates [DynamicConfig] flags from a [json] object.
Expand All @@ -75,6 +82,7 @@ final class DynamicConfig {
CiYamlFlags? ciYaml,
ContentAwareHashing? contentAwareHashing,
bool? closeMqGuardAfterPresubmit,
ConsolidatedCheckRunFlow? consolidatedCheckRunFlow,
}) {
return DynamicConfig._(
backfillerCommitLimit:
Expand All @@ -85,6 +93,8 @@ final class DynamicConfig {
closeMqGuardAfterPresubmit:
closeMqGuardAfterPresubmit ??
defaultInstance.closeMqGuardAfterPresubmit,
consolidatedCheckRunFlow:
consolidatedCheckRunFlow ?? defaultInstance.consolidatedCheckRunFlow,
);
}

Expand Down
6 changes: 6 additions & 0 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.

4 changes: 2 additions & 2 deletions app_dart/lib/src/service/luci_build_service/user_data.g.dart

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

Loading