#550 INI allow specifying whether merges are allowed
Closed: Fixed None Opened 13 years ago by dpal.

Change INI interface to allow specifying whether the collisions in keys or sections should cause the parsing to return error (EIO), warning (EILSEQ) or success (EOK).

By default the merges will be allowed. If the collisions are prohibited the colliding line will cause an error. The function then will act based on the error level specification which is whether it needs to stop on errors only, errors or warnings, or not stop at all until the end of the file.

The merges can be allowed but a special argument (TBD) can be provided to trigger warning. In this case the parsing function should rise a warning and act based on the error level specification as described above.

The merges can also be prohibited by different value of the same special special argument (TBD). In this case the parsing function should rise an error and act based on the error level specification as described above.


Fields changed

summary: INI => INI allow specifying whether merges are allowed

Fields changed

summary: INI => INI allow specifying whether merges are allowed

Fields changed

summary: INI => INI allow specifying whether merges are allowed

Fields changed

milestone: SSSD 1.5.0 => SSSD 1.6.0

Fields changed

milestone: SSSD 1.5.0 => SSSD 1.6.0

Fields changed

milestone: SSSD 1.5.0 => SSSD 1.6.0

Fields changed

milestone: SSSD 1.6.0 => Tools 1.0

Fields changed

milestone: SSSD 1.6.0 => Tools 1.0

Fields changed

milestone: SSSD 1.6.0 => Tools 1.0

The more I think about this the more I lean towards separating parsing and merging. I think the right approach would be to provide an interface that would allow:
- Read config form file X, check errors and inspect file related metadata if needed
- Read config form file Y, check errors and inspect file related metadata if needed
- Create a config object by merging the two config objects respecting provided flags.

This would allow separating parsing errors and merge errors and also simplify the interface and focus on the simple cases when merging is not needed.
The original assumption was that most applications will need more then one source of the configuration information merged together. After some time in seems like not a primary use case so providing a special wrapper for merging was probably a mistake.

The more I think about this the more I lean towards separating parsing and merging. I think the right approach would be to provide an interface that would allow:
- Read config form file X, check errors and inspect file related metadata if needed
- Read config form file Y, check errors and inspect file related metadata if needed
- Create a config object by merging the two config objects respecting provided flags.

This would allow separating parsing errors and merge errors and also simplify the interface and focus on the simple cases when merging is not needed.
The original assumption was that most applications will need more then one source of the configuration information merged together. After some time in seems like not a primary use case so providing a special wrapper for merging was probably a mistake.

The more I think about this the more I lean towards separating parsing and merging. I think the right approach would be to provide an interface that would allow:
- Read config form file X, check errors and inspect file related metadata if needed
- Read config form file Y, check errors and inspect file related metadata if needed
- Create a config object by merging the two config objects respecting provided flags.

This would allow separating parsing errors and merge errors and also simplify the interface and focus on the simple cases when merging is not needed.
The original assumption was that most applications will need more then one source of the configuration information merged together. After some time in seems like not a primary use case so providing a special wrapper for merging was probably a mistake.

Fields changed

rhbz: => 0

Fields changed

rhbz: => 0

Fields changed

rhbz: => 0

The interface have been updated to do separate reading and merging.
This ticket should not be closed until merging functionality is complete.

blockedby: =>
blocking: =>
coverity: =>
feature_milestone: =>
milestone: Tools Backlog => Tools 1.0
patch: => 0

The interface have been updated to do separate reading and merging.
This ticket should not be closed until merging functionality is complete.

blockedby: =>
blocking: =>
coverity: =>
feature_milestone: =>
milestone: Tools Backlog => Tools 1.0
patch: => 0

The interface have been updated to do separate reading and merging.
This ticket should not be closed until merging functionality is complete.

blockedby: =>
blocking: =>
coverity: =>
feature_milestone: =>
milestone: Tools Backlog => Tools 1.0
patch: => 0

Patches have been pushed.

design: =>
design_review: => 0
fedora_test_page: =>
resolution: => fixed
status: new => closed

Patches have been pushed.

design: =>
design_review: => 0
fedora_test_page: =>
resolution: => fixed
status: new => closed

Patches have been pushed.

design: =>
design_review: => 0
fedora_test_page: =>
resolution: => fixed
status: new => closed

Metadata Update from @dpal:
- Issue assigned to dpal
- Issue set to the milestone: Tools 1.0

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/1592

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata