Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

plugins: Correct the behavior for validation problems #4059

Closed
1 of 20 tasks
qwepoizt opened this issue Sep 21, 2021 · 6 comments
Closed
1 of 20 tasks

plugins: Correct the behavior for validation problems #4059

qwepoizt opened this issue Sep 21, 2021 · 6 comments

Comments

@qwepoizt
Copy link
Contributor

qwepoizt commented Sep 21, 2021

Expected behavior

  1. checker plugins should run their validation during ...Get() and ...Set().
  2. If a validation problem occurs during ...Set(), the plugin should set an error and return -1
  3. If a validation problem occurs during ...Get(), the plugin should add a warning and continue validation (finally return 0)
  4. plugins need to have the placements: pregetstorage and postgetstorage in their metadata. Otherwise ...Get()/...Set() won't be called.

Affected plugins

Steps to fix the issue

  1. Ensure placements are correct (see "Expected behavior" above)
  2. Ensure validation is executed during both ...Get() and ...Set()
  3. Refactor validation into new method, don't just copy ...Get() to ...Set() or vice versas.
  4. Ensure return codes and classification as error/warning is correct (see "Expected behavior" above)
@qwepoizt
Copy link
Contributor Author

@markus2330 Please feel free to edit the description, if I got something wrong.

@markus2330
Copy link
Contributor

Thank you for creating the issue! The description is very good.

@marvin-the-parrot
Copy link

[FLOSS H1]
Checking should be done during both get() and set().

Since there is already one example in refactoring the way in which the validation should be implemented, this solution should be able to be adapted to the different plugins.

As far as i could see all elektra plugins are written in c, because of this i tagged this issue with lang/c is this correct?

@markus2330
Copy link
Contributor

As far as i could see all elektra plugins are written in c, because of this i tagged this issue with lang/c is this correct?

Some are C++. The one validation plugin in Java has its separate issue #4001. There are ruby and python plugins too but iirc they don't do validation.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue.
Thank you for your contributions 💖

@github-actions github-actions bot added the stale label Oct 6, 2023
Copy link

github-actions bot commented Dec 4, 2023

I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue.
Thank you for your contributions 💖

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants