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

Evaluate HOST, PORT, and PROXY env vars when Dash.run() is invoked #2908

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

martian0x80
Copy link
Contributor

Fixes #2902

Made the changes as proposed in #2902. Nothing major, just re-evaluates environment variables when Dash.run() is invoked.

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
    • Evaluate the environment variable after Dash.run() is called
  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • I have added entry in the CHANGELOG.md
  • If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follows
    • this GitHub #PR number updates the dash docs
    • here is the show and tell thread in Plotly Dash community

@martian0x80 martian0x80 changed the title fix: evaluate HOST, PORT, and PROXY when Dash.run is invoked, fixes #… Evaluate HOST, PORT, and PROXY env vars when Dash.run is invoked Jun 28, 2024
@martian0x80 martian0x80 changed the title Evaluate HOST, PORT, and PROXY env vars when Dash.run is invoked Evaluate HOST, PORT, and PROXY env vars when Dash.run() is invoked Jun 28, 2024
Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

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

Looks good but also need to set the parameters to None on line 1984-1986

Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

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

Sorry we lost the default arguments by setting the parameters to None, they need the previous default instead.

Also need to add a changelog entry then it's good to merge.

dash/dash.py Outdated
Comment on lines 1984 to 1985
host=None,
port=None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
host=None,
port=None,
host="127.0.0.1",
port="8050",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was planning to ask the same, because they were going to be overwritten anyway, and defaults were already set. Will make the changes.

Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

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

Thank you 💃

@T4rk1n T4rk1n merged commit f0d1645 into plotly:dev Jul 3, 2024
3 checks passed
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.

[BUG] Environment variables from .env file ignored in Dash.run
2 participants