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

DM-40422: Add use of RAPID_ANALYSIS_LOCATION to getSite for k8s pod use #58

Merged
merged 1 commit into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/lsst/summit/utils/efdUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def makeEfdClient(testing=False):
return EfdClient('tucson_teststand_efd')
if site == 'base':
return EfdClient('base_efd')
if site in ['staff-rsp', 'rubin-devl']:
if site in ['staff-rsp', 'rubin-devl', 'usdf-k8s']:
return EfdClient('usdf_efd')
if site == 'jenkins':
return EfdClient('usdf_efd')
Expand Down
13 changes: 12 additions & 1 deletion python/lsst/summit/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@ def getSite():
Returns
-------
location : `str`
One of ['tucson', 'summit', 'base', 'staff-rsp', 'rubin-devl']
One of:
['tucson', 'summit', 'base', 'staff-rsp', 'rubin-devl', 'jenkins',
'usdf-k8s']

Raises
------
Expand Down Expand Up @@ -590,6 +592,15 @@ def getSite():
if jenkinsHome != "":
return 'jenkins'

# we're probably inside a k8s pod doing rapid analysis work at this point
location = os.getenv('RAPID_ANALYSIS_LOCATION', "")
if location == "TTS":
return 'tucson'
if location == "SUMMIT":
return 'summit'
if location == "USDF":
return 'usdf-k8s'

# we have failed
raise ValueError('Location could not be determined')

Expand Down