Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add setup script for running in Flutter "customer testing" #1300

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Jan 23, 2025

Earlier I'd tried adding this "apt install" command directly in the test registry, as a "setup" line in the "zulip.test" file:
flutter/tests#441

But the Flutter "customer testing" suite gets run in two different environments; and it turns out that not only does the LUCI environment not need this step (the Zulip tests there were working fine right up until they were disabled last week due to the failures in GitHub Actions), but it also doesn't permit it: there's no access to sudo:
https://discord.com/channels/608014603317936148/1290464157765865552/1331449169830871122
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20customer_testing/22301/overview

Error output (reformatted):

Processing ./../../bin/cache/pkg/tests/registry/zulip.test...
>> sudo apt install -y libsqlite3-dev
| sudo: a terminal is required to read the password;
  either use the -S option to read from standard input
  or configure an askpass helper
ERROR: Setup command failed: sudo apt install -y libsqlite3-dev

So we need this bit of conditional logic too. That makes this a little more complex than fits in a "setup" line in the test registry. So instead let's make this script which we can invoke from there.

Earlier I'd tried adding this "apt install" command directly in the
test registry, as a "setup" line in the "zulip.test" file:
  flutter/tests#441

But the Flutter "customer testing" suite gets run in two different
environments; and it turns out that not only does the LUCI environment
not need this step (the Zulip tests there were working fine right up
until they were disabled last week due to the failures in GitHub
Actions), but it also doesn't permit it: there's no access to `sudo`:
  https://discord.com/channels/608014603317936148/1290464157765865552/1331449169830871122
  https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20customer_testing/22301/overview

Error output (reformatted):

    Processing ./../../bin/cache/pkg/tests/registry/zulip.test...
    >> sudo apt install -y libsqlite3-dev
    | sudo: a terminal is required to read the password;
      either use the -S option to read from standard input
      or configure an askpass helper
    ERROR: Setup command failed: sudo apt install -y libsqlite3-dev

So we need this bit of conditional logic too.  That makes this a
little more complex than fits in a "setup" line in the test registry.
So instead let's make this script which we can invoke from there.
@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Jan 23, 2025
@gnprice gnprice requested a review from chrisbobbe January 23, 2025 22:29
@chrisbobbe
Copy link
Collaborator

Thanks, LGTM! Merging.

@chrisbobbe chrisbobbe merged commit ae7939a into zulip:main Jan 23, 2025
1 check passed
@gnprice gnprice deleted the pr-upstream-test-setup branch January 23, 2025 22:56
gnprice added a commit to gnprice/flutter_customer_testing that referenced this pull request Jan 23, 2025
This re-lands 8cf7a67.

Difference from previous version: This version has the new setup step
do its work only where `sudo` is available (in GitHub Actions), and
successfully do nothing where it's unavailable (in LUCI).  The step
isn't needed in LUCI.

The logic lives in a setup script added today to the Zulip tree:
  zulip/zulip-flutter#1300
auto-submit bot pushed a commit to flutter/tests that referenced this pull request Feb 5, 2025
This re-lands 8cf7a67 / #441.

Difference from previous version: This version has the new setup step do its work only where `sudo` is available (in GitHub Actions), and successfully do nothing where it's unavailable (in LUCI).  The step isn't needed in LUCI.

The logic lives in a setup script added today to the Zulip tree:
  zulip/zulip-flutter#1300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer review PR ready for review by Zulip maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants