fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
2.94k stars 409 forks source link

Add ability to run Redis cluster tests in local development #21539

Open mostlikelee opened 3 weeks ago

mostlikelee commented 3 weeks ago

Goal

User story
As a contributor to Fleet server code,
I want to be able to run Redis cluster tests locally
so that I can dramatically increase velocity when working on features or bugs that utilize Redis (live queries)

Context

This request comes after development of https://github.com/fleetdm/fleet/issues/17379 where Redis cluster tests were failing. The long iteration process involved pushing print statements to CI and waiting ~20min for results because that is currently the most viable way to get feedback on cluster tests.

Changes

Product

Engineering

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

Manual testing steps

  1. Step 1
  2. Step 2
  3. Step 3

Testing notes

Confirmation

  1. [ ] Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. [ ] QA (@____): Added comment to user story confirming successful completion of QA.
lukeheath commented 3 weeks ago

@sharon-fdm I'm prioritizing this engineering-initiated story for estimation. Since it will be a straight-forward docker compose addition it should be a quick win.

mostlikelee commented 3 weeks ago

A docker compose already exists (CI is using this currently), but win/mac are excluded from running the tests because of docker desktop networking issues reported ~3yrs ago. There could be a chance Docker resolved this issue, but it may not be a trivial solution. Still worth a timeboxed effort IMO.

sharon-fdm commented 3 weeks ago

Thanks @lukeheath. SGTM.

lukeheath commented 3 weeks ago

@mostlikelee Maybe the solution is to stand up a linux VM to run the server in, and connect to it locally via ngrok?

lukeheath commented 3 weeks ago

Given there isn't an immediate need for more redis-cluster work, we may want to wait and roll this in next time we work on it.

sharon-fdm commented 3 weeks ago

Suggestion from the team: Automate a way to move dev env to Linux (e.g. EC2).

sharon-fdm commented 3 weeks ago

Timebox to 2 points