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

testing apply of rulesets #42

Merged
merged 1 commit into from
Aug 30, 2024
Merged

testing apply of rulesets #42

merged 1 commit into from
Aug 30, 2024

Conversation

ConnorOKane-Kainos
Copy link
Collaborator

@ConnorOKane-Kainos ConnorOKane-Kainos commented Aug 30, 2024

Jira link

https://tools.hmcts.net/jira/browse/DTSPO-18474

See PROJ-XXXXXX

Change description

PR raised to test the apply on terraform pipeline

Testing done

Checklist

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)
  • Does this PR introduce a breaking change

🤖AEP PR SUMMARY🤖

md
set_org_custom_properties.py

  • Updated the logging.info statement to include a newline at the end of the log message.

Copy link

Given the git diff provided, here is a concise review focusing on improvements:

Code Quality & Best Practices

  1. Newline at End of File:

    • The removal of the warning about no newline at the end of file suggests that a newline has been added, which is a good practice as it ensures the file complies with POSIX standards and can avoid potential problems with tools and utilities that expect or require it.
  2. Logging Improvements:

    • It's beneficial to include more context in your log messages where possible. For example, specifying that the script mentioned is specifically for setting organization custom properties can help when scanning through logs.
    • Example:
      diff
      +logging.info("\nSet Org Custom Properties Script execution completed.")
      
      

Security

  • Given the provided diff, there's no direct implication on security improvements without knowing more about the context of the data being handled. Always ensure sensitive information is not logged.

Cost and Carbon Usage

  • No direct changes in cost or carbon usage can be inferred from the diff provided. However, optimizing logging by reducing unnecessary log messages or ensuring efficient execution of the script could have indirect benefits in terms of computational resources used, especially if this script is executed frequently across many repositories.

General Note

  • Ensure that the exception handling (except requests.RequestException as e:) is specific to the exceptions you expect. Catching too broad of an exception can mask other issues. This might not be directly applicable from the diff, but it's important to keep exception handling precise and informative.

In essence, while the specific improvements from the diff are quite limited in scope, ensuring best practices in logging and considering the broader context in terms of exception handling, security, and efficiency can contribute to better code quality and operational benefits.

@ConnorOKane-Kainos ConnorOKane-Kainos merged commit 6deda4a into main Aug 30, 2024
4 checks passed
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.

1 participant