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

build: fixes for CI flakes in 3-1-x #18523

Merged
merged 1 commit into from May 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion .circleci/config.yml
@@ -1,5 +1,11 @@
build-steps: &build-steps
steps:
- run:
name: Fix Known Hosts on Linux
command: |
if [ "`uname`" == "Linux" ]; then
/home/builduser/fix-known-hosts.sh
fi
- checkout
- run:
name: Install Node.js 10 on MacOS
Expand Down Expand Up @@ -138,7 +144,7 @@ build-steps: &build-steps

build-defaults: &build-defaults
docker:
- image: electronbuilds/electron:0.0.8
- image: electronbuilds/electron:0.0.8.1
<<: *build-steps

version: 2
Expand Down
7 changes: 7 additions & 0 deletions .circleci/fix-known-hosts.sh
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

mkdir -p ~/.ssh
echo "|1|cVeiko0f+NcBdQ4UQvusKHo8sOA=|VIYt+cwPlbV0iP9VItsw/wlzrEk= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
|1|WDYl7KHWaZFGMa3eqg3iY4KmwzQ=|FWZq//rIJ3lr85ZeTr66c80iLiA= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts
1 change: 1 addition & 0 deletions .dockerignore
@@ -1,3 +1,4 @@
*
!tools/xvfb-init.sh
!tools/run-electron.sh
!.circleci/fix-known-hosts.sh
14 changes: 10 additions & 4 deletions Dockerfile
Expand Up @@ -3,8 +3,7 @@ FROM electronbuilds/libchromiumcontent:0.0.4
USER root

# Set up HOME directory
ENV HOME=/home
RUN chmod a+rwx /home
ENV HOME=/home/builduser

# Install node.js
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
Expand All @@ -13,12 +12,19 @@ RUN apt-get install -y nodejs
# Install wget used by crash reporter
RUN apt-get install -y wget

# Install python-dbusmock
RUN apt-get install -y python-dbusmock
# Install python-dbus
RUN apt-get install -y python-dbus
RUN pip install python-dbusmock
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like it can make sense to port this piece to all other release branches.
Just to avoid issues with python-dbusmock in case there will be a need to rebuild a Docker container for any of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexeykuzmin the newer branches use a newer base docker image which already pulls in a newer version of python-dbusmock, so it is only really needed for 3-1-x

Copy link
Contributor

Choose a reason for hiding this comment

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

@jkleinsc

I've recently built a Docker container from the 4-2-x branch Dockerfile to run tests in, and often see exactly the same failures because of dbus timeouts.

So it looks like the current Docker containers used for E4 builds just happen to have a version of python-dbusmock not affected by that issue.
So I think that pip install python-dbusmock should be used for E4+ builds as well to make sure we always use a newer version of python-dbusmock, which doesn't have the timeout issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, do you know exactly which version of python-dbusmock works fine?
Should be specify this version in the Dockerfile explicitly?
It is probably the latest available today 0.18.1, am I right?


# Install libnotify
RUN apt-get install -y libnotify-bin

# Add xvfb init script
ADD tools/xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb

COPY .circleci/fix-known-hosts.sh /home/builduser/fix-known-hosts.sh
RUN chmod a+x /home/builduser/fix-known-hosts.sh

USER builduser
WORKDIR /home/builduser
2 changes: 2 additions & 0 deletions appveyor.yml
Expand Up @@ -44,6 +44,8 @@ test_script:
Write-Output "Skipping tests for release build"
} else {
$env:RUN_TESTS="true"
Remove-Item Env:\ELECTRON_ENABLE_LOGGING
Remove-Item Env:\ELECTRON_ENABLE_STACK_DUMPING
Write-Output "Running tests for debug build"
}
- if "%RUN_TESTS%"=="true" ( echo Running test suite & python script\test.py --ci --rebuild_native_modules)
Expand Down