Introduce ServiceVariablesNotInitializedError and ServiceVariab… #659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces changes to improve error handling and streamline the codebase in the
tdp
project. The most significant updates include replacing theServicesNotInitializedError
andUnknownService
classes with new exception classes, integrating these changes across multiple modules, and enhancing error reporting for uninitialized service variables.Error Handling Enhancements:
New Exception Classes: Added
ServiceVariablesNotInitializedError
andServiceVariablesNotInitializedErrorList
classes intdp/core/exceptions.py
to provide more structured and detailed error reporting for uninitialized service variables. These classes replace the olderServicesNotInitializedError
andUnknownService
classes. [1] [2]Integration of New Exceptions:
tdp/core/variables/cluster_variables.py
to use the new exception classes for identifying and reporting uninitialized services during the update process.tdp/core/variables/inspection.py
to raiseServiceVariablesNotInitializedErrorList
for services that are deployed but missing their repository. [1] [2]Codebase Updates:
Refactoring Imports: Adjusted imports across multiple files (
generate_stales.py
,update.py
,cluster_variables.py
, andinspection.py
) to replace references to the removed exception classes with the newly added ones. [1] [2] [3] [4]Simplified Error Handling in CLI Commands:
generate_stales.py
,status/update.py
andvars/update.py
to handle errors usingServiceVariablesNotInitializedErrorList
and raiseclick.ClickException
for better user feedback in the CLI. [1] [2]Agreements