21 Jan 2025 09:00 PM
I have had problems in the past whenever I have changed the activationschema.json file of an EF2 extension. Since there is almost no documentation around this, we need to know what happens when:
I believe that changes will impact only monitoring configurations that are being upgraded, as new monitoring configurations will have to be defined by scratch. I also believe that #1 above is not impacted in an upgrade, but not exactly sure what happens with #2 and #3?
Solved! Go to Solution.
30 Jan 2025 10:41 AM
Each extension version comes with its activation schema which it enforces on the monitoring configurations. If you have monitoring configurations for version 1.0.0 and you activate version 2.0.0, nothing happens to the old monitoring configs. They will still run as version 1.0.0. When you try to upgrade configurations, the auto-upgrade kicks in, but it doesn't have any built-in logic to handle changes to the schema. So unless an existing monitoring config complies as-is with a new schema, the auto-upgrade will fail.
If I'm not mistaken, the only way to change the activation schema and not break existing monitoring configs (i.e., the only way to be able to automatically upgrade monitoring configs without recreating them) is to add new optional properties.
If you add new mandatory properties, or remove existing properties, the existing monitoring configs will break.
Not sure what you mean by "global properties", but the logic above applies to any field in the schema.
30 Jan 2025 03:17 PM
Along that reasoning, removing an optional property, one with no data, should also not break. Not sure if it does or not. I also have some intuitions here, but would like to have something more definitive, so don't have to do reverse-engineering of what is going on.
"Global properties" are for me properties defined at another level, in my case globally, and not at the endpoint level.
30 Jan 2025 03:30 PM
I would expect it not to break, indeed.
Basically it comes down to this: is the current monitoring configuration JSON compliant with the new schema?
If yes, the upgrade should occur without failing. Otherwise you can expect an error.
As for "global properties", yes, the same logic applies. The extension doesn't really care whether or not you have endpoints or any other kind of list/set/object in your schema. It just looks at the JSON schema as a whole and ensures the monitoring configs comply with it.