Update site_config to use wildcard string for generic matching, rather than localhost
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 19
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
When identifying the host and updating site.hub, site_config.get_config checks for the given site_host, the hostname of the computer, or 'localhost' in the site config file. Use of 'localhost' in the SCF should be discouraged.
This is done here:
https://github.com/simonsobs/ocs/blob/0709db2ae1ac11dbb808282d866b23de554b6d41/ocs/site_config.py#L445
'localhost' should be replace with some unique wildcard string, i.e. '*default*', and a warning should be issued when it's used. The idea being that if you know the hostname, that should be configured in the SCF. Else, you're probably using this wildcard for some local testing on a single node.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ocs/site_config.py at site_config.get_config, especially the matching logic around lines 402 and 445. Replace the localhost fallback with the requested unique wildcard and issue a warning when that wildcard is used; done means generic matching no longer relies on localhost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100