From 6250be4cddcb95c4b3ddfb4bf4467d008a632aee Mon Sep 17 00:00:00 2001 From: AllyW Date: Tue, 27 Aug 2024 10:02:42 +0800 Subject: [PATCH 1/2] Create copilot-pr-review.yml --- .github/workflows/copilot-pr-review.yml | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/copilot-pr-review.yml diff --git a/.github/workflows/copilot-pr-review.yml b/.github/workflows/copilot-pr-review.yml new file mode 100644 index 00000000000..7b0497f3fcb --- /dev/null +++ b/.github/workflows/copilot-pr-review.yml @@ -0,0 +1,31 @@ +name: Auto Review PR + +on: + pull_request_target: + types: [opened, synchronize, labeled, unlabeled ] + branches: + - main + +permissions: {} + +jobs: + copilot-pr-code-review: + if: ${{ contains(github.event.pull_request.labels.*.name, 'copilot-code-review') }} + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: read + steps: + - name: Check Init Event + env: + action: ${{ toJSON(github.event.action) }} + label: ${{ toJSON(github.event.label) }} + run: | + echo start review module changed + - name: Copilot PR Review + uses: AllyW/copilot-pr-review@v0.1.12 + with: + APIKEY: ${{ secrets.APIKEY }} + ENDPOINT: ${{ secrets.ENDPOINT }} + PR_URL: ${{ toJSON(github.event) }} + AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 13dbeab0316a35e3688ec50db2c7ff406e092142 Mon Sep 17 00:00:00 2001 From: AllyW Date: Tue, 27 Aug 2024 10:10:33 +0800 Subject: [PATCH 2/2] test pr code --- src/aks-preview/HISTORY.rst | 4 ++++ .../azext_aks_preview/azurecontainerstorage/_helpers.py | 2 +- src/aks-preview/setup.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index 619b263cfa3..eaf9b233ba0 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -9,6 +9,10 @@ If there is no rush to release a new version, please just add a description of t To release a new version, please select a new version number (usually plus 1 to last patch version, X.Y.Z -> Major.Minor.Patch, more details in `\doc `_), and then add a new section named as the new version number in this file, the content should include the new modifications and everything from the *Pending* section. Finally, update the `VERSION` variable in `setup.py` with this new version number. +7.0.0b8 ++++++++ +* Update the VM SKU regex to include bigger set of VMs eligible for Azure Container Storage. + 7.0.0b7 +++++++ * [AKS] `az aks create/update`: Support UserAssigned Managed Identity for grafana linking in managed prometheus diff --git a/src/aks-preview/azext_aks_preview/azurecontainerstorage/_helpers.py b/src/aks-preview/azext_aks_preview/azurecontainerstorage/_helpers.py index 6b4bcc169b9..6b14fe3a397 100644 --- a/src/aks-preview/azext_aks_preview/azurecontainerstorage/_helpers.py +++ b/src/aks-preview/azext_aks_preview/azurecontainerstorage/_helpers.py @@ -414,7 +414,7 @@ def get_desired_resource_value_args( # Returns -1 if there is a problem with parsing the vm_size. def get_cores_from_sku(vm_size): cpu_value = -1 - pattern = r'standard_([a-z]+)(\d+)([a-z]*)_v(\d+)' + pattern = r'standard_([a-z]+)(\d+)([a-z]*)(?:_[^_]+)*_v(\d+)' match = re.search(pattern, vm_size.lower()) if match: series_prefix = match.group(1) diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 3b9c754429e..a28c4adeadb 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -9,7 +9,7 @@ from setuptools import setup, find_packages -VERSION = "7.0.0b7" +VERSION = "7.0.0b8" CLASSIFIERS = [ "Development Status :: 4 - Beta",