From 6d905108910ead169826b220c1eef59f33f25f3b Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 31 Aug 2023 08:15:03 -0400 Subject: [PATCH 1/5] Add LUCI presubmit check --- .ci/scripts/check_version.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.ci/scripts/check_version.sh b/.ci/scripts/check_version.sh index a695281d7e2..4e7d0ecbcd8 100755 --- a/.ci/scripts/check_version.sh +++ b/.ci/scripts/check_version.sh @@ -4,14 +4,13 @@ # found in the LICENSE file. set -e -# For pre-submit, this is currently run in Cirrus; see TODO below. +# For pre-submit, check for missing or breaking changes that don't have a +# corresponding override label. # For post-submit, ignore platform interface breaking version changes and # missing version/CHANGELOG detection since PR-level overrides aren't available # in post-submit. if [[ $LUCI_PR == "" ]]; then ./script/tool_runner.sh version-check --ignore-platform-interface-breaks else - # TODO(stuartmorgan): Migrate this check from Cirrus. See - # https://github.com/flutter/flutter/issues/130076 - : + ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$PR_OVERRIDE_LABELS" fi From 0a7de2fdc84a4c0107c65c9979ca28081b6b5541 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 31 Aug 2023 08:16:24 -0400 Subject: [PATCH 2/5] Remove Cirrus config and Dockerfile --- .ci/Dockerfile | 6 ------ .cirrus.yml | 34 ---------------------------------- 2 files changed, 40 deletions(-) delete mode 100644 .ci/Dockerfile delete mode 100644 .cirrus.yml diff --git a/.ci/Dockerfile b/.ci/Dockerfile deleted file mode 100644 index fb93ac9f35c..00000000000 --- a/.ci/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -# The Flutter version is not important here, since the CI scripts update Flutter -# before running. What matters is that the base image is pinned to minimize -# unintended changes when modifying this file. -FROM cirrusci/flutter@sha256:d99b1ba2602240a74722970b5c0cd704bbe60a7eba7557157c784f2f693c393f - -RUN apt-get update -y diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 71b801f4223..00000000000 --- a/.cirrus.yml +++ /dev/null @@ -1,34 +0,0 @@ -gcp_credentials: ENCRYPTED[!9409b709ab4de7293a70606cca13eaf42e9cbc704e8a6b4e3d2b09484cf997cbd2334e1eeafe23626ad07a726106df90!] - -# Run on PRs and main branch post submit only. Don't run tests when tagging. -only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'main') - -setup_template: &SETUP_TEMPLATE - upgrade_flutter_script: - - PINNED_VERSION=$(< .ci/flutter_master.version) - # Ensure that the repository has everything. - - cd $FLUTTER_HOME - - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - - git fetch origin - # Switch to the pinned master version. - - git checkout $TARGET_TREEISH - # Run doctor to allow auditing of what version of Flutter the run is using. - - flutter doctor -v - tool_setup_script: - - .ci/scripts/prepare_tool.sh - -task: - << : *SETUP_TEMPLATE - gke_container: - dockerfile: .ci/Dockerfile - builder_image_name: docker-builder-linux # gce vm image - builder_image_project: flutter-cirrus - cluster_name: test-cluster - zone: us-central1-a - namespace: default - matrix: - # TODO(stuartmorgan): Migrate this to LUCI; See check_version.sh. - - name: version_check - only_if: $CIRRUS_PR != '' - version_script: - - ./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS" From 25f5116ca0c91e98e9d8157ebc89e51c4b5a1297 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 31 Aug 2023 08:17:39 -0400 Subject: [PATCH 3/5] Bogus change for testing --- packages/xdg_directories/lib/xdg_directories.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/xdg_directories/lib/xdg_directories.dart b/packages/xdg_directories/lib/xdg_directories.dart index 7e115a5aab2..dede5e60a50 100644 --- a/packages/xdg_directories/lib/xdg_directories.dart +++ b/packages/xdg_directories/lib/xdg_directories.dart @@ -11,7 +11,7 @@ import 'package:meta/meta.dart'; import 'package:path/path.dart' as path; // From errno definitions. -const int _noSuchFileError = 2; +const int _noSuchFileError = 3; /// An override function used by the tests to override the environment variable /// lookups using [xdgEnvironmentOverride]. From a3766c3216eae8e1537f9ad8ff89351faea25ac5 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 31 Aug 2023 14:16:40 -0400 Subject: [PATCH 4/5] Move publishability to the end since it's slow --- .ci/targets/repo_checks.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.ci/targets/repo_checks.yaml b/.ci/targets/repo_checks.yaml index 72a4691a4f2..ebf4994cd57 100644 --- a/.ci/targets/repo_checks.yaml +++ b/.ci/targets/repo_checks.yaml @@ -44,13 +44,14 @@ tasks: script: script/tool_runner.sh args: ["dependabot-check"] always: true - - name: publishability - script: script/tool_runner.sh - args: ["publish-check", "--allow-pre-release"] - always: true - name: CHANGELOG and version validation script: .ci/scripts/check_version.sh always: true - name: federated safety check script: .ci/scripts/check_federated_safety.sh always: true + # This is the slowest test, so prefer keeping it last. + - name: publishability + script: script/tool_runner.sh + args: ["publish-check", "--allow-pre-release"] + always: true From 94702b8c5f6361f4c04ab6b972ced1dd02c65fd4 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 31 Aug 2023 14:23:10 -0400 Subject: [PATCH 5/5] Revert sanity check change --- packages/xdg_directories/lib/xdg_directories.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/xdg_directories/lib/xdg_directories.dart b/packages/xdg_directories/lib/xdg_directories.dart index dede5e60a50..7e115a5aab2 100644 --- a/packages/xdg_directories/lib/xdg_directories.dart +++ b/packages/xdg_directories/lib/xdg_directories.dart @@ -11,7 +11,7 @@ import 'package:meta/meta.dart'; import 'package:path/path.dart' as path; // From errno definitions. -const int _noSuchFileError = 3; +const int _noSuchFileError = 2; /// An override function used by the tests to override the environment variable /// lookups using [xdgEnvironmentOverride].