Skip to content

Conversation

@devanshjainms
Copy link
Contributor

This pull request introduces support for a new optional parameter, hana_resource_name, across multiple modules and roles in the codebase. The changes enhance flexibility in handling HANA resource names and improve compatibility with various configurations. The most important changes include updates to the get_cluster_status_db.py module and modifications to task files within the ha_db_hana role to incorporate the new parameter.

Updates to get_cluster_status_db.py:

  • Added a new optional parameter, hana_resource_name, to the __init__ method and updated the result dictionary to include this parameter. (src/modules/get_cluster_status_db.py)
  • Modified the _process_node_attributes method to dynamically use hana_resource_name for constructing synchronization attributes, with a fallback to the default format. (src/modules/get_cluster_status_db.py)
  • Updated the run_module function to accept hana_resource_name as an optional parameter and pass it to the checker.run() method. (src/modules/get_cluster_status_db.py) [1] [2]

Updates to ha_db_hana role task files:

  • Incorporated the hana_resource_name parameter into various task files (e.g., block-network.yml, fs-freeze.yml, primary-crash-index.yml, and others) to support its usage during task execution. (src/roles/ha_db_hana/tasks) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • Ensured the parameter is passed with a default value of an empty string if not explicitly provided, maintaining backward compatibility. (src/roles/ha_db_hana/tasks) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Copilot AI review requested due to automatic review settings July 9, 2025 21:10
@devanshjainms devanshjainms requested a review from a team as a code owner July 9, 2025 21:10

This comment was marked as outdated.

devanshjainms and others added 2 commits July 9, 2025 14:13
…ommit suggestion

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hdamecharla hdamecharla requested a review from Copilot July 10, 2025 03:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Enhance HANA task flexibility by adding an optional hana_resource_name parameter throughout the module, roles, and tests to allow dynamic resource name handling.

  • Introduce hana_resource_name parameter in get_cluster_status_db module and its invocation
  • Update role task files to pass through hana_resource_name with backward-compatible default
  • Adjust tests and mock data to include the new parameter and inject commands for pre-validation logic

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/roles/mock_data/*.txt Added hana_resource_name to module argument specs in mock data
tests/roles/ha_db_hana/*_test.py Injected commands variable and updated extra_vars_override
tests/modules/get_cluster_status_db_test.py Added fixture values for hana_resource_name
src/roles/misc/tasks/pre-validations-db.yml Implement pre-validation tasks to fetch and set hana_resource_name
src/roles/misc/tasks/cluster-report.yml Pass hana_resource_name into cluster report collection
src/roles/ha_db_hana/tasks/*.yml Propagate hana_resource_name into all get_cluster_status_db calls
src/modules/get_cluster_status_db.py Extend checker constructor, logic, and argument spec for new parameter
Comments suppressed due to low confidence (2)

src/roles/misc/tasks/pre-validations-db.yml:27

  • The play uses the commands variable but it isn’t defined in defaults. Consider documenting commands in defaults/main.yml or providing a fallback to avoid undefined variable errors when not explicitly passed.
                                    set -o pipefail && {{ commands

src/roles/misc/tasks/pre-validations-db.yml:24

  • [nitpick] This task name is duplicated within the same block; consider making the inner task’s name more descriptive (e.g., include shell or register action) to improve readability in logs.
        - name:                     "Pre validation: Get HANA resource id for saphanasr_angi"

Copy link

@KimForss KimForss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@devanshjainms devanshjainms merged commit 3b7ccec into Azure:development-june-2025 Jul 10, 2025
5 checks passed
devanshjainms added a commit that referenced this pull request Aug 12, 2025
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.

3 participants