docs: update docker container and celery worker chrome installation
SUMMARY
The existing documentation has the user download the latest release of Chrome and use ChromeDriver v102. This combination doesn't function, providing the user with an error saying the Chrome version is unsupported from ChromeDriver during alert/report generation.
This update pulls both the version of Chrome and ChromeDriver from the Chrome Labs repository which is centrally maintained and allows for both the Chrome and ChromeDriver version to stay in lock step.
Additionally the Superset base image version and Chrome versions can be set as build-args during image creation.
TESTING INSTRUCTIONS
- Build the container as per
docs/docs/configuration/alerts-reports.mdxwith a customised tag - Update
x-superset-imageindocker-compose.ymlto point to your customised tag - Start the stack, configure SMTP, create then fire a report
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
@Malcolm Thanks for this PR and sorry it took so long for you to get a review! It looks great to me but I haven't set up Chrome for my reporting and this isn't something I know much about. I've put this to a few people for review and hopefully someone can take a look.
And if no one is able to weigh in, I'd say let's err on the side of merging this - I'll put a calendar reminder for myself to circle back here.
Disregard my previous review/comment, is there not an easier/cleaner way to install this!? I didn't like the way we did it before, and this seems like a good iteration based on this approach, but would there be a better way?
Hey, looking at playwright, it seems we may be able to streamline things quite a bit by consistently using it to install headless browsers, both chromium and firefox. Wondering if we should target that instead. Also wondering if we could make sure we install versions while using playwright, something like playwright install --with-deps [email protected] [email protected] seems like it may work and simplify both our dockerfile and documentation
Maybe we don't need to run:
apt-get install -y libglib2.0-0 libnss3 libxcb1 libatk1.0-0 libatk-bridge2.0-0 \
libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 \
libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2
This command will install these packages:
apt-get install -y --no-install-recommends ./google-chrome-*.deb
Additionally, we can obtain a version of Chrome using a command, so we don't need to fix one:
export CHROMEDRIVER_VERSION=$(curl --silent https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_116)
Can we look into using the playwright approach instead? Seems it would simplify all this greatly - both for Firefox and Chromium
Converting this to draft whilst it awaits feedback to the questions on the thread, since it's been silent for so long. It may be closed due to inactivity eventually, but please let us know if/when it's ready for re-review!