Skip to content

Commit 51072bc

Browse files
Merge pull request #493 from vimleshmishra/release-410
CP-9804 Raise a review to merge all changes from develop branch to master branch after 12.0 code freeze
2 parents 2ac2b48 + e3f8393 commit 51072bc

File tree

175 files changed

+1813
-6088
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+1813
-6088
lines changed

.bumpversion.cfg

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 4.0.5
2+
current_version = 4.1.0
33
commit = False
44
tag = False
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
@@ -8,11 +8,12 @@ serialize =
88
{major}.{minor}.{patch}
99

1010
[bumpversion:part:release]
11-
optional_value = prod
11+
optional_value = _
1212
first_value = dev
1313
values =
1414
dev
15-
prod
15+
rc
16+
_
1617

1718
[bumpversion:part:dev]
1819

@@ -26,3 +27,6 @@ values =
2627

2728
[bumpversion:file:./tools/src/main/python/dlpx/virtualization/_internal/VERSION]
2829

30+
[bumpversion:file:./tools/src/test/python/dlpx/virtualization/_internal/test_package_util.py]
31+
search = DVP_VERSION = '{current_version}'
32+
replace = DVP_VERSION = '{new_version}'

.dependabot/config.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/dvp"
5+
schedule:
6+
interval: monthly
7+
open-pull-requests-limit: 10
8+
target-branch: develop
9+
- package-ecosystem: pip
10+
directory: "/common"
11+
schedule:
12+
interval: monthly
13+
open-pull-requests-limit: 10
14+
target-branch: develop
15+
- package-ecosystem: pip
16+
directory: "/platform"
17+
schedule:
18+
interval: monthly
19+
open-pull-requests-limit: 10
20+
target-branch: develop
21+
- package-ecosystem: pip
22+
directory: "/libs"
23+
schedule:
24+
interval: monthly
25+
open-pull-requests-limit: 10
26+
target-branch: develop
27+
- package-ecosystem: pip
28+
directory: "/tools"
29+
schedule:
30+
interval: monthly
31+
open-pull-requests-limit: 10
32+
target-branch: develop

.github/workflows/pre-commit.yml

Lines changed: 34 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,158 +1,66 @@
1-
name: Pre-commit actions for Delphix Virtualization SDK
1+
#
2+
# Copyright (c) 2020, 2022 by Delphix. All rights reserved.
3+
#
24

3-
on: [pull_request]
5+
name: "Pre-commit actions for Delphix Virtualization SDK"
46

5-
jobs:
6-
pytest27:
7-
name: Test ${{ matrix.package }} on ${{ matrix.os }} using pytest (Python 2.7)
8-
runs-on: ${{ matrix.os }}
9-
strategy:
10-
max-parallel: 4
11-
matrix:
12-
python-version: [2.7]
13-
os: [ubuntu-latest, macos-10.15, windows-latest]
14-
package: [common, libs, platform]
15-
16-
steps:
17-
- name: Checkout ${{ matrix.package }} project
18-
uses: actions/checkout@v3
19-
20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v3
22-
with:
23-
python-version: ${{ matrix.python-version }}
24-
25-
- name: Install ${{ matrix.package }} dependencies
26-
working-directory: ${{ matrix.package }}
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install -r requirements.txt --find-links https://test.pypi.org/simple/dvp-api/
30-
31-
- name: Install ${{ matrix.package }} project
32-
working-directory: ${{ matrix.package }}
33-
run: |
34-
pip install . --find-links https://test.pypi.org/simple/dvp-api/
35-
36-
- name: Test ${{ matrix.package }} project with pytest
37-
working-directory: ${{ matrix.package }}
38-
run: |
39-
python -m pytest src/test/python
7+
on:
8+
# It is important to check the commits done to master, develop and release branches only.
9+
pull_request:
10+
branches:
11+
- master
12+
- develop
13+
- release
4014

15+
jobs:
4116
pytest38:
4217
name: Test ${{ matrix.package }} on ${{ matrix.os }} using pytest (Python 3.8)
4318
runs-on: ${{ matrix.os }}
4419
strategy:
4520
max-parallel: 4
4621
matrix:
47-
python-version: [3.8]
48-
os: [ubuntu-latest, macos-latest, windows-latest]
49-
package: [common, libs, platform, tools]
50-
51-
steps:
52-
- name: Checkout ${{ matrix.package }} project
53-
uses: actions/checkout@v1
54-
55-
- name: Set up Python ${{ matrix.python-version }}
56-
uses: actions/setup-python@v1
57-
with:
58-
python-version: ${{ matrix.python-version }}
59-
60-
- name: Install ${{ matrix.package }} dependencies
61-
working-directory: ${{ matrix.package }}
62-
run: |
63-
python -m pip install --upgrade pip
64-
pip install -r requirements.txt --find-links https://test.pypi.org/simple/dvp-api/
65-
66-
- name: Install ${{ matrix.package }} project
67-
working-directory: ${{ matrix.package }}
68-
run: |
69-
pip install . --find-links https://test.pypi.org/simple/dvp-api/
70-
71-
- name: Test ${{ matrix.package }} project with pytest
72-
working-directory: ${{ matrix.package }}
73-
run: |
74-
python -m pytest src/test/python
75-
76-
lintpython27:
77-
name: Lint ${{ matrix.package }} - Python27
78-
79-
runs-on: ubuntu-latest
80-
strategy:
81-
max-parallel: 4
82-
matrix:
83-
package: [common, libs, platform]
22+
python-version: [ 3.8 ]
23+
os: [ ubuntu-latest, macos-latest, windows-latest ]
24+
package: [ common, libs, platform, tools ]
8425

8526
steps:
86-
- name: Checkout ${{ matrix.package }}
87-
uses: actions/checkout@v1
27+
- name: Checkout ${{ matrix.package }} project
28+
uses: actions/checkout@v3
8829

89-
- name: Set up Python 2.7
90-
uses: actions/setup-python@v1
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v4
9132
with:
92-
python-version: 2.7
33+
python-version: ${{ matrix.python-version }}
9334

94-
- name: Install flake8
35+
- name: Install ${{ matrix.package }} dependencies
36+
working-directory: ${{ matrix.package }}
9537
run: |
9638
python -m pip install --upgrade pip
97-
pip install flake8
39+
pip install -r requirements.txt --find-links https://test.pypi.org/simple/dvp-api/
9840
99-
- name: Run flake8 on src directory
41+
- name: Install ${{ matrix.package }} project
10042
working-directory: ${{ matrix.package }}
101-
run: python -m flake8 src/main/python --max-line-length 88
43+
run: |
44+
pip install . --find-links https://test.pypi.org/simple/dvp-api/
10245
103-
- name: Run flake8 on test directory
46+
# Run all the test cases part of the package.
47+
- name: Test ${{ matrix.package }} project with pytest
10448
working-directory: ${{ matrix.package }}
105-
run: python -m flake8 src/test/python --max-line-length 88
106-
107-
lintpython38:
108-
name: Lint ${{ matrix.package }} - Python38
109-
110-
runs-on: ubuntu-latest
111-
strategy:
112-
max-parallel: 4
113-
matrix:
114-
package: [common, libs, platform, tools]
115-
116-
steps:
117-
- name: Checkout ${{ matrix.package }}
118-
uses: actions/checkout@v1
119-
120-
- name: Set up Python 3.8
121-
uses: actions/setup-python@v1
122-
with:
123-
python-version: 3.8
49+
run: |
50+
python -m pytest src/test/python
12451
52+
# Install flake8 and run linting on src and test for linting if OS is ubuntu.
12553
- name: Install flake8
54+
if: ${{ matrix.os == 'ubuntu-latest' }}
12655
run: |
127-
python -m pip install --upgrade pip
12856
pip install flake8
12957
13058
- name: Run flake8 on src directory
59+
if: ${{ matrix.os == 'ubuntu-latest' }}
13160
working-directory: ${{ matrix.package }}
13261
run: python -m flake8 src/main/python --max-line-length 88
13362

13463
- name: Run flake8 on test directory
64+
if: ${{ matrix.os == 'ubuntu-latest' }}
13565
working-directory: ${{ matrix.package }}
13666
run: python -m flake8 src/test/python --max-line-length 88
137-
138-
#format:
139-
#name: Check format ${{ matrix.package}}
140-
141-
#runs-on: ubuntu-latest
142-
#strategy:
143-
#max-parallel: 4
144-
#matrix:
145-
#package: [common, libs, platform, tools]
146-
147-
#steps:
148-
#- uses: actions/checkout@v1
149-
150-
#- name: Check src format
151-
#uses: lgeiger/black-action@v1.0.1
152-
#with:
153-
#args: "${{ matrix.package }}/src/main/python -t py27 --check"
154-
155-
#- name: Check test format
156-
#uses: lgeiger/black-action@v1.0.1
157-
#with:
158-
#args: "${{ matrix.package }}/src/test/python -t py27 --check"

.github/workflows/publish-docs.yml

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#
2+
# Copyright (c) 2020, 2022 by Delphix. All rights reserved.
3+
#
4+
15
name: Publish docs to GitHub pages
26

37
on:
@@ -16,42 +20,52 @@ jobs:
1620
runs-on: ubuntu-latest
1721
strategy:
1822
matrix:
19-
python-version: [3.7]
20-
package: [docs]
21-
repository: ['delphix/virtualization-sdk']
23+
python-version: [ 3.8 ]
24+
package: [ docs ]
25+
repository: [ 'delphix/virtualization-sdk' ]
2226

2327
steps:
28+
###
29+
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
30+
# Set fetch-depth: 0 to fetch all history for all branches and tags.
31+
###
2432
- uses: actions/checkout@v2
2533
with:
26-
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
27-
# Set fetch-depth: 0 to fetch all history for all branches and tags.
2834
fetch-depth: 0
35+
2936
- name: Set up Python ${{ matrix.python-version }}
3037
uses: actions/setup-python@v2
3138
with:
3239
python-version: ${{ matrix.python-version }}
40+
41+
###
42+
# Set CURRENT_BRANCH environment variable to the current branch name. Refrain from using 'set-env' as
43+
# GitHub has identified the command as a moderate security vulnerability.
44+
###
3345
- name: Set the current branch environment variable
3446
working-directory: ${{ matrix.package }}
3547
run: |
3648
CURRENT_BRANCH_VAR=${GITHUB_REF#refs/heads/}
3749
echo "Current branch: $CURRENT_BRANCH_VAR"
38-
# Set CURRENT_BRANCH environment variable to the current branch name. Refrain from using 'set-env' as
39-
# GitHub has identified the command as a moderate security vulnerability.
4050
echo "CURRENT_BRANCH=$(echo $CURRENT_BRANCH_VAR)" >> $GITHUB_ENV
51+
52+
# Display all remote branches
4153
- name: Display all remote branches
4254
working-directory: ${{ matrix.package }}
43-
run: |
44-
# Display all remote branches
45-
git branch -r
55+
run: git branch -r
56+
57+
###
58+
# Get only docs branches, extract the "docs/x.y.z" part, sort them in descending order, and get the first one.
59+
# Set the LATEST_DOCS_BRANCH environment variable. Refrain from using 'set-env' as GitHub has identified the
60+
# command as a moderate security vulnerability.
61+
###
4662
- name: Set the latest docs branch environment variable
4763
working-directory: ${{ matrix.package }}
4864
run: |
49-
# Get only docs branches, extract the "docs/x.y.z" part, sort them in descending order, and get the first one.
5065
LATEST_DOCS_BRANCH_VAR=$(git branch -r | grep -e ".*\/*docs\/[0-9].[0-9].[0-9]" | sed -n "s/.*\/*\(docs\/[0-9].[0-9].[0-9]\).*/\1/p" | sort -r | head -n 1)
5166
echo "Latest docs branch: $LATEST_DOCS_BRANCH_VAR"
52-
# Set the LATEST_DOCS_BRANCH environment variable. Refrain from using 'set-env' as GitHub has identified the
53-
# command as a moderate security vulnerability.
5467
echo "LATEST_DOCS_BRANCH=$(echo $LATEST_DOCS_BRANCH_VAR)" >> $GITHUB_ENV
68+
5569
- name: Check that the current branch is the latest docs branch, fail otherwise
5670
working-directory: ${{ matrix.package }}
5771
run: |
@@ -61,16 +75,19 @@ jobs:
6175
else
6276
echo "The action is running on the latest docs branch."
6377
fi
78+
6479
- name: Install Pipenv
6580
uses: dschep/install-pipenv-action@v1
81+
6682
- name: Install dependencies for building documenation
6783
working-directory: ${{ matrix.package }}
68-
run: |
69-
pipenv install
84+
run: pipenv install
85+
7086
- name: Build documentation
7187
working-directory: ${{ matrix.package }}
72-
run: |
73-
pipenv run mkdocs build --clean
88+
run: pipenv run mkdocs build --clean
89+
90+
# Docs will be pushed to developer.delphix.com if the repository is delphix/virtualization-sdk.
7491
- name: Deploy the contents of docs/site to gh-pages (developer.delphix.com) 🚀
7592
if: ${{ github.repository == matrix.repository }}
7693
uses: peaceiris/actions-gh-pages@v3
@@ -81,6 +98,7 @@ jobs:
8198
user_name: "github-actions[bot]"
8299
user_email: "github-actions[bot]@users.noreply.github.com"
83100
cname: developer.delphix.com
101+
84102
- name: Deploy the contents of docs/site to personal gh-pages 🚀
85103
if: ${{ github.repository != matrix.repository }}
86104
uses: peaceiris/actions-gh-pages@v3

.github/workflows/publish-python-packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
max-parallel: 5
1919
matrix:
20-
python-version: [2.7]
20+
python-version: [3.8]
2121
package: [common, dvp, libs, platform, tools]
2222

2323
steps:

0 commit comments

Comments
 (0)