-
Notifications
You must be signed in to change notification settings - Fork 39
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
fix(config): set localhost default value for REANA_HOSTNAME #630
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #630 +/- ##
==========================================
+ Coverage 73.67% 73.77% +0.10%
==========================================
Files 17 17
Lines 1956 1964 +8
==========================================
+ Hits 1441 1449 +8
Misses 515 515
|
…#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
3d9376d
to
d4df3a3
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
…#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
d4df3a3
to
d31a3dd
Compare
…#717) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-workflow-controller#630 Closes reanahub/reana#865
…#717) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-workflow-controller#630 Closes reanahub/reana#865
…#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
d31a3dd
to
fd40874
Compare
…#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
fd40874
to
8a8da3a
Compare
…#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
8a8da3a
to
f26b0cc
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
reana_workflow_controller/config.py
Outdated
@@ -277,9 +277,12 @@ def _parse_interactive_sessions_environments(env_var): | |||
REANA_GITLAB_URL = "https://{}".format(REANA_GITLAB_HOST) | |||
"""GitLab API URL""" | |||
|
|||
REANA_HOSTNAME = os.getenv("REANA_HOSTNAME", "CHANGE_ME") | |||
REANA_HOSTNAME = os.getenv("REANA_HOSTNAME", "localhost") | |||
"""REANA URL""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: If we take port out of reana_hostname
, we should change the docstring from "REANA URL" to "REANA host name".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
polish: For the release notes, for this component the most important news is that Dask dashboard URLs are correct, so something like the following may be appropriate?
fix(dask): use correct REANA host port for Dask service URLs
reana_workflow_controller/config.py
Outdated
"""REANA URL""" | ||
|
||
REANA_HOSTPORT = os.getenv("REANA_HOSTPORT", "30443") | ||
"""REANA Ingress Port""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: Since "host port" and "ingress" do not have apparent literal connection, let's use a docstring such as
"REANA host name port number". Here but also in Helm value documentation etc.
@@ -196,7 +197,9 @@ def _update_commit_status(workflow, status): | |||
return | |||
gitlab_access_token = gitlab_access_token_secret.value_str | |||
|
|||
target_url = f"https://{REANA_HOSTNAME}/api/workflows/{workflow.id_}/logs" | |||
target_url = ( | |||
f"https://{REANA_HOSTNAME}:{REANA_HOSTPORT}/api/workflows/{workflow.id_}/logs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: If REANA_HOSTPORT
is 443, we don't want to be appending it to HTTPS URLs, because it is more user friendly to write https://reana.cern.ch
instead of https://reana.cern.ch:443
.
You could introduce a new utility function that will compose URL of the host name and host port information, leaving the port aside if it has the default 443 value. (Or use a function from a Python library.)
…b#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
f26b0cc
to
6819003
Compare
…b#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
6819003
to
bcda677
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
…b#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
bcda677
to
bf8d7e1
Compare
…b#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
bf8d7e1
to
64dfed1
Compare
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
reana_workflow_controller/config.py
Outdated
REANA_HOSTPORT = os.getenv("REANA_HOSTPORT", "30443") | ||
"""REANA host name port number.""" | ||
|
||
BASE_REANA_URL = compose_base_reana_url(REANA_HOSTNAME, REANA_HOSTPORT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: We can call the variable REANA_URL
, as we did the past. Alternatively, REANA_BASE_URL
, or REANA_HOST_URL
to make link with host name and host port.
Please note starting with REANA_...
rather than BASE_...
.
(I guess it should be self-understood that it is the base URL of the service, so even REANA_URL
should be OK to use. Well, we also have REANA_SERVER_URL
, so one could say we are detecting REANA_SERVER_URL
from the host name and host port... But rather use something else since that one is usually set by the users. So we may want to keep the distinction of what we detect based on deployment values vs what user sets.)
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
…b#630) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below. reanahub/reana#867 reanahub/reana-server#717 Closes reanahub/reana#865
64dfed1
to
a02767e
Compare
…b#867) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
…b#867) This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reanahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components. You can refer to other PRs below.
reanahub/reana#867
reanahub/reana-server#717
Closes reanahub/reana#865