Skip to content

Commit d3a9309

Browse files
Merge pull request #365 from cylc/1.5.x-sync
🤖 Merge 1.5.x-sync into master
2 parents 74c4ff4 + 43922dc commit d3a9309

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ creating a new release entry be sure to copy & paste the span tag with the
66
updated. Only the first match gets replaced, so it's fine to leave the old
77
ones in. -->
88

9+
## __cylc-rose-1.5.1 (<span actions:bind='release-date'>Awaiting release</span>)__
10+
11+
[#361](https://github.com/cylc/cylc-rose/pull/361) -
12+
Rose stem now uses long hostnames for the `HOST_SOURCE...` variables to match
13+
`ROSE_ORIG_HOST`.
14+
915
## __cylc-rose-1.5.0 (<span actions:bind='release-date'>Released 2025-01-09</span>)__
1016

1117
[#353](https://github.com/cylc/cylc-rose/pull/353) - Remove Empy support.

cylc/rose/stem.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,14 @@
6868
import sys
6969

7070
from ansimarkup import parse as cparse
71+
7172
from cylc.flow.exceptions import CylcError
73+
from cylc.flow.hostuserutil import get_host
7274
from cylc.flow.scripts.install import get_option_parser
7375
from cylc.flow.scripts.install import install as cylc_install
76+
7477
import metomi.rose.config
7578
from metomi.rose.fs_util import FileSystemUtil
76-
from metomi.rose.host_select import HostSelector
7779
from metomi.rose.popen import RosePopener
7880
from metomi.rose.reporter import Event, Reporter
7981
from metomi.rose.resource import ResourceLocator
@@ -239,8 +241,6 @@ def __init__(self, opts, reporter=None, popen=None, fs_util=None):
239241
else:
240242
self.fs_util = fs_util
241243

242-
self.host_selector = HostSelector(event_handler=self.reporter,
243-
popen=self.popen)
244244
self.template_section = '[template variables]'
245245

246246
def _add_define_option(self, var, val):
@@ -429,7 +429,7 @@ def _prepend_localhost(self, url):
429429
locations."""
430430
if ':' not in url or url.split(':', 1)[0] not in ['svn', 'fcm', 'http',
431431
'https', 'svn+ssh']:
432-
url = self.host_selector.get_local_host() + ':' + url
432+
url = f'{get_host()}:{url}'
433433
return url
434434

435435
def _parse_auto_opts(self):

tests/functional/test_rose_stem.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828
from uuid import uuid4
2929
from typing import Dict
3030

31-
from metomi.rose.host_select import HostSelector
32-
3331
import pytest
3432

33+
from cylc.flow.hostuserutil import get_host
34+
3535
from cylc.rose.stem import RoseStemVersionException
3636

3737
# We want to test Rose-Stem's insertion of the hostname,
3838
# not Rose's method of getting the hostname, so it doesn't
3939
# Matter that we are using the same host selector here as
4040
# in the module under test:
41-
HOST = HostSelector().get_local_host()
41+
HOST = get_host()
4242

4343

4444
# Check that FCM is present on system, skipping checks elsewise:

0 commit comments

Comments
 (0)