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

Enable hot reload by default #6940

Conversation

AndrewChubatiuk
Copy link
Collaborator

What type of PR is this?

Enabled hot reload by default

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.76%. Comparing base (372adfe) to head (6007a57).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6940   +/-   ##
=======================================
  Coverage   63.76%   63.76%           
=======================================
  Files         161      161           
  Lines       13085    13085           
  Branches     1812     1812           
=======================================
  Hits         8344     8344           
  Misses       4438     4438           
  Partials      303      303           

@AndrewChubatiuk
Copy link
Collaborator Author

@eradman could you please review?

-w${REDASH_WEB_WORKERS:-4} redash.wsgi:app \
--max-requests $MAX_REQUESTS \
--max-requests-jitter $MAX_REQUESTS_JITTER \
--timeout $TIMEOUT ${args[@]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's make "$args" a simple string instead of a BASH array

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

moved --reload arg to compose file instead and added ability to pass command extra args to server process, which can be useful for helm chart as well

@eradman
Copy link
Collaborator

eradman commented May 3, 2024

This did not work for me. After starting with make up, I did not see the server reload after editing files in redash/...

docker compose logs -f server

@AndrewChubatiuk
Copy link
Collaborator Author

AndrewChubatiuk commented May 3, 2024

@eradman please set SERVER_MOUNT=/app in your .env file and try again

@AndrewChubatiuk
Copy link
Collaborator Author

@eradman modified makefile to add SERVER_MOUNT=/app to .env

@justinclift
Copy link
Member

Interesting, the concept of the PR seems useful.

@AndrewChubatiuk
Copy link
Collaborator Author

@justinclift could you check PR? almost impossible to get any feedback from @eradman

@@ -4,6 +4,10 @@ export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
export COMPOSE_PROFILES=local

define random
$(shell cat /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
Copy link
Member

Choose a reason for hiding this comment

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

Why the change from pwgen, and why is it in this PR?

I'm pretty sure we've had the conversation before about not including extra things in PRs, as it slows down the review process. 😦

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pwgen is not a default tool, this approach should work out of box on linux and on mac
without this change i cannot test locally

Copy link
Member

Choose a reason for hiding this comment

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

Interesting. Well, it does seem to work ok, and the quality of randomness doesn't really make a difference for development.

The pwgen change should really be in its own PR though, as it's a distinct thing.

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.

None yet

3 participants