Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[ci] Update Chrome install script and version. #5098

Merged
merged 4 commits into from
Mar 24, 2022

Conversation

ditman
Copy link
Member

@ditman ditman commented Mar 22, 2022

This brings the version of Chrome that we use for integration web tests in line with the one used by flutter/flutter and flutter/engine.

No Issue (that I could find); at first I thought this would help with a test that I'm writing for an unrelated issue, but then I thought that the improvements to the script might be interesting (we might want to rollback the chromium build_id to what was there before?)

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

This brings the version of Chrome that we use for integration web tests
in line with the one used by flutter/flutter and flutter/engine.
@ditman ditman requested a review from stuartmorgan-g March 22, 2022 00:54
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

mkdir "$TARGET_DIR"
wget --no-verbose "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${CHROMIUM_BUILD}%2Fchrome-linux.zip?alt=media" -O "$TARGET_DIR"/chromium.zip
unzip "$TARGET_DIR"/chromium.zip -d "$TARGET_DIR"/
mkdir $TARGET_DIR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the quotes here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I had no idea what I was doing, but I've done some reading now :P

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readonly CHROMIUM_BUILD=929514

# The correct ChromeDriver is distributed alongside the chromium build above, as
# `chromedriver_linux64.zip`, so no need to hardcode any extra info about it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know if this will be true in general going forward?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been true since February 2019:

But I don't have any guarantees that this is going to continue to be true in the future (but it's very convenient as is!). Let me ask in YAQS, see if anybody responds.

Copy link
Member Author

@ditman ditman Mar 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found where it started to happen (it's mentioned as a "temporary" workaround):

https://bugs.chromium.org/p/chromedriver/issues/detail?id=2656#c15

The issue is currently assigned to a Googler, I'll try to reach out to them when they're back in the office.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been true since February 2019

That sounds like the kind of "temporary" that's not likely to change a lot, so it seems fine to depend on. It's not like it's hard to go back to the old approach if it's changed without something better (and it sounds like it would probably remain this way until there's something better).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if this assumption changes, we'd also need to change the CIPD roller script in the engine repo (but that thing only runs seldomly, this script would break much earlier)

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ditman
Copy link
Member Author

ditman commented Mar 23, 2022

video player seems to be legitimately failing:

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════
The following PlatformException was thrown running a test:
PlatformException(VideoError, Failed to load video: The requested
URL was not found on this server., null, null)

But when the same URL is tested here it seems to work:

https://www.hlsplayer.net/#type=m3u8&src=https%3A%2F%2Fcph-p2p-msl.akamaized.net%2Fhls%2Flive%2F2000341%2Ftest%2Fmaster.m3u8

@stuartmorgan-g
Copy link
Contributor

Transient server failure maybe? I really need to finish getting #4987 working to eliminate that URL.

@stuartmorgan-g
Copy link
Contributor

I extracted the video_player part of that PR into #5103 since they are particular problematic (as demonstrated here).

@ditman
Copy link
Member Author

ditman commented Mar 23, 2022

Transient server failure maybe?

Looks like either a transient failure, or that we're getting throttled/rate limited. After a rerun, a different package failed (both tests use the same m3u8 URL, though!):

First:

The following packages had errors:
  video_player_avfoundation:

Then:

The following packages had errors:
  video_player/video_player:

I extracted the video_player part of that PR into #5103 since they are particular problematic (as demonstrated here).

Thanks for prioritizing that fix, I'll take a look!

@stuartmorgan-g
Copy link
Contributor

That's landed, so hopefully merging main in will fix this test.

@ditman
Copy link
Member Author

ditman commented Mar 23, 2022

Looking much better in the current run (All ios test seem to have passed now). (Knock on wood.)

@ditman ditman added waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. last mile and removed needs tests labels Mar 24, 2022
@ditman
Copy link
Member Author

ditman commented Mar 24, 2022

(No tests for this .sh file yet, I guess it could get migrated as a dart tool?)

@fluttergithubbot fluttergithubbot merged commit 86b3621 into flutter:main Mar 24, 2022
@ditman ditman deleted the update-installed-chrome branch March 24, 2022 00:26
@stuartmorgan-g
Copy link
Contributor

(No tests for this .sh file yet, I guess it could get migrated as a dart tool?)

Potentially, but it's so simple that I tend to categorize it as "it is a test"; there's no way for it to fail without the tests that need it failing. (Unlike most of the repo tooling, where silently not failing when it should is a very real danger that's happened a bunch of times in the past.) We could potentially even teach the bot to ignore that specific file.

@ditman
Copy link
Member Author

ditman commented Mar 24, 2022

I tend to categorize it as "it is a test"; there's no way for it to fail without the tests that need it failing.

Yeah, that is a very good point!

@ditman ditman removed waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. last mile labels Mar 24, 2022
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants