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

[6.14.z] Enforce the Dynaconf validaton #15444

Merged

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #15289

Problem Statement

Currently, the configuration is not consistently validated. This can lead to:

  • Uncaught errors in production: Invalid configurations can cause crashes, or unexpected behavior if not detected before deployment.
  • Missed configuration changes: If validators are not updated alongside code changes, invalid configurations might slip through unnoticed.

Solution

Enforce the config validation.

Additionally, remove unused configuration files and their validators.

Benefits:

  • prevent errors - catch configuration issues early to prevent crashes, and unexpected behavior,
  • consistent configs - define valid formats and value ranges to reduce surprises.
  • improve maintainability - validators act as documentation for configuration settings, making it easier for new developers to understand the project.
  • early detection - identify configuration issues during development or deployment to save time and resources compared to fixing them in production.

Notes

I am open to changing the setting name and placement, robottelo.unit_test might not be the best choice.

@Satellite-QE Satellite-QE added 6.14.z Introduced in or relating directly to Satellite 6.14 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Jun 18, 2024
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo

@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 7417
Build Status: SUCCESS
PRT Comment: pytest /opt/app-root/src/robottelo/tests/foreman -v -m build_sanity --external-logging
Test Result : ======= 11 passed, 5386 deselected, 5492 warnings in 1439.93s (0:23:59) ========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jun 18, 2024
@jyejare jyejare merged commit 8aebec9 into 6.14.z Jun 18, 2024
16 checks passed
@jyejare jyejare deleted the cherry-pick-6.14.z-617286948df092182d64cf87513d8a0d2f447e41 branch June 18, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.14.z Introduced in or relating directly to Satellite 6.14 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants