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

fix(config): set localhost default value for REANA_HOSTNAME #630

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

Alputer
Copy link
Member

@Alputer Alputer commented Jan 31, 2025

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

@Alputer Alputer requested a review from tiborsimko January 31, 2025 11:46
@Alputer Alputer self-assigned this Jan 31, 2025
@Alputer Alputer changed the title fix(config): set localhost default value for REANA_HOSTNAME (#630) fix(config): set localhost default value for REANA_HOSTNAME Jan 31, 2025
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.77%. Comparing base (bb7b2ff) to head (a02767e).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            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              
Files with missing lines Coverage Δ
reana_workflow_controller/config.py 94.44% <100.00%> (+0.28%) ⬆️
reana_workflow_controller/consumer.py 55.76% <100.00%> (ø)
reana_workflow_controller/rest/utils.py 82.50% <ø> (ø)
reana_workflow_controller/rest/workflows.py 68.97% <ø> (ø)

Alputer added a commit to Alputer/reana-workflow-controller that referenced this pull request Jan 31, 2025
…#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
@Alputer Alputer force-pushed the fix-reana-hostname branch from 3d9376d to d4df3a3 Compare January 31, 2025 11:49
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
Alputer added a commit to Alputer/reana-workflow-controller that referenced this pull request Jan 31, 2025
…#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
@Alputer Alputer force-pushed the fix-reana-hostname branch from d4df3a3 to d31a3dd Compare January 31, 2025 12:53
Alputer added a commit to Alputer/reana-server that referenced this pull request Jan 31, 2025
…#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
Alputer added a commit to Alputer/reana-server that referenced this pull request Jan 31, 2025
…#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
Alputer added a commit to Alputer/reana-workflow-controller that referenced this pull request Jan 31, 2025
…#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
@Alputer Alputer force-pushed the fix-reana-hostname branch from d31a3dd to fd40874 Compare January 31, 2025 13:43
Alputer added a commit to Alputer/reana-workflow-controller that referenced this pull request Jan 31, 2025
…#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
@Alputer Alputer force-pushed the fix-reana-hostname branch from fd40874 to 8a8da3a Compare January 31, 2025 13:50
Alputer added a commit to Alputer/reana-workflow-controller that referenced this pull request Jan 31, 2025
…#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
@Alputer Alputer force-pushed the fix-reana-hostname branch from 8a8da3a to f26b0cc Compare January 31, 2025 14:15
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
@@ -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"""
Copy link
Member

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

Copy link
Member

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 URL"""

REANA_HOSTPORT = os.getenv("REANA_HOSTPORT", "30443")
"""REANA Ingress Port"""
Copy link
Member

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"
Copy link
Member

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

Alputer added a commit to Alputer/reana-workflow-controller that referenced this pull request Jan 31, 2025
…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
@Alputer Alputer force-pushed the fix-reana-hostname branch from f26b0cc to 6819003 Compare January 31, 2025 16:19
Alputer added a commit to Alputer/reana-workflow-controller that referenced this pull request Jan 31, 2025
…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
@Alputer Alputer force-pushed the fix-reana-hostname branch from 6819003 to bcda677 Compare January 31, 2025 16:20
Alputer added a commit to Alputer/reana that referenced this pull request Jan 31, 2025
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
Alputer added a commit to Alputer/reana-workflow-controller that referenced this pull request Jan 31, 2025
…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
@Alputer Alputer force-pushed the fix-reana-hostname branch from bcda677 to bf8d7e1 Compare January 31, 2025 16:28
Alputer added a commit to Alputer/reana-workflow-controller that referenced this pull request Jan 31, 2025
…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
@Alputer Alputer force-pushed the fix-reana-hostname branch from bf8d7e1 to 64dfed1 Compare January 31, 2025 16:35
Alputer added a commit to Alputer/reana that referenced this pull request Feb 3, 2025
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_HOSTPORT = os.getenv("REANA_HOSTPORT", "30443")
"""REANA host name port number."""

BASE_REANA_URL = compose_base_reana_url(REANA_HOSTNAME, REANA_HOSTPORT)
Copy link
Member

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

Alputer added a commit to Alputer/reana that referenced this pull request Feb 3, 2025
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
Alputer added a commit to Alputer/reana that referenced this pull request Feb 3, 2025
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
Alputer added a commit to Alputer/reana that referenced this pull request Feb 3, 2025
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
@Alputer Alputer force-pushed the fix-reana-hostname branch from 64dfed1 to a02767e Compare February 3, 2025 14:10
Alputer added a commit to Alputer/reana that referenced this pull request Feb 3, 2025
…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
@tiborsimko tiborsimko merged commit a02767e into reanahub:master Feb 3, 2025
14 checks passed
Alputer added a commit to Alputer/reana that referenced this pull request Feb 3, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

helm: harmonise the treatment of reana_hostname
2 participants