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.15.z] Enforce the Dynaconf validaton #15446

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 requested a review from a team as a code owner June 18, 2024 10:24
@Satellite-QE Satellite-QE added the 6.15.z Introduced in or relating directly to Satellite 6.15 label Jun 18, 2024
@Satellite-QE Satellite-QE requested a review from a team as a code owner June 18, 2024 10:24
@Satellite-QE Satellite-QE added the Auto_Cherry_Picked Automatically cherrypicked PR using GHA label Jun 18, 2024
@Satellite-QE Satellite-QE requested a review from a team as a code owner June 18, 2024 10:24
@Satellite-QE Satellite-QE added the No-CherryPick PR doesnt need CherryPick to previous branches label Jun 18, 2024
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo

@Satellite-QE
Copy link
Collaborator Author

PRT Result

Build Number: 7415
Build Status: SUCCESS
PRT Comment: pytest /opt/app-root/src/robottelo/tests/foreman -v -m build_sanity --external-logging
Test Result : ======= 11 passed, 5448 deselected, 5553 warnings in 1659.43s (0:27:39) ========

@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 5c385dc into 6.15.z Jun 18, 2024
16 checks passed
@jyejare jyejare deleted the cherry-pick-6.15.z-617286948df092182d64cf87513d8a0d2f447e41 branch June 18, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 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