-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Screenshotting] fix revision number used for mac and windows downloads of chromium #155313
[Screenshotting] fix revision number used for mac and windows downloads of chromium #155313
Conversation
@@ -46,7 +46,7 @@ async function getChromiumRevision( | |||
kibanaPuppeteerVersion: PuppeteerRelease, | |||
log: ToolingLog | |||
): Promise<ChromiumRevision> { | |||
const url = `https://raw.githubusercontent.com/puppeteer/puppeteer/v${kibanaPuppeteerVersion}/src/revisions.ts`; | |||
const url = `https://raw.githubusercontent.com/puppeteer/puppeteer/v${kibanaPuppeteerVersion}/packages/puppeteer-core/src/revisions.ts`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was needed to make the node ./scripts/chromium_version.js
command work again
log.info(`Found Chromium commit ${commit} from revision ${revision}.`); | ||
log.info(`Mac x64 download: ${baseUrl}/Mac/${revision}/chrome-mac.zip`); | ||
log.info(`Mac ARM download: ${baseUrl}/Mac_Arm/${revision}/chrome-mac.zip`); | ||
log.info(`Windows x64 download: ${baseUrl}/Win/${revision}/chrome-win.zip`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added these as a testing shortcut
body = { | ||
success: true, | ||
help: [], | ||
logs: info.join('\n'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The response from the diagnostic/screenshot
API has a logs
field - but that was never used for anything useful.
This PR uses that field to add version info that we now capture during screenshot generation. This info can be found in the network inspector during testing the diagnostic API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tim, you've made quite a bit of nice changes apart from just updating the revision. I guess we also need to port them to main
032fef8
to
6067e25
Compare
4eeff8e
to
2682669
Compare
@@ -27,6 +27,7 @@ export async function getPdf( | |||
data: await browser.printA4Pdf({ title, ...options }), | |||
title: null, | |||
description: null, | |||
versionInfo: await browser.getVersion(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really don't need there, since the version info is only needed for the tests. This PR tests the version string by getting a screenshot and using the Screenshot
interface. Taking a screenshot is the easiest way to start interacting with the browser driver, which has the getVersion()
method and we don't have access to that elsewhere. Unfortunately, this affects everything that returns a screenshot.
@Dosant I want to try solving the problem a different way. The problem is: how to test the Chromium version string in a running instance. For now, I will back out the test changes that have this impacts to the Screenshot interface, since it got messy. I'll change this PR to just make the correction to the revision number. |
0bd08a6
to
d6dc928
Compare
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/appex-sharedux (Team:SharedUX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense Tim! totally agree
…ds of chromium (elastic#155313) ## Summary Closes elastic#155681 Fixes an issue where Mac and Windows Chromium downloads are referencing a bucket from an older version of Kibana. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - This has not completed since designing tests around this will take some time: elastic#155753 ### Release note Fixed an issue for Windows and Mac where the Reporting plugin downloaded an older version of Chromium. All OS types are now synchronized to 107.0.5296.0 (cherry picked from commit 4217ec2)
…ds of chromium (elastic#155313) ## Summary Closes elastic#155681 Fixes an issue where Mac and Windows Chromium downloads are referencing a bucket from an older version of Kibana. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - This has not completed since designing tests around this will take some time: elastic#155753 ### Release note Fixed an issue for Windows and Mac where the Reporting plugin downloaded an older version of Chromium. All OS types are now synchronized to 107.0.5296.0 (cherry picked from commit 4217ec2)
…ds of chromium (elastic#155313) Closes elastic#155681 Fixes an issue where Mac and Windows Chromium downloads are referencing a bucket from an older version of Kibana. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - This has not completed since designing tests around this will take some time: elastic#155753 Fixed an issue for Windows and Mac where the Reporting plugin downloaded an older version of Chromium. All OS types are now synchronized to 107.0.5296.0 (cherry picked from commit 4217ec2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Summary
Closes #155681
Fixes an issue where Mac and Windows Chromium downloads are referencing a bucket from an older version of Kibana.
Checklist
Release note
Fixed an issue for Windows and Mac where the Reporting plugin downloaded an older version of Chromium. All OS types are now synchronized to 107.0.5296.0