Add top-level config ref
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- tooling
Research direction
No files, tests, or entry points are named in the issue. Start by reviewing the existing schema and config resolution behavior, then clarify how top-level $ref inheritance, property overrides, and Pick/Omit should interact. Done means the supported semantics and edge cases are specified and covered by tests.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
We at Vector team deploy the same service with 99% the same config for different projects (e.g. Metatile-Queue-Populator/ Retiler). The only difference might be the queue which I'm subscribing to or DB name/ S3 Bucket/ directory in a S3 bucket. Currently, I'll have to create config-per-instance and maintain each one of them (which will result in duplicate config - in the current state of schema and service).
I also expect that I would be able to override properties from the shared config.
Describe the solution you'd like
I would like to be able to top-level $ref a "shared" config in the specific project config's and inherit it's config and override the properties which are project-specific.
Describe alternatives you've considered
Change the schema (again).
Additional context
This will enable us to create ts-server-boilerplate shared config and many more copy-paste config
An example
// shared schema
{
"foo": {
"type": "string"
},
"bar": {
"type": "string"
}
}
// shared config
{
"foo": "avi1",
"bar": "avi2"
}
// "full" schema
{
"$ref": "#/ref/to/shared/schema",
"baz": {
"type": "string"
}
}
// => which results to
{
"foo": {
"type": "string"
},
"bar": {
"type": "string"
},
"baz": {
"type": "string"
}
}
// "full" config
{
"$ref": "#/ref/to/shared/config",
"baz": "avi3"
}
// => which results to
{
"foo": "avi1",
"bar": "avi2",
"baz": "avi3"
}
//another valid edge-case option
{
"$ref": "#/ref/to/shared/config",
"foo": "avi420"
"baz": "avi3"
}
// => which results to
{
"foo": "avi420",
"bar": "avi2",
"baz": "avi3"
}
Points to consider:
I think we should also have Pick-Omit $ref support in order to, as you probably already guessed, pick a config value/ omit one.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing 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.
More from MapColonies/config-server
-
healthchek mechanism based on DB connectionMay be free again @netanelC claimed this 624 days ago, and no pull request is open. Openbug
MapColonies/config-server#71 · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
MapColonies/config-server#61 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
MapColonies/config-server#55 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MapColonies/config-server#53 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
MapColonies/config-server#52 ·
All issues in MapColonies/config-server
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
openzim/mwoffliner#2933 ·
Maintainers usually reply within 1 day
-
Use the README category name for website links and submissionsPossibly taken @dajiaohuang claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
birobirobiro/awesome-shadcn-ui#647 ·
Maintainers usually reply within 2 days
-
check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Urigo/accounter-fullstack#4604 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day