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

Enhance compatibility with Docker locally for E2E #9183

Closed
3 tasks
aaemnnosttv opened this issue Aug 12, 2024 · 1 comment
Closed
3 tasks

Enhance compatibility with Docker locally for E2E #9183

aaemnnosttv opened this issue Aug 12, 2024 · 1 comment
Labels
P1 Medium priority QA: Eng Requires specialized QA by an engineer Team S Issues for Squad 1 Type: Infrastructure Engineering infrastructure & tooling

Comments

@aaemnnosttv
Copy link
Collaborator

aaemnnosttv commented Aug 12, 2024

Feature Description

Newer versions of Docker Desktop don't expose the default socket (/var/run/docker.socket) by default

image

If disabled, this will cause E2E test runs to fail without an obvious reason as it is expected to exist since E2E requires Docker.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • Local E2E runs should run consistently (not specifically pass), regardless of the "Allow default Docker socket to be used" setting
  • If Docker cannot be communicated with, exit the process with an error message
Failed to connect to Docker with the following error: { message }

Implementation Brief

  • Upgrade dockerode to the latest version (currently 4.0.2), as it will properly find the socket by default including better support cross-platform
  • Remove the hardcoded socket path currently provided
    const docker = new Docker( { socketPath: '/var/run/docker.sock' } );
  • If Docker is unable to be communicated with, exit the process with a more informative error message as per AC

Test Coverage

  • No changes – test infra

QA Brief

This can be tested a few ways

  1. Edit tests/e2e/bin/test-docker-connectivity and give Docker a non-existent socket path, then run E2E as usual npm run test:e2e
- const docker = new Docker();
+ const docker = new Docker( { socketPath: '/non/existent' } );
  1. Stop Docker entirely (engine) and run tests/e2e/bin/test-docker-connectivity. You should see the error message and a non-successful error code.

Changelog entry

  • N/A
@aaemnnosttv aaemnnosttv added P1 Medium priority Type: Infrastructure Engineering infrastructure & tooling labels Aug 12, 2024
@aaemnnosttv aaemnnosttv self-assigned this Aug 12, 2024
@binnieshah binnieshah added Next Up Issues to prioritize for definition Team S Issues for Squad 1 labels Aug 15, 2024
@aaemnnosttv aaemnnosttv mentioned this issue Aug 24, 2024
18 tasks
@aaemnnosttv aaemnnosttv added the QA: Eng Requires specialized QA by an engineer label Aug 24, 2024
@aaemnnosttv aaemnnosttv removed their assignment Aug 24, 2024
@tofumatt tofumatt assigned tofumatt and unassigned tofumatt Aug 26, 2024
@binnieshah binnieshah removed the Next Up Issues to prioritize for definition label Aug 27, 2024
@10upsimon 10upsimon self-assigned this Aug 29, 2024
@10upsimon
Copy link
Collaborator

QA:ENG PASS

  • ✅ Altered tests/e2e/bin/test-docker-connectivity and set non existent socket, const docker = new Docker( { socketPath: '/non/existent' } );
  • ✅ Stopped Docker engine
  • ✅ Executed tests/e2e/bin/test-docker-connectivity
  • ✅Noted error message: Failed to connect to Docker from Node with message: "connect ENOENT /non/existent"

@10upsimon 10upsimon removed their assignment Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Medium priority QA: Eng Requires specialized QA by an engineer Team S Issues for Squad 1 Type: Infrastructure Engineering infrastructure & tooling
Projects
None yet
Development

No branches or pull requests

4 participants