Skip to content

Conversation

PaulFarault
Copy link
Contributor

@PaulFarault PaulFarault commented Jul 11, 2025

This pull request introduces changes to improve error handling and streamline the codebase in the tdp project. The most significant updates include replacing the ServicesNotInitializedError and UnknownService 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 and ServiceVariablesNotInitializedErrorList classes in tdp/core/exceptions.py to provide more structured and detailed error reporting for uninitialized service variables. These classes replace the older ServicesNotInitializedError and UnknownService classes. [1] [2]

  • Integration of New Exceptions:

    • Updated tdp/core/variables/cluster_variables.py to use the new exception classes for identifying and reporting uninitialized services during the update process.
    • Modified tdp/core/variables/inspection.py to raise ServiceVariablesNotInitializedErrorList 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, and inspection.py) to replace references to the removed exception classes with the newly added ones. [1] [2] [3] [4]

  • Simplified Error Handling in CLI Commands:

    • Updated generate_stales.py, status/update.py and vars/update.py to handle errors using ServiceVariablesNotInitializedErrorList and raise click.ClickException for better user feedback in the CLI. [1] [2]

Agreements

@PaulFarault PaulFarault changed the title feat: introduce ServiceVariablesNotInitializedError and ServiceVariab… Introduce ServiceVariablesNotInitializedError and ServiceVariab… Jul 11, 2025
@PaulFarault PaulFarault force-pushed the paul/service-variables-not-initialized-error branch from 6f2cdde to e8d14ab Compare July 11, 2025 13:11
@PaulFarault
Copy link
Contributor Author

Add error handling on the tdp vars edit and tdp status generate-stales commands as they won't be removed for now (see #656 and and #649).

@PaulFarault PaulFarault marked this pull request as ready for review July 11, 2025 13:13
@PaulFarault PaulFarault requested a review from rpignolet July 11, 2025 13:30
@PaulFarault PaulFarault self-assigned this Jul 11, 2025
…lesNotInitializedErrorList for improved error handling
@PaulFarault PaulFarault force-pushed the paul/service-variables-not-initialized-error branch from e8d14ab to fa2e302 Compare July 21, 2025 08:26
@PaulFarault
Copy link
Contributor Author

Force pushed after rebase on master.

@PaulFarault PaulFarault merged commit 5736f6c into master Jul 21, 2025
3 checks passed
@PaulFarault PaulFarault deleted the paul/service-variables-not-initialized-error branch July 21, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants