-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
VersionUpstreamValidator was introduced in #97202 to prevent the tool to check for freshness from a different remote than the one used to fetch the updates.
It does that by preventing freshness check and update in case the current channel is tracking a "non-standard remote". An explanation of what is considered as a "standard remote" is provided at the below dartdoc:
flutter/packages/flutter_tools/lib/src/version.dart
Lines 415 to 417 in e827f0b
| /// A "standard remote" is one having the same url as(in order of precedence): | |
| /// * The value of `FLUTTER_GIT_URL` environment variable. | |
| /// * The HTTPS or SSH url of the Flutter repository as provided by GitHub. |
However, it appears that the validator completely ignores FLUTTER_GIT_URL in the case reproducible through the following steps:
Steps to Reproduce
- Make sure that the current branch/channel is tracking a standard remote, by verifying the output of
flutter doctor -v:
[✓] Flutter (Channel master, 2.13.0-0.0.pre.219, on Artix Linux 5.16.14-artix1-1, locale en_IN.UTF-8)
• Flutter version 2.13.0-0.0.pre.219 at /home/rarg/.local/src/flutter_sdk_master
• Upstream repository https://github.com/flutter/flutter.git- Run the following command:
$ FLUTTER_GIT_URL='' flutter upgradeExpected results:
Since FLUTTER_GIT_URL is set to a non-standard url, the upgrade should fail.
Actual results:
The upgrade completes successfully.
flutter doctor -v
[✓] Flutter (Channel master, 2.13.0-0.0.pre.219, on Artix Linux 5.16.14-artix1-1, locale en_IN.UTF-8)
• Flutter version 2.13.0-0.0.pre.219 at /home/rarg/.local/src/flutter_sdk_master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f1d8e30c4b (13 minutes ago), 2022-03-23 14:55:11 +0800
• Engine revision 4fbff7a511
• Dart version 2.17.0 (build 2.17.0-227.0.dev)
• DevTools version 2.11.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /opt/android-sdk
• Platform android-31, build-tools 29.0.2
• ANDROID_HOME = /opt/android-sdk
• ANDROID_SDK_ROOT = /opt/android-sdk
• Java binary at: /usr/bin/java
• Java version openjdk version "11.0.15" 2022-04-19
• All Android licenses accepted.
[✓] Chrome - develop for the web
• CHROME_EXECUTABLE = /usr/bin/chromium
[✓] Linux toolchain - develop for Linux desktop
• clang version 13.0.1
• cmake version 3.22.3
• ninja version 1.10.2
• pkg-config version 1.8.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Artix Linux 5.16.14-artix1-1
• Chrome (web) • chrome • web-javascript • Chromium 99.0.4844.74 Artix Linux
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.