From dfd8d0926424ebe7e225fca37732dcd1a2e29e2f Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 19:18:19 +0000 Subject: [PATCH 01/12] Add configuration files and templates for issue tracking and CI/CD workflows --- .ansible-lint | 22 ++++++ .github/ISSUE_TEMPLATE/backlog.md | 52 ++++++++++++++ .github/ISSUE_TEMPLATE/issue.md | 45 ++++++++++++ .github/pull_request_template.md | 42 +++++++++++ .../workflows/github-actions-ansible-lint.yml | 70 +++++++++++++++++++ .../workflows/github-actions-pull-request.yml | 53 ++++++++++++++ .gitignore | 10 +++ README.md | 64 ++++++++++++++--- pyproject.toml | 58 +++++++++++++++ requirements.txt | 66 +++++++++++++++++ 10 files changed, 474 insertions(+), 8 deletions(-) create mode 100644 .ansible-lint create mode 100644 .github/ISSUE_TEMPLATE/backlog.md create mode 100644 .github/ISSUE_TEMPLATE/issue.md create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/github-actions-ansible-lint.yml create mode 100644 .github/workflows/github-actions-pull-request.yml create mode 100644 pyproject.toml create mode 100644 requirements.txt diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 00000000..a389f755 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,22 @@ +exclude_paths: + - src/modules + - src/module_utils + - .github + +skip_list: + - no-handler + - key-order[task] + - key-order[play] + - name[casing] + - no-changed-when + - role-name + - var-naming + - yaml[braces] + - yaml[colons] + - yaml[commas] + - yaml[indentation] + - yaml[line-length] + - yaml[octal-values] + - name[template] + - command-instead-of-shell + - jinja[spacing] diff --git a/.github/ISSUE_TEMPLATE/backlog.md b/.github/ISSUE_TEMPLATE/backlog.md new file mode 100644 index 00000000..072398f8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/backlog.md @@ -0,0 +1,52 @@ +--- +name: Backlog Item +about: Log and track pending tasks, improvements, and enhancements +title: '' +labels: backlog, enhancement, bug, feature +assignees: '' + +--- + +## Overview + +Provide a concise summary of the issue or enhancement. + +--- + +## Problem Statement + +A clear, detailed description of the problem. Include: + +- What is happening? +- What is the expected behavior? +- Any error messages or traces. + +--- + +## Proposed Enhancement + +Detail the required changes or improvements to resolve the problem. Include: + +- Steps to implement the enhancement. +- Any references or research documents. +- Impact analysis if applicable. + +--- + +## Item Type + +Please select the type of item by marking the appropriate checkbox: + +- [ ] Backlog +- [ ] Enhancement +- [ ] Bug +- [ ] Feature + +--- + +## Acceptance Criteria + +Define the conditions that must be met for this item to be considered complete: + +- Criteria 1 +- Criteria 2 diff --git a/.github/ISSUE_TEMPLATE/issue.md b/.github/ISSUE_TEMPLATE/issue.md new file mode 100644 index 00000000..ec72f6ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue.md @@ -0,0 +1,45 @@ +--- +name: Issue +about: Create a report or discussion item for any issue or thought related to the project. Consider using the Backlog Item template for tracking bugs, tasks, improvements, and enhancements. +title: '' +labels: '' +assignees: '' + +--- + +## Overview + +Provide a brief summary of the issue or discussion point. + +--- + +## Description + +Explain the issue or subject in detail. Include relevant background information and context. + +--- + +## Steps to Reproduce (if applicable) + +Provide a clear, step-by-step list of instructions to reproduce the issue: + +1. Step one +2. Step two +3. Step three + +--- + +## Environment + +List details about your setup (e.g., operating system, version, browser, etc.): + +- OS: +- Version: +- Additional details: +- Test Type + +--- + +## Additional Context + +Include any extra information, such as logs, screenshots, or links that might help in understanding or resolving the issue. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..61b2e47d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,42 @@ +# Description + + +## Problem Statement + + +## Solution Details + +- [ ] Implementation changes +- [ ] Configuration updates +- [ ] Documentation updates + +## Testing + +### Test Environment + +- OS: +- SAP Version: +- Database Type: + +### Test Cases + +- [ ] Unit tests added/updated +- [ ] Manual Testing done + +## Checklist + +- [ ] Code follows project style guidelines +- [ ] Documentation has been updated +- [ ] Tests are passing +- [ ] PR title follows conventional commit format +- [ ] Breaking changes are clearly marked + +## Dependencies + +- Depends on: #issue_number + +## Screenshots/Logs + + +## Additional Notes + \ No newline at end of file diff --git a/.github/workflows/github-actions-ansible-lint.yml b/.github/workflows/github-actions-ansible-lint.yml new file mode 100644 index 00000000..7a2b2494 --- /dev/null +++ b/.github/workflows/github-actions-ansible-lint.yml @@ -0,0 +1,70 @@ + +name: Pull Request - Ansible Lint and Code Coverage +on: [push, pull_request] +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 + with: + egress-policy: audit + + - name: Checkout the code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 + + - name: Setup Python + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 #v5.4.0 + with: + python-version: '3.x' + + - name: Install Ansible and Ansible-Lint + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Install Ansible Collections + run: | + ansible-galaxy collection install ansible.windows --force + ansible-galaxy collection install ansible.posix --force + ansible-galaxy collection install ansible.utils --force + ansible-galaxy collection install ansible.netcommon:5.1.2 --force + ansible-galaxy collection install community.windows --force + ansible-galaxy collection install community.general --force + ansible-galaxy collection install microsoft.ad --force + + - name: Run ansible-lint + run: | + ansible-lint src/ -c .ansible-lint + + - name: Run pytest with coverage + run: | + pytest --cov=src/ --cov-report=xml + + - name: Check code formatting with black + run: | + black --check src/ --config pyproject.toml + + - name: Validate PR Description + uses: actions/github-script@v6 + with: + script: | + const core = require('@actions/core'); + const pr = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const body = pr.data.body || ""; + const requiredSections = [ + "Description", + "Test Cases", + "Checklist", + ]; + const missingSections = requiredSections.filter(section => !body.includes(section)); + if(missingSections.length > 0) { + core.setFailed(`PR Description is missing the following sections: ${missingSections.join(", ")}`); + } \ No newline at end of file diff --git a/.github/workflows/github-actions-pull-request.yml b/.github/workflows/github-actions-pull-request.yml new file mode 100644 index 00000000..9da61519 --- /dev/null +++ b/.github/workflows/github-actions-pull-request.yml @@ -0,0 +1,53 @@ +name: Pull Request Checks + +on: + pull_request: + types: [opened, edited, synchronize] + +jobs: + pr_checks: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ansible-lint pytest pytest-cov black + + - name: Run Ansible Lint on playbooks, tasks, and roles + run: ansible-lint . + + - name: Run Pytest with Coverage Check + run: | + pytest --cov=. --cov-fail-under=85 + + - name: Check Code Formatting with Black + run: black --check . + + - name: Validate PR Description + uses: actions/github-script@v6 + with: + script: | + const core = require('@actions/core'); + const pr = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const body = pr.data.body || ""; + const requiredSections = [ + "Description", + "Test Cases", + "Checklist", + ]; + const missingSections = requiredSections.filter(section => !body.includes(section)); + if(missingSections.length > 0) { + core.setFailed(`PR Description is missing the following sections: ${missingSections.join(", ")}`); + } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8a30d258..cf4800cd 100644 --- a/.gitignore +++ b/.gitignore @@ -396,3 +396,13 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml + + +# Python virtual environment +.venv +.vscode + +# System configuration files +WORKSPACES/* +.ppk +VMWPASSWORD diff --git a/README.md b/README.md index 5cd7cecf..70626124 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,62 @@ -# Project +# SAP Testing Automation Framework -> This repo has been populated by an initial template to help get you started. Please -> make sure to update the content to build a great experience for community-building. +## Overview -As the maintainer of this project, please make a few updates: +The SAP Testing Automation Framework is a automation solution designed to validate the configuration and performance of SAP systems on Azure under a wide array of scenarios. This framework not only streamlines the testing of SAP environments but also brings confidence and assurance by simulating real-world conditions. -- Improving this README.MD file to provide a great experience -- Updating SUPPORT.MD with content about this project's support experience -- Understanding the security reporting process in SECURITY.MD -- Remove this section from the README +Currently, the framework offers test scenarios focusing on high availability functional testing and configuration checks. Under the high availability category, we address critical components including: + +- **SAP HANA Database HA Configurations:** Validate SAP HANA database configurations, ensuring resilience, rapid failover, and optimal performance even in adverse conditions. +- **SAP Central Services (SCS/ERS) HA Setups:** Test and verify the configuration integrity and robustness of SAP Central Services, including load balancing, failover mechanisms, and component interoperability. + +By integrating comprehensive monitoring, detailed logging, and automated evaluation, our framework transforms how organizations maintain and enhance the reliability of their SAP landscapes on Azure. + +### Purpose + +Testing is crucial for maintaining business continuity in SAP environments. This framework addresses several critical needs: + +**Risk Mitigation**: +The framework provides systematic testing of failure scenarios, helping organizations identify and address potential issues before they impact production systems. It simulates various failure modes, including node failures, network interruptions, and storage issues, ensuring that recovery mechanisms function as designed. + +**Compliance**: +Organizations must often demonstrate that their SAP systems meet specific availability requirements. This framework provides documented evidence of HA testing, including detailed logs and reports that can be used for audit purposes. It helps ensure that HA implementations align with organizational standards and regulatory requirements. + +**Quality Assurance**: +Through automated and consistent testing procedures, the framework helps maintain high quality standards across SAP infrastructure components. It validates that all HA mechanisms, including clustering software, storage replication, and application-level failover, work together seamlessly. + +**Automation**: +Manual testing of HA configurations is time-consuming and prone to human error. This framework automates the entire testing process, from setup to execution and reporting, significantly reducing the operational overhead of HA testing while improving accuracy and consistency. + +## Get Started + +There are two primary ways to get started with the SAP Testing Automated Framework. Choose the path that best fits your current environment and objectives: + +### [Integration with SAP Deployment Automation Framework (SDAF)](./docs/SDAF_INTEGRATION.md) + +If you already have [SDAF](https://github.com/Azure/sap-automation) environment set up, integrating the SAP Testing Automation Framework is a natural extension that allows you to leverage existing deployment pipelines and configurations. + +### [Getting Started with High Availability Testing (Standalone)](./docs/GETTING_STARTED.md) + +For users focused solely on validating SAP functionality and configurations, the standalone approach offers a streamlined process to test critical SAP components without the complexity of full deployment integration. + + +### [Architecture and Components](./docs/ARCHITECTURE.md) + +## License + +Copyright (c) Microsoft Corporation. +Licensed under the MIT License. + +## Support + +For support and questions, please: +1. Check existing issues +2. Create new issue if needed +3. Provide detailed information about the problem + +## Additional Resources +- [Azure SAP Documentation](https://docs.microsoft.com/azure/sap) +- [SAP on Azure: High Availability Guide](https://docs.microsoft.com/azure/sap/workloads/sap-high-availability-guide-start) ## Contributing diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..5c40f1e3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,58 @@ +[tool.black] +line_length = 100 + +[tool.pylint.main] +load-plugins = ["pylint.extensions.docparams"] + +[tool.pylint.basic] +argument-naming-style = "snake_case" +attr-naming-style = "snake_case" +bad-names = ["foo", "bar", "baz", "toto", "tutu", "tata"] +class-naming-style = "PascalCase" +docstring-min-length = 10 +function-naming-style = "snake_case" +variable-naming-style = "snake_case" + + +[tool.pylint.format] +max-line-length = 100 +max-module-lines = 1000 + +[tool.pylint."messages control"] +enable = [ + "C0116", + "C0115", + "C0114", + "C0301", + "E1101", + "W0611", +] +disable = [ + "W0702", # bare-except + "W0703", # broad-except + "W4901", # global-statement + "R0902", # too-many-instance-attributes + "R0903", # too-few-public-methods + "R1702", + "R0801", + "W0108" +] + +[tool.pylint.design] +max-args = 5 + +[tool.pylint.docs] +docstring-min-length = 10 + +[tool.pylint.variables] +init-import = false +dummy-variables-rgx = "_.*|dummy" + +[tool.pylint.refactoring] +max-nested-blocks = 3 + +[tool.pylint.errors] +enable = [ + "E1101", + "W0611", +] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..cc852f46 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,66 @@ +ansible-compat==24.6.1 +ansible-core==2.17.1 +ansible-lint==24.6.1 +attrs==23.2.0 +azure-common==1.1.28 +azure-core==1.30.2 +azure-identity==1.17.1 +azure-kusto-data==4.5.1 +azure-kusto-ingest==4.5.1 +azure-mgmt-compute==31.0.0 +azure-mgmt-core==1.4.0 +azure-storage-blob==12.22.0 +azure-storage-queue==12.11.0 +black==24.4.2 +bracex==2.4 +certifi==2024.7.4 +cffi==1.16.0 +charset-normalizer==3.3.2 +click==8.1.7 +cryptography==42.0.8 +filelock==3.15.4 +idna==3.7 +ijson==3.3.0 +importlib_metadata==8.0.0 +isodate==0.6.1 +Jinja2==3.1.4 +jsonschema==4.22.0 +jsonschema-specifications==2023.12.1 +markdown-it-py==3.0.0 +MarkupSafe==2.1.5 +mdurl==0.1.2 +msal==1.30.0 +msal-extensions==1.2.0 +mypy-extensions==1.0.0 +numpy==2.2.1 +packaging==24.1 +pandas==2.2.3 +pathspec==0.12.1 +platformdirs==4.2.2 +portalocker==2.10.1 +pycparser==2.22 +Pygments==2.18.0 +PyJWT==2.8.0 +python-dateutil==2.9.0.post0 +pytz==2024.2 +PyYAML==6.0.1 +referencing==0.35.1 +requests==2.32.3 +resolvelib==1.0.1 +rich==13.7.1 +rpds-py==0.18.1 +ruamel.yaml==0.18.6 +ruamel.yaml.clib==0.2.8 +six==1.16.0 +subprocess-tee==0.4.2 +tenacity==9.0.0 +tomli==2.0.1 +typing_extensions==4.12.2 +tzdata==2024.2 +urllib3==2.2.2 +wcmatch==8.5.2 +yamllint==1.35.1 +zipp==3.19.2 +pytest==8.3.4 +jmespath +netaddr \ No newline at end of file From c6f07988fd9e3f8ef818946ddf4c34bf8b82766d Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 19:20:03 +0000 Subject: [PATCH 02/12] Remove GitHub Actions workflow for pull request checks --- .../workflows/github-actions-pull-request.yml | 53 ------------------- 1 file changed, 53 deletions(-) delete mode 100644 .github/workflows/github-actions-pull-request.yml diff --git a/.github/workflows/github-actions-pull-request.yml b/.github/workflows/github-actions-pull-request.yml deleted file mode 100644 index 9da61519..00000000 --- a/.github/workflows/github-actions-pull-request.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Pull Request Checks - -on: - pull_request: - types: [opened, edited, synchronize] - -jobs: - pr_checks: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Setup Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install ansible-lint pytest pytest-cov black - - - name: Run Ansible Lint on playbooks, tasks, and roles - run: ansible-lint . - - - name: Run Pytest with Coverage Check - run: | - pytest --cov=. --cov-fail-under=85 - - - name: Check Code Formatting with Black - run: black --check . - - - name: Validate PR Description - uses: actions/github-script@v6 - with: - script: | - const core = require('@actions/core'); - const pr = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - }); - const body = pr.data.body || ""; - const requiredSections = [ - "Description", - "Test Cases", - "Checklist", - ]; - const missingSections = requiredSections.filter(section => !body.includes(section)); - if(missingSections.length > 0) { - core.setFailed(`PR Description is missing the following sections: ${missingSections.join(", ")}`); - } \ No newline at end of file From d51a14ba2808aa3be9448013028953f74920ef21 Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 19:21:54 +0000 Subject: [PATCH 03/12] Refactor GitHub Actions workflow to generalize dependency installation and remove unused packages from requirements.txt --- .github/workflows/github-actions-ansible-lint.yml | 2 +- requirements.txt | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/github-actions-ansible-lint.yml b/.github/workflows/github-actions-ansible-lint.yml index 7a2b2494..13378b5e 100644 --- a/.github/workflows/github-actions-ansible-lint.yml +++ b/.github/workflows/github-actions-ansible-lint.yml @@ -21,7 +21,7 @@ jobs: with: python-version: '3.x' - - name: Install Ansible and Ansible-Lint + - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt diff --git a/requirements.txt b/requirements.txt index cc852f46..1b908251 100644 --- a/requirements.txt +++ b/requirements.txt @@ -49,8 +49,6 @@ requests==2.32.3 resolvelib==1.0.1 rich==13.7.1 rpds-py==0.18.1 -ruamel.yaml==0.18.6 -ruamel.yaml.clib==0.2.8 six==1.16.0 subprocess-tee==0.4.2 tenacity==9.0.0 From 2108ec36d5462ff40fef598afb40a523c42743d4 Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 19:36:20 +0000 Subject: [PATCH 04/12] Update requirements.txt to add new dependencies and remove unused packages --- requirements.txt | 52 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 1b908251..7184b38d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,9 @@ ansible-compat==24.6.1 ansible-core==2.17.1 ansible-lint==24.6.1 +ansible-runner==2.4.0 +astroid==3.3.8 +asttokens==3.0.0 attrs==23.2.0 azure-common==1.1.28 azure-core==1.30.2 @@ -9,56 +12,99 @@ azure-kusto-data==4.5.1 azure-kusto-ingest==4.5.1 azure-mgmt-compute==31.0.0 azure-mgmt-core==1.4.0 +azure-mgmt-network==28.1.0 azure-storage-blob==12.22.0 azure-storage-queue==12.11.0 +backcall==0.2.0 +beautifulsoup4==4.13.3 black==24.4.2 +bleach==6.2.0 bracex==2.4 certifi==2024.7.4 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 +coverage==7.6.10 cryptography==42.0.8 +decorator==5.1.1 +defusedxml==0.7.1 +docopt==0.6.2 +exceptiongroup==1.2.2 +executing==2.2.0 +fastjsonschema==2.21.1 filelock==3.15.4 idna==3.7 ijson==3.3.0 importlib_metadata==8.0.0 +iniconfig==2.0.0 +ipython==8.12.3 isodate==0.6.1 +jedi==0.19.2 Jinja2==3.1.4 jsonschema==4.22.0 jsonschema-specifications==2023.12.1 +jupyter_client==8.6.3 +jupyter_core==5.7.2 +jupyterlab_pygments==0.3.0 +lockfile==0.12.2 markdown-it-py==3.0.0 MarkupSafe==2.1.5 +matplotlib-inline==0.1.7 mdurl==0.1.2 +mistune==3.1.1 msal==1.30.0 msal-extensions==1.2.0 mypy-extensions==1.0.0 +nbclient==0.10.2 +nbconvert==7.16.6 +nbformat==5.10.4 numpy==2.2.1 packaging==24.1 pandas==2.2.3 +pandocfilters==1.5.1 +parso==0.8.4 pathspec==0.12.1 +pexpect==4.9.0 +pickleshare==0.7.5 platformdirs==4.2.2 +pluggy==1.5.0 portalocker==2.10.1 +prompt_toolkit==3.0.50 +ptyprocess==0.7.0 +pure_eval==0.2.3 pycparser==2.22 Pygments==2.18.0 PyJWT==2.8.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +python-daemon==3.1.2 python-dateutil==2.9.0.post0 pytz==2024.2 PyYAML==6.0.1 +pyzmq==26.2.1 referencing==0.35.1 requests==2.32.3 resolvelib==1.0.1 rich==13.7.1 rpds-py==0.18.1 +semver==3.0.4 six==1.16.0 +soupsieve==2.6 +stack-data==0.6.3 subprocess-tee==0.4.2 tenacity==9.0.0 +tinycss2==1.4.0 +toml==0.10.2 tomli==2.0.1 +tornado==6.4.2 +traitlets==5.14.3 typing_extensions==4.12.2 tzdata==2024.2 urllib3==2.2.2 wcmatch==8.5.2 +wcwidth==0.2.13 +webencodings==0.5.1 yamllint==1.35.1 +yarg==0.1.9 zipp==3.19.2 -pytest==8.3.4 -jmespath -netaddr \ No newline at end of file From 4aa8c5add89f463f8841bce33c5bf4eb261db829 Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 19:44:10 +0000 Subject: [PATCH 05/12] Update requirements.txt to upgrade dependencies and remove outdated packages --- requirements.txt | 113 ++++++++++++++++------------------------------- 1 file changed, 39 insertions(+), 74 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7184b38d..c6c7c651 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,109 +2,74 @@ ansible-compat==24.6.1 ansible-core==2.17.1 ansible-lint==24.6.1 ansible-runner==2.4.0 -astroid==3.3.8 -asttokens==3.0.0 -attrs==23.2.0 +attrs==25.1.0 azure-common==1.1.28 -azure-core==1.30.2 +azure-core==1.32.0 azure-identity==1.17.1 azure-kusto-data==4.5.1 azure-kusto-ingest==4.5.1 -azure-mgmt-compute==31.0.0 -azure-mgmt-core==1.4.0 +azure-mgmt-core==1.5.0 azure-mgmt-network==28.1.0 -azure-storage-blob==12.22.0 -azure-storage-queue==12.11.0 -backcall==0.2.0 -beautifulsoup4==4.13.3 -black==24.4.2 -bleach==6.2.0 -bracex==2.4 -certifi==2024.7.4 -cffi==1.16.0 -charset-normalizer==3.3.2 -click==8.1.7 -coverage==7.6.10 -cryptography==42.0.8 -decorator==5.1.1 -defusedxml==0.7.1 -docopt==0.6.2 +azure-storage-blob==12.24.1 +azure-storage-queue==12.12.0 +black==25.1.0 +bracex==2.5.post1 +certifi==2025.1.31 +cffi==1.17.1 +charset-normalizer==3.4.1 +click==8.1.8 +coverage==7.6.12 +cryptography==44.0.1 exceptiongroup==1.2.2 -executing==2.2.0 -fastjsonschema==2.21.1 -filelock==3.15.4 -idna==3.7 +filelock==3.17.0 +idna==3.10 ijson==3.3.0 -importlib_metadata==8.0.0 +importlib_metadata==8.6.1 iniconfig==2.0.0 -ipython==8.12.3 -isodate==0.6.1 -jedi==0.19.2 -Jinja2==3.1.4 -jsonschema==4.22.0 -jsonschema-specifications==2023.12.1 -jupyter_client==8.6.3 -jupyter_core==5.7.2 -jupyterlab_pygments==0.3.0 +isodate==0.7.2 +Jinja2==3.1.5 +jsonschema==4.23.0 +jsonschema-specifications==2024.10.1 lockfile==0.12.2 markdown-it-py==3.0.0 -MarkupSafe==2.1.5 -matplotlib-inline==0.1.7 +MarkupSafe==3.0.2 mdurl==0.1.2 -mistune==3.1.1 -msal==1.30.0 +msal==1.31.1 msal-extensions==1.2.0 mypy-extensions==1.0.0 -nbclient==0.10.2 -nbconvert==7.16.6 -nbformat==5.10.4 -numpy==2.2.1 -packaging==24.1 +numpy==2.2.2 +packaging==24.2 pandas==2.2.3 -pandocfilters==1.5.1 -parso==0.8.4 pathspec==0.12.1 pexpect==4.9.0 -pickleshare==0.7.5 -platformdirs==4.2.2 +platformdirs==4.3.6 pluggy==1.5.0 portalocker==2.10.1 -prompt_toolkit==3.0.50 ptyprocess==0.7.0 -pure_eval==0.2.3 pycparser==2.22 -Pygments==2.18.0 -PyJWT==2.8.0 +Pygments==2.19.1 +PyJWT==2.10.1 pytest==8.3.4 pytest-cov==6.0.0 pytest-mock==3.14.0 python-daemon==3.1.2 python-dateutil==2.9.0.post0 -pytz==2024.2 -PyYAML==6.0.1 -pyzmq==26.2.1 -referencing==0.35.1 +pytz==2025.1 +PyYAML==6.0.2 +referencing==0.36.2 requests==2.32.3 resolvelib==1.0.1 -rich==13.7.1 -rpds-py==0.18.1 -semver==3.0.4 -six==1.16.0 -soupsieve==2.6 -stack-data==0.6.3 +rich==13.9.4 +rpds-py==0.22.3 +ruamel.yaml==0.18.10 +ruamel.yaml.clib==0.2.12 +six==1.17.0 subprocess-tee==0.4.2 tenacity==9.0.0 -tinycss2==1.4.0 -toml==0.10.2 -tomli==2.0.1 -tornado==6.4.2 -traitlets==5.14.3 +tomli==2.2.1 typing_extensions==4.12.2 -tzdata==2024.2 +tzdata==2025.1 urllib3==2.2.2 -wcmatch==8.5.2 -wcwidth==0.2.13 -webencodings==0.5.1 +wcmatch==10.0 yamllint==1.35.1 -yarg==0.1.9 -zipp==3.19.2 +zipp==3.21.0 \ No newline at end of file From bf9d233b176b79f4fb44e812be67e0dc647622d0 Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 19:47:57 +0000 Subject: [PATCH 06/12] Add Ansible configuration file with default settings and logging options --- src/ansible.cfg | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/ansible.cfg diff --git a/src/ansible.cfg b/src/ansible.cfg new file mode 100644 index 00000000..28b92a00 --- /dev/null +++ b/src/ansible.cfg @@ -0,0 +1,25 @@ +# Ansible Configuration Files: +# http://docs.ansible.com/ansible/latest/reference_appendices/config.html +# https://github.com/ansible/ansible/blob/stable-2.9/examples/ansible.cfg +# https://github.com/fdavis/ansible-best-practices/blob/master/ansible.cfg + +[defaults] + +display_skipped_hosts = False +conditional_bare_variables = False +interpreter_python = auto_silent +callbacks_enabled = profile_tasks +stdout_callback = yaml +bin_ansible_callbacks = True +host_key_checking = False +error_on_undefined_vars = True +library=modules +module_utils=module_utils +allow_world_readable_tmpfiles = True + +[callback_log_plays] +log_folder = /var/tmp/ansible/hosts +log_path = /var/tmp/ansible/hosts + +[connection] +ssh_args=-C -o ControlMaster=auto -o ControlPersist=60s -o ServerAliveInterval=300 -o ControlPath=/tmp/ansible-ssh-%h-%p-%r From 80e689314c83ffed27c8bf37e9ba3b8b04dea52f Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 19:50:36 +0000 Subject: [PATCH 07/12] Add empty __init__.py file to tests directory --- tests/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..e69de29b From 9d1fe57b522f3646990eacb939e13fa93e9ee7f1 Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 19:53:28 +0000 Subject: [PATCH 08/12] Update GitHub Actions workflow to specify test directory for coverage report --- .github/workflows/github-actions-ansible-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-ansible-lint.yml b/.github/workflows/github-actions-ansible-lint.yml index 13378b5e..de003595 100644 --- a/.github/workflows/github-actions-ansible-lint.yml +++ b/.github/workflows/github-actions-ansible-lint.yml @@ -42,7 +42,7 @@ jobs: - name: Run pytest with coverage run: | - pytest --cov=src/ --cov-report=xml + pytest --cov=src/ --cov-report=xml tests/ - name: Check code formatting with black run: | From c11e451487dc19d991951d23d0d5f1dab1a96f8d Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 19:56:39 +0000 Subject: [PATCH 09/12] Comment out pytest coverage step in GitHub Actions workflow --- .github/workflows/github-actions-ansible-lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions-ansible-lint.yml b/.github/workflows/github-actions-ansible-lint.yml index de003595..97845cb0 100644 --- a/.github/workflows/github-actions-ansible-lint.yml +++ b/.github/workflows/github-actions-ansible-lint.yml @@ -40,9 +40,9 @@ jobs: run: | ansible-lint src/ -c .ansible-lint - - name: Run pytest with coverage - run: | - pytest --cov=src/ --cov-report=xml tests/ + # - name: Run pytest with coverage + # run: | + # pytest --cov=src/ --cov-report=xml tests/ - name: Check code formatting with black run: | From e38ad678d5a01ea8b690234c91918141b46058fa Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 19:59:17 +0000 Subject: [PATCH 10/12] Rename variable for clarity in GitHub Actions workflow script --- .github/workflows/github-actions-ansible-lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions-ansible-lint.yml b/.github/workflows/github-actions-ansible-lint.yml index 97845cb0..8638330b 100644 --- a/.github/workflows/github-actions-ansible-lint.yml +++ b/.github/workflows/github-actions-ansible-lint.yml @@ -52,7 +52,7 @@ jobs: uses: actions/github-script@v6 with: script: | - const core = require('@actions/core'); + const coreLib = require('@actions/core'); const pr = await github.rest.pulls.get({ owner: context.repo.owner, repo: context.repo.repo, @@ -65,6 +65,6 @@ jobs: "Checklist", ]; const missingSections = requiredSections.filter(section => !body.includes(section)); - if(missingSections.length > 0) { - core.setFailed(`PR Description is missing the following sections: ${missingSections.join(", ")}`); + if (missingSections.length > 0) { + coreLib.setFailed(`PR Description is missing the following sections: ${missingSections.join(", ")}`); } \ No newline at end of file From 85022eef0459e8697d0436de79a34c3766946f51 Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 20:01:10 +0000 Subject: [PATCH 11/12] Remove unnecessary import of core library in GitHub Actions Ansible lint workflow --- .github/workflows/github-actions-ansible-lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/github-actions-ansible-lint.yml b/.github/workflows/github-actions-ansible-lint.yml index 8638330b..06ee18a2 100644 --- a/.github/workflows/github-actions-ansible-lint.yml +++ b/.github/workflows/github-actions-ansible-lint.yml @@ -52,7 +52,6 @@ jobs: uses: actions/github-script@v6 with: script: | - const coreLib = require('@actions/core'); const pr = await github.rest.pulls.get({ owner: context.repo.owner, repo: context.repo.repo, From 9bd0825ea069347ccbe9058eac7df321ab8047e5 Mon Sep 17 00:00:00 2001 From: devanshjain Date: Wed, 12 Feb 2025 20:03:43 +0000 Subject: [PATCH 12/12] Remove PR description validation step from GitHub Actions workflow --- .../workflows/github-actions-ansible-lint.yml | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/.github/workflows/github-actions-ansible-lint.yml b/.github/workflows/github-actions-ansible-lint.yml index 06ee18a2..e522d2ea 100644 --- a/.github/workflows/github-actions-ansible-lint.yml +++ b/.github/workflows/github-actions-ansible-lint.yml @@ -47,23 +47,3 @@ jobs: - name: Check code formatting with black run: | black --check src/ --config pyproject.toml - - - name: Validate PR Description - uses: actions/github-script@v6 - with: - script: | - const pr = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - }); - const body = pr.data.body || ""; - const requiredSections = [ - "Description", - "Test Cases", - "Checklist", - ]; - const missingSections = requiredSections.filter(section => !body.includes(section)); - if (missingSections.length > 0) { - coreLib.setFailed(`PR Description is missing the following sections: ${missingSections.join(", ")}`); - } \ No newline at end of file