Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ ENV HOME=/app

RUN chown -R appuser:appgroup /opt/venv /app

RUN mkdir -p /app/data/logs/service && chown -R appuser:appgroup /app/data

USER appuser

HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
Expand Down
9 changes: 9 additions & 0 deletions scripts/sap_automation_qa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,11 @@ run_ansible_playbook() {
command+=" $ANSIBLE_VERBOSE"
fi

if [[ "${ANSIBLE_CHECK_MODE:-}" == "true" ]]; then
command+=" --syntax-check"
Comment on lines +446 to +447
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

The new ANSIBLE_CHECK_MODE switch enables --syntax-check, which is different from Ansible's actual “check mode” (--check). The env var name is likely to mislead users into thinking this runs a dry-run against hosts. Consider renaming the flag to something like ANSIBLE_SYNTAX_CHECK (or, if the intent really is check mode, pass --check instead of --syntax-check).

Suggested change
if [[ "${ANSIBLE_CHECK_MODE:-}" == "true" ]]; then
command+=" --syntax-check"
if [[ "${ANSIBLE_SYNTAX_CHECK:-}" == "true" ]]; then
command+=" --syntax-check"
log "INFO" "Syntax-check mode enabled (ANSIBLE_SYNTAX_CHECK=true)"
elif [[ "${ANSIBLE_CHECK_MODE:-}" == "true" ]]; then
command+=" --syntax-check"
log "WARNING" \
"ANSIBLE_CHECK_MODE is deprecated for syntax validation; use " \
"ANSIBLE_SYNTAX_CHECK=true instead"

Copilot uses AI. Check for mistakes.
log "INFO" "Syntax-check mode enabled (ANSIBLE_CHECK_MODE=true)"
fi

# Set ANSIBLE_LOG_PATH so execution output is captured for HTML reports
local log_dir="${system_config_folder}/logs"
mkdir -p "$log_dir"
Expand Down Expand Up @@ -536,6 +541,10 @@ main() {

# Override SAP_FUNCTIONAL_TEST_TYPE based on --test_groups if specified
if [[ -n "$TEST_GROUPS" ]]; then
if [[ "$TEST_TYPE" != "SAPFunctionalTests" ]]; then
log "INFO" "Overriding TEST_TYPE: '$TEST_TYPE' -> 'SAPFunctionalTests' (--test_groups implies functional tests)"
TEST_TYPE="SAPFunctionalTests"
fi
local test_filter_script="${cmd_dir}/../src/module_utils/filter_tests.py"
local input_api_file="${cmd_dir}/../src/vars/input-api.yaml"
local resolved_type
Expand Down
2 changes: 1 addition & 1 deletion src/roles/misc/tasks/pre-validations-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
register: cluster_status_pre
until: cluster_status_pre.primary_node != "" and
cluster_status_pre.secondary_node != ""
retries: "{{ default_retries }}"
retries: 2
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

Changing cluster pre-validation from retries: {{ default_retries }} (75 by default) to retries: 2 significantly reduces the time allowed for the cluster to reach a stable state and removes configurability that other HA tasks still rely on. To keep the new shorter default without risking unnecessary test skips, consider using a separate variable (default 2) that can be overridden in input config when environments need longer stabilization.

Suggested change
retries: 2
retries: "{{ pre_validation_cluster_status_retries | default(2) }}"

Copilot uses AI. Check for mistakes.
delay: "{{ default_delay }}"

- name: "Pre Validation: Scale-out HSR cluster topology"
Expand Down
4 changes: 4 additions & 0 deletions src/roles/misc/tasks/pre-validations-scs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
sap_sid: "{{ sap_sid | lower }}"
become: true
register: cluster_status_pre
until: cluster_status_pre.ascs_node | default('') != "" and
cluster_status_pre.ers_node | default('') != ""
retries: 2
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

retries: 2 hardcodes the pre-validation wait window and bypasses the existing default_retries configuration (defined in src/vars/input-api.yaml). This can make SCS pre-validations flaky on slower clusters and removes the ability to tune retries per environment. Consider introducing a dedicated variable (e.g., pre_validation_retries defaulting to 2) and using that here so the limit is still configurable when needed.

Suggested change
retries: 2
retries: "{{ pre_validation_retries | default(2) }}"

Copilot uses AI. Check for mistakes.
delay: "{{ default_delay }}"

- name: "Pre Validation: CleanUp any failed resource"
become: true
Expand Down
Loading