Add strict export mode to propagate export failures as exceptions - #2836
somiljain2006 wants to merge 5 commits into
Conversation
| public class CasCGlobalConfig extends GlobalConfiguration { | ||
|
|
||
| private String configurationPath; | ||
| private boolean strictExport = false; |
There was a problem hiding this comment.
why do you need this in the global config? just get it from the context.
There was a problem hiding this comment.
I initially added strictExport to CasCGlobalConfig to allow configuring it via YAML, but that effectively makes it a persistent server setting.
Based on your suggestion, I plan to completely remove it from the global config (which means intentionally dropping the YAML configurability) and overload the export method to accept a ConfigurationContext directly.
This decouples the export logic from the global database. Let me know if you agree with this, and I’ll go ahead and update the implementation accordingly.
There was a problem hiding this comment.
I don't really understand what you're saying here.
If possible this should be configured via yaml.
It doesn't need to be configured in the UI.
|
After thinking through the design tradeoffs more carefully, I don’t think my current approach is the right fit for this PR yet, so I’m converting it to draft for now while I try to come up with a cleaner solution that better fits the intended architecture. |
Introduce a strict export mode in ConfigurationAsCode that propagates export failures as ConfiguratorException instead of embedding "FAILED TO EXPORT" markers in the generated YAML.
This improves error visibility while maintaining backward compatibility.
Your checklist for this pull request
🚨 Please review the guidelines for contributing to this repository.