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

Updating CI Python images #1507

Merged
merged 4 commits into from
Dec 18, 2020
Merged

Updating CI Python images #1507

merged 4 commits into from
Dec 18, 2020

Conversation

Marc-Andre-Rivet
Copy link
Contributor

We've previously had issues moving to newer versions of these CI images, at least part of the issue seems to be that Chromedriver 75 changed a capabilities flag for logging.

https://chromedriver.chromium.org/downloads

Renamed capability loggingPrefs to goog:loggingPrefs, as required by W3C standard

This PR proposes to add the flag (while keeping the old one for non-core projects still using older CI images


Also changes expected behavior for rdif001 as as of Chrome 87 running this test only results in warnings, now correctly not being picked up by get_logs(). As of Chrome 89 this behavior will change and at least 1 error will be present. This will require the test to be updated again and to have a different behavior in Python 2.7 vs. 3.x unless we manually update the version of Chrome used in that test.

@@ -13,7 +13,7 @@ jobs:

artifacts:
docker:
- image: circleci/python:3.7.6-stretch-node-browsers
- image: circleci/python:3.7.9-stretch-node-browsers
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bump to latest patch version for each Python version, side-effect is that this updates the version of Chrome

Copy link
Collaborator

Choose a reason for hiding this comment

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

Two thoughts:

  1. should we switch to circleci's "next-gen" images? https://circleci.com/developer/images/image/cimg/python
  2. Maybe a bigger task, but should we be switching from py3.7 to py3.9?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexcjohnson I can certainly look into those. If possible I'd like to do these in a follow up as this work was initiated by an issue @harryturr encountered as part of his current work assignment.

@@ -431,6 +431,7 @@ def _get_chrome(self):

capabilities = DesiredCapabilities.CHROME
capabilities["loggingPrefs"] = {"browser": "SEVERE"}
capabilities["goog:loggingPrefs"] = {"browser": "SEVERE"}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add ChromeDriver 75+ correct capabilities. Keep the old one for compatibility.

@@ -57,4 +57,4 @@ def apply_cors(response):
dash_duo.wait_for_element_by_id("btn").click()
dash_duo.wait_for_element("#output-0").text == "0=1"

assert len(dash_duo.get_logs()) != 0
assert dash_duo.get_logs() == []
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This log entry in Chrome 87 is a warning and now not included.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃

@Marc-Andre-Rivet Marc-Andre-Rivet merged commit 34b1119 into dev Dec 18, 2020
@Marc-Andre-Rivet Marc-Andre-Rivet deleted the browser-capabilities branch December 18, 2020 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants