Skip to content
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

Constrict job scheduler configuration options #236

Conversation

f-galland
Copy link
Member

Description

This PR fixes bugs triggered by certain combinations of values in the command manager settings.

Issues Resolved

Closes #223
Closes #224

@f-galland f-galland self-assigned this Jan 21, 2025
@f-galland f-galland requested a review from a team January 21, 2025 12:38
@f-galland f-galland changed the base branch from 180-command-manager-config-file to enhancement/180-command-manager-configuration January 21, 2025 13:41
…/223-job.schedule-negative-int-triggers-infinite-loop

Signed-off-by: Fede Galland <[email protected]>
@AlexRuiz7 AlexRuiz7 linked an issue Jan 21, 2025 that may be closed by this pull request
Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Code review: ✔️
  • Tests: ✔️

@AlexRuiz7 AlexRuiz7 merged commit 0f69aac into enhancement/180-command-manager-configuration Jan 22, 2025
1 check passed
@AlexRuiz7 AlexRuiz7 deleted the bug/223-job.schedule-negative-int-triggers-infinite-loop branch January 22, 2025 16:41
AlexRuiz7 added a commit that referenced this pull request Jan 23, 2025
* Implement plugin settings class to handle command manager configuration

* Initialize settings on main Command Manager class

Add logs to track settings values

* Make PluginSetting singleton thread-safe adding syncrhonization

* Replace constants usage with PluginSettings corresponding getters

* Register settings in CommandManager main class

* Add logs to validate settings registering

* Implement RealoadablePlugin interface to CommandManager plugin

* Apply spotless formatting

Set Job index as constant inside main CommandManager plugin class

* Replace setting job.index.name for a constant

* Apply getter functions for job index name and job type

Replace constants usage with getters

* Add unit tests for PluginSettings class

* Add docstrings to PluginSettings functions

* Remove unnecesary debug logs

* Convert indexes, templates, and API URI related configuration fields to constants

* Update tests with new constant values

* Rename timeout setting to client.timeout for clearer naming

* Update docstrings

* Make constant settings static

Remove plugin-scurity.policy file as it is no longer needed

* Log settings on plugin's start (#235)

* Constrict job scheduler configuration options (#236)

* Set min and max values for settings and validate their coherence

* Roll back to Setting.Property.NodeScope to fix issues

* Make pit keepalive equal to job schedule in seconds

* Make pit keepalive equal to job schedule in seconds

* Fix tests

* Refactor validateSettings()

---------

Signed-off-by: Fede Galland <[email protected]>
Co-authored-by: Alex Ruiz <[email protected]>

* Fix import

* Fix old configuration references

* Remove volatile from PluginSettings instance

---------

Signed-off-by: Fede Galland <[email protected]>
Signed-off-by: Álex Ruiz <[email protected]>
Co-authored-by: Álex Ruiz <[email protected]>
Co-authored-by: Fede Galland <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants