-
Notifications
You must be signed in to change notification settings - Fork 179
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
App manifest.json overwrites my app config #9687
Comments
@fschade since you've built the feature in ocis, what are your thoughts on this? :-) |
IIRC we designed that a bit differently. You should not edit the manifest.json because that holds the default and will get overridden by an app update. The config can be changed in a yaml file. Need to check where it needs to be put. |
@kulmann as Michael wrote, the manifest should not be touched. Please use the yaml file, like here: https://github.com/owncloud/ocis/pull/9601/files#diff-436f194d94cba3a96cb32372d4995167583996c0bc800a76679093a28f053c19 |
I need a solution where the config can be placed inside the app folder. Otherwise it loses its simplicity. |
I have to add one thing, the idea behind the app folder was that it stays untouched because of the updates. @micbar fine for you? |
I never had this idea. 😅 I wanted to put the individual configs for the respective apps into the respective app folders from the very beginning of the feature... it makes things so easy! |
start working on it, nothing big. |
@kulmann please test if it fits you needs, you just have to add a {
"disabled": false,
"config": {
"from_local": 1,
"bar": 3
}
} one new thing beside the config overloading is that apps can now be disabled from the the overloading priority is as follows: local.config > global.config > manifest.config, e.g. manifest.json {
"entrypoint": "index.js",
"config": {
"from_manifest": 1,
"bar": 1
}
} apps.yaml bar:
config:
from_global: 1
bar: 2 config.json {
"config": {
"from_local": 1,
"bar": 3
}
} result https://localhost:9200/config.json {
"external_apps": [
{
"id": "bar",
"path": "/assets/apps/bar/index.js",
"config": {
"bar": 3,
"from_global": 1,
"from_local": 1,
"from_manifest": 1
}
}
]
} https://github.com/fschade/ocis/tree/app-config please provide ur feedback, then ill create a pr for it. |
PR: #9691 |
@kulmann does it work for you the way it is now? |
Describe the bug
With #8523 we've introduced a simple mechanism to load apps into ocis. My personal deployment using that feature is looking good so far.
@jstehle built the
external-sites
app in owncloud/web-extensions#13I'll use this app as an example to demonstrate the issue I'm having.
Steps to reproduce
manifest.json
fromto
Expected behavior
Your previously built config remains untouched during an app update.
Actual behavior
Your previously built config gets overwritten to the default during an app update. 😢
Proposal
It makes sense that the app can ship a default config. It might be that it needs certain config to be able to run. E.g. the
draw-io
app uses the manifest.json to ship a default service url, see https://github.com/owncloud/web-extensions/blob/848cfce3384324fd7001dbd5c289aafd7d9aba0c/packages/web-app-draw-io/public/manifest.json#L4I see two options (happy to hear more!):
manifest.dist.json
tomanifest.json
.config.json
file into the app folder which is then used by ocis to overwrite theconfig
object from the manifest.json.The text was updated successfully, but these errors were encountered: