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

[master] Second salt con #66635

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

madavarajK
Copy link

Summary

This pull request enhances error handling and logging in the tools/utils/repo.py module. It also adds corresponding tests and updates the changelog.

Changes

  • Replaced print statements with logging using log for consistency.
  • Added specific exception handling for ClientError, NoCredentialsError, and PartialCredentialsError.
  • Updated CHANGELOG.md to document these changes.
  • Created tests/test_repo.py to add tests for the logging functionality using caplog.

Testing

  • Verified that the get_repo_json_file_contents function handles different exceptions correctly and logs appropriate messages.
  • Ensured that the changes do not affect the existing functionality.
  • Added tests that use caplog to check that logging occurs as expected during different scenarios.

Additional Notes

These changes aim to improve the robustness and maintainability of the code, making it easier to debug and understand. The logging ensures that detailed information is available when issues arise, facilitating quicker resolution.

@madavarajK madavarajK requested a review from a team as a code owner June 13, 2024 03:40
@madavarajK madavarajK requested a review from Akm0d June 13, 2024 03:40
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Second salt con [master] Second salt con Jun 13, 2024
…g entry

- Replace print statements with logging using log for consistency
- Add specific exception handling for ClientError, NoCredentialsError, and PartialCredentialsError
- Update the changelog to document the changes
- Create tests for logging using caplog to ensure proper logging behavior
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