fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Add ability to run Redis cluster tests in local development

Open mostlikelee opened this issue 1 year ago • 7 comments

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

  • Requestor(s): @mostlikelee
  • Product designer: _________________________

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

  • [ ] Reference documentation changes: TODO
  • [ ] UI changes: TODO
  • [ ] CLI usage changes: TODO
  • [ ] REST API changes: TODO
  • [ ] Fleet's agent (fleetd) changes: TODO
  • [ ] Permissions changes: TODO
  • [ ] Changes to paid features or tiers: TODO

Engineering

  • [ ] Feature guide changes: TODO
  • [ ] Database schema migrations: TODO
  • [ ] Load testing: TODO

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

QA

Risk assessment

  • Requires load testing: TODO
  • Risk level: Low / High TODO
  • Risk description: TODO

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.

mostlikelee avatar Aug 23 '24 21:08 mostlikelee

@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.

lukeheath avatar Aug 27 '24 16:08 lukeheath

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.

mostlikelee avatar Aug 27 '24 19:08 mostlikelee

Thanks @lukeheath. SGTM.

sharon-fdm avatar Aug 27 '24 20:08 sharon-fdm

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

lukeheath avatar Aug 27 '24 20:08 lukeheath

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.

lukeheath avatar Aug 27 '24 20:08 lukeheath

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

sharon-fdm avatar Aug 28 '24 18:08 sharon-fdm

Timebox to 2 points

sharon-fdm avatar Aug 28 '24 18:08 sharon-fdm

This technical debt caused https://github.com/fleetdm/fleet/issues/22791 to take a long time and effort to QA.

We had to build + run Fleet server on a Ubuntu VM on Apple Silicon (with complications around docker for arm64, memory issues while building because it's a VM, etc.).

We should revisit if it's still not possible to run Redis cluster on macOS. Maybe we can have a workaround for QA/dev.

/cc @jmwatts @lukeheath @sharon-fdm

lucasmrod avatar Mar 12 '25 21:03 lucasmrod

@lukeheath, this should pay off quickly so worth taking into next sprint.

sharon-fdm avatar Mar 12 '25 21:03 sharon-fdm

@sharon-fdm @lucasmrod I am prioritizing this to the drafting board. Since it has the orchestration tag, I'm assigning to @lucasmrod as the product designer per our new creating and drafting engineering-initiated stories process.

Please follow that process to fully populate the user story, and then bring to user story review before bringing into estimation. That way, all stories flow into the same process. Just let me know if you have any questions or feedback on the process.

lukeheath avatar Mar 18 '25 19:03 lukeheath

@lucasmrod, please tell me if there is any help you need to define this task. If/when you think it's ready, let's move it to Ready for estimation or if the current estimation is correct, to Estimated.

sharon-fdm avatar Mar 19 '25 15:03 sharon-fdm

@sharon-fdm I've updated the issue description with the new template for engineering-initiated stories and have moved it to Ready for estimation.

lucasmrod avatar Mar 20 '25 10:03 lucasmrod

Hey team! Please add your planning poker estimate with Zenhub @dantecatalfamo @jacobshandling @lucasmrod @sgress454

sharon-fdm avatar Mar 20 '25 17:03 sharon-fdm

@dantecatalfamo, I removed the 4.69.0 milestone since this work is not release-bound and can be done regardless of the RC Cut.

sharon-fdm avatar May 22 '25 21:05 sharon-fdm

Redis tests on Mac, Swift as a cloud city's light, Coding bugs take flight.

fleet-release avatar May 27 '25 15:05 fleet-release