Skip to content

Contributing improvements - #1792

Closed
dhensby wants to merge 8 commits into
redis:masterfrom
dhensby:pulls/dev-improvements
Closed

dhensby wants to merge 8 commits into
redis:masterfrom
dhensby:pulls/dev-improvements

Conversation

@dhensby

@dhensby dhensby commented Dec 20, 2021 •

Copy link
Copy Markdown
Contributor

Description

As someone trying to get the test suite running on macOS, the steps in the contributing guide and the test-utils and suite itself could be improved to make contribution easier.

This mainly aims to improve the ease of contributing to the repo on macOS. Whilst Docker on mac does support host networking Docker on mac doesn't support host networks, docker itself is run in a virtualised environment which means the host network is actually to that VM and not to the local host machine. This means that the ports do not actually get exposed as expected.

This PR does:

  1. Documents the need for npm v7+ in the contributing guidelines
  2. Adds titles to the before hooks that bring up docker containers (now if these fail during the test run it's easier to see what failed)
  3. Improve the docker provisioning in the test suite so port forwarding works on macOS.

Outstanding items:

  • The docker cluster tests do not work locally on a mac still (investigating)

Checklist

  • Does npm test pass with this change (including linting)? Not locally
  • Is the new or changed code fully tested? N/A
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)? N/A

@dhensby

dhensby commented Dec 20, 2021

Copy link
Copy Markdown
Contributor Author

The clusters aren't working locally on a mac for me. Presumably because each instance of the redis docker can't communicate with the others when they are using traditional port-forwarding and the host network option doesn't work on mac either.

I'm no Docker expert and I've spent a bit of time looking into this and I'm not sure there's a good way to get it working as currently built. I'd have thought using docker-compose would have been a better solution (though admittedly more rigid) but at least it would work cross-platform rather than linux only as is the case.

@gkorland
gkorland requested a review from leibale January 2, 2022 22:42
@leibale

leibale commented Jan 4, 2022 •

Copy link
Copy Markdown
Contributor

@dhensby all the tests should pass now, wanna test it?

@codecov-commenter

codecov-commenter commented Jan 4, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #1792 (dbbd119) into master (24f3e3f) will decrease coverage by 3.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1792      +/-   ##
==========================================
- Coverage   95.04%   91.97%   -3.08%     
==========================================
  Files         353      353              
  Lines        3311     3315       +4     
  Branches      407      407              
==========================================
- Hits         3147     3049      -98     
- Misses         79      179     +100     
- Partials       85       87       +2     
Impacted Files Coverage Δ
packages/client/lib/commands/ZRANGESTORE.ts 20.00% <0.00%> (-80.00%) ⬇️
packages/client/lib/commands/GETEX.ts 21.42% <0.00%> (-78.58%) ⬇️
packages/client/lib/commands/COPY.ts 33.33% <0.00%> (-66.67%) ⬇️
packages/client/lib/commands/ZINTER.ts 36.36% <0.00%> (-63.64%) ⬇️
packages/client/lib/commands/ZUNION.ts 40.00% <0.00%> (-60.00%) ⬇️
packages/client/lib/commands/GEOSEARCHSTORE.ts 41.66% <0.00%> (-58.34%) ⬇️
packages/client/lib/commands/XAUTOCLAIM.ts 44.44% <0.00%> (-55.56%) ⬇️
packages/client/lib/commands/GEOSEARCH_WITH.ts 50.00% <0.00%> (-50.00%) ⬇️
packages/client/lib/commands/LMOVE.ts 66.66% <0.00%> (-33.34%) ⬇️
packages/client/lib/commands/BLMOVE.ts 66.66% <0.00%> (-33.34%) ⬇️
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24f3e3f...dbbd119. Read the comment docs.

@dhensby

dhensby commented Jan 4, 2022

Copy link
Copy Markdown
Contributor Author

Hi @leibale - thanks so much for looking into this. I'm afraid that the testWithClient tests are still failing, presumably because the docker containers still can't communicate with each other :(

@dhensby

dhensby commented Jan 4, 2022

Copy link
Copy Markdown
Contributor Author

I've tried adding macos (and windows too) to the build matrix as that might make things easier to see if it's working/fixed

@dhensby dhensby closed this Nov 1, 2022
@dhensby
dhensby deleted the pulls/dev-improvements branch November 1, 2022 01:18
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.

3 participants