From 69c7dae2abe72d932309cb57df1cd8f471b7ced8 Mon Sep 17 00:00:00 2001 From: Timna Brown <24630902+brown9804@users.noreply.github.com> Date: Tue, 13 May 2025 09:34:40 -0600 Subject: [PATCH 1/9] list rules --- .markdownlint.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .markdownlint.json diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..97a16cc --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,14 @@ +{ + "default": true, + "MD005": false, + "MD009": false, + "MD013": false, + "MD028": false, + "MD029": false, + "MD033": false, + "MD048": false, + "MD040": false, + "MD041": false, + "MD045": false, + "MD046": false +} From d10d4e264edd5cfaf9baf1bf0d99a59b934eede0 Mon Sep 17 00:00:00 2001 From: Timna Brown <24630902+brown9804@users.noreply.github.com> Date: Tue, 13 May 2025 09:35:26 -0600 Subject: [PATCH 2/9] moved --- .markdownlint.json => .github/.markdownlint.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .markdownlint.json => .github/.markdownlint.json (100%) diff --git a/.markdownlint.json b/.github/.markdownlint.json similarity index 100% rename from .markdownlint.json rename to .github/.markdownlint.json From beeefa7fef049f0acea67451e129e5c0fd8466e8 Mon Sep 17 00:00:00 2001 From: Timna Brown <24630902+brown9804@users.noreply.github.com> Date: Tue, 13 May 2025 09:41:04 -0600 Subject: [PATCH 3/9] logic --- .github/workflows/update_date.py | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/update_date.py diff --git a/.github/workflows/update_date.py b/.github/workflows/update_date.py new file mode 100644 index 0000000..ab86df5 --- /dev/null +++ b/.github/workflows/update_date.py @@ -0,0 +1,49 @@ +import os +import subprocess +from datetime import datetime, timezone + +# Get the list of modified files +result = subprocess.run(['git', 'diff', '--name-only', 'HEAD~1'], stdout=subprocess.PIPE) +modified_files = result.stdout.decode('utf-8').split() + +# Debugging: Print the list of modified files +print("Modified files:", modified_files) + +# Filter for Markdown files +modified_md_files = [f for f in modified_files if f.endswith('.md')] + +# Debugging: Print the list of modified Markdown files +print("Modified Markdown files:", modified_md_files) + +# Current date +current_date = datetime.now(timezone.utc).strftime('%Y-%m-%d') + +# Function to update the last modified date in a file +def update_date_in_file(file_path): + with open(file_path, 'r') as file: + lines = file.readlines() + + updated = False + with open(file_path, 'w') as file: + for line in lines: + if line.startswith('Last updated:'): + file.write(f'Last updated: {current_date}\n') + updated = True + else: + file.write(line) + if not updated: + file.write(f'\nLast updated: {current_date}\n') + +# Check if there are any modified Markdown files +if not modified_md_files: + print("No modified Markdown files found.") + exit(0) + +# Update the date in each modified Markdown file +for file_path in modified_md_files: + print(f"Updating file: {file_path}") # Debugging: Print the file being updated + update_date_in_file(file_path) + +# Add and commit changes +subprocess.run(['git', 'add', '-A']) +subprocess.run(['git', 'commit', '-m', 'Update last modified date in Markdown files']) From 9ea813fe63faaff6c71a54f98eee18e3349a4279 Mon Sep 17 00:00:00 2001 From: Timna Brown <24630902+brown9804@users.noreply.github.com> Date: Tue, 13 May 2025 09:41:38 -0600 Subject: [PATCH 4/9] testing pi --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32928cd..e697929 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-05-13 +Last updated: 2025-05-12 ---------- From 759403e8b2e93874ebb55668eed47c4673a43077 Mon Sep 17 00:00:00 2001 From: Timna Brown <24630902+brown9804@users.noreply.github.com> Date: Tue, 13 May 2025 09:42:13 -0600 Subject: [PATCH 5/9] + pipeline makrdown format --- .github/validate_and_fix_markdown.yml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/validate_and_fix_markdown.yml diff --git a/.github/validate_and_fix_markdown.yml b/.github/validate_and_fix_markdown.yml new file mode 100644 index 0000000..cd98f3c --- /dev/null +++ b/.github/validate_and_fix_markdown.yml @@ -0,0 +1,44 @@ +name: Validate and Fix Markdown + +on: + pull_request: + branches: + - main + +permissions: + contents: write + +jobs: + validate-and-fix-markdown: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install Markdown Linter + run: npm install -g markdownlint-cli + + - name: Lint and Fix Markdown files + run: markdownlint '**/*.md' --fix --config .github/.markdownlint.json --ignore GPT-RAG_SolutionAccelerator/ + + - name: Configure Git + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + + - name: Commit changes + run: | + git fetch origin + git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }} + git add -A + git commit -m "Fix Markdown syntax issues" || echo "No changes to commit" + git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed" + git push origin HEAD:${{ github.event.pull_request.head.ref }} From c4217f19a523b6560604190d3f6bc54c74f20797 Mon Sep 17 00:00:00 2001 From: Timna Brown <24630902+brown9804@users.noreply.github.com> Date: Tue, 13 May 2025 09:42:31 -0600 Subject: [PATCH 6/9] moved --- .github/{ => workflows}/validate_and_fix_markdown.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/validate_and_fix_markdown.yml (100%) diff --git a/.github/validate_and_fix_markdown.yml b/.github/workflows/validate_and_fix_markdown.yml similarity index 100% rename from .github/validate_and_fix_markdown.yml rename to .github/workflows/validate_and_fix_markdown.yml From a77c9e8ad29d7640a456446f0028d4ffe56e2ae6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 May 2025 15:42:49 +0000 Subject: [PATCH 7/9] Fix Markdown syntax issues --- README.md | 12 +++++------- autoscaleMultiple-IOPS/README.md | 6 ++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e697929..8a2bbb3 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ Last updated: 2025-05-12 -
Table of Content (Click to expand) @@ -32,6 +31,7 @@ Last updated: 2025-05-12
> When Autoscale IOPS is enabled for Azure Database for MySQL (Flexible Server), the IOPS (Input/Output Operations Per Second) automatically scale both up and down based on your workload demands.
+> > - During `high demand`, the system `increases IOPS` to maintain performance. > - During `low demand`, it `scales down` to reduce resource usage and cost. @@ -43,7 +43,7 @@ Last updated: 2025-05-12 4. Choose your subscription, resource group, and server name. 5. Select the region, MySQL version, and workload type (e.g., Development, Production). - https://github.com/user-attachments/assets/5b500aea-538d-4ddb-88b6-e0717a2d0fbe + ## How to enable IOPS (manual approach) @@ -53,7 +53,7 @@ Last updated: 2025-05-12 4. In the IOPS section, select the option `Autoscale IOPS` 5. Click `Save` to apply the changes. - https://github.com/user-attachments/assets/9e2983b3-3839-4ad3-8ab8-ccbb698f3228 + ## How to enable IOPS (script) @@ -67,7 +67,7 @@ Last updated: 2025-05-12 image - - Choose the ` Storage IO` metric (both percent and count). + - Choose the `Storage IO` metric (both percent and count). image @@ -82,11 +82,9 @@ Last updated: 2025-05-12 - You can also monitor `IO utilization percentage` to see how close your server is to its current IOPS limit. 3. **Enable Alerts (Optional)**: You can set up `alerts` in Azure Monitor to notify you when IOPS usage crosses certain thresholds, which can help you track scaling events in real time. - https://github.com/user-attachments/assets/19b96128-e37f-40b4-8e23-8a5384bc6686 - +

Total Visitors

Visitor Count
- diff --git a/autoscaleMultiple-IOPS/README.md b/autoscaleMultiple-IOPS/README.md index d56650c..1e53fcf 100644 --- a/autoscaleMultiple-IOPS/README.md +++ b/autoscaleMultiple-IOPS/README.md @@ -12,7 +12,7 @@ Last updated: 2025-05-13 > Using [Python 3.7+](https://www.python.org/downloads/source/) > [!NOTE] -> Enable Autoscale IOPS via REST API, as now this is the only way to automate enabling Autoscale IOPS since, Azure CLI and PowerShell do not support this setting yet. +> Enable Autoscale IOPS via REST API, as now this is the only way to automate enabling Autoscale IOPS since, Azure CLI and PowerShell do not support this setting yet. > [!IMPORTANT] > Autoscale IOPS is `only available` for the `General Purpose` and `Business Critical tiers`. `Burstable tier` (B-series) servers (e.g., B1ms) `do not support autoscale IOPS`. @@ -23,13 +23,14 @@ Last updated: 2025-05-13 image -- [Install Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli). +- [Install Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli). image ## By Resource Group > Overall process:
(./scripts/enable_autoscale_iops_byRG.py) +> > - Automatically retrieves your **Azure subscription ID** using the Azure CLI.
> - List all Resource Groups in current subscription ID.
> - Prompts you only for the **resource group name**.
@@ -45,6 +46,7 @@ Review [the script](./scripts/enable_autoscale_iops_byRG.py), and download it to ## Across a Subscription > You can also enable autoscale IOPS across an entire subscription, it requires:
+> > - Listing all MySQL Flexible Servers in the subscription.
> - For each server, retrieving its resource group.
> - Applying the update if the server is in a supported tier (General Purpose or Business Critical).
From d9204e093bf3c7df2cafac25c7488ab0250a5036 Mon Sep 17 00:00:00 2001 From: Timna Brown <24630902+brown9804@users.noreply.github.com> Date: Tue, 13 May 2025 09:43:09 -0600 Subject: [PATCH 8/9] update date --- .github/workflows/update-md-date.yml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/update-md-date.yml diff --git a/.github/workflows/update-md-date.yml b/.github/workflows/update-md-date.yml new file mode 100644 index 0000000..96dc9d7 --- /dev/null +++ b/.github/workflows/update-md-date.yml @@ -0,0 +1,41 @@ +name: Update Last Modified Date + +on: + pull_request: + branches: + - main + +permissions: + contents: write + +jobs: + update-date: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install dependencies + run: pip install python-dateutil + + - name: Configure Git + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + + - name: Update last modified date in Markdown files + run: python .github/workflows/update_date.py + + - name: Commit changes + run: | + git add -A + git commit -m "Update last modified date in Markdown files" || echo "No changes to commit" + git push origin HEAD:${{ github.event.pull_request.head.ref }} From c22dfb0e0dc665e9ecf95bfa078f0e8c2af527fe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 May 2025 15:43:33 +0000 Subject: [PATCH 9/9] Update last modified date in Markdown files --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a2bbb3..0410d29 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Costa Rica [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) [brown9804](https://github.com/brown9804) -Last updated: 2025-05-12 +Last updated: 2025-05-13 ----------