Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test pr code #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
31 changes: 31 additions & 0 deletions .github/workflows/copilot-pr-review.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
APIKEY: ${{ secrets.APIKEY }}
ENDPOINT: ${{ secrets.ENDPOINT }}
PR_URL: ${{ toJSON(github.event) }}
AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://semver.org/>`_), 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Choose a reason for hiding this comment

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

  1. The updated regex pattern is more complex; clarify it with a comment explaining the logic.
  2. Instead of re.search, use re.match since the pattern is expected to match from the start.

Refinement:

# Updated pattern to handle optional segments between the size and version
pattern = r'standard_([a-z]+)(\d+)([a-z]*)(?:_[^_]+)*_v(\d+)'  
match = re.match(pattern, vm_size.lower())

Expand Down
2 changes: 1 addition & 1 deletion src/aks-preview/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from setuptools import setup, find_packages

VERSION = "7.0.0b7"
VERSION = "7.0.0b8"

CLASSIFIERS = [
"Development Status :: 4 - Beta",

Choose a reason for hiding this comment

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

The version update from "7.0.0b7" to "7.0.0b8" is appropriate for indicating the new beta release. However, this diff does not show any other changes that require refining. Ensure all functional and necessary updates are included in separate commits for clarity.

Expand Down
Loading