Skip to content

Commit

Permalink
Fix Linux docs_publish running at head (flutter#162557)
Browse files Browse the repository at this point in the history
This target was using `release_build: true` as a way to skip release
branches. This flag is used to signal engine artifacts are built - they
need to be skipped:
- in release branches because artifacts are produced through other
paths.
- in postsubmits of monorepo since the engine artifacts are produced in
the merge queue.

This target was the only one in the framework defining it this way. It
should have been using `enabled_branches`.

tested: locally, using CiYaml directly with a copy of flutter's ci.yaml:

```dart
  final YamlMap configYaml = loadYaml(await File(args.command!['file']).readAsString()) as YamlMap;
  final pb.SchedulerConfig schedulerConfig = pb.SchedulerConfig()..mergeFromProto3Json(configYaml);
  final masterYaml = CiYamlSet(
    yamls: {
      CiType.any: schedulerConfig,
    },
    slug: RepositorySlug.full('flutter/flutter'),
    branch: 'master',
    validate: false,
    isFusion: false,
  );
  final masterNames = {...masterYaml.postsubmitTargets().map((t) => t.value.name)};
  final releaseYaml = CiYamlSet(
    yamls: {
      CiType.any: schedulerConfig,
    },
    slug: RepositorySlug.full('flutter/flutter'),
    branch: 'flutter-3.27-candidate.0',
    validate: false,
    isFusion: false,
  );
  final releaseNames = {...releaseYaml.postsubmitTargets().map((t) => t.value.name)};

  print("********************************");
  print(releaseNames.contains('Linux docs_publish'));  // false
  print(masterNames.contains('Linux docs_publish')); // true - generate docs in postsubmit
  print("********************************");
```


Fixes flutter#162552
  • Loading branch information
jtmcdole authored Feb 1, 2025
1 parent 039d0db commit f56d5a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,12 @@ targets:
timeout: 60
dimensions:
os: "Linux"
enabled_branches:
# Produces docs for main-api.flutter.dev
# stable and beta are managed by the targets:
# - Linux docs_deploy_beta
# - Linux docs_deploy_stable
- master
properties:
cores: "32"
dependencies: >-
Expand All @@ -591,7 +597,6 @@ targets:
validation_name: Docs
firebase_project: main-docs-flutter-prod
release_ref: refs/heads/master
release_build: "true"
drone_dimensions:
- os=Linux

Expand Down

0 comments on commit f56d5a9

Please sign in to comment.