Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
577cf7f
Sanitize cassettes
hasani-h Oct 10, 2025
983be2d
Linter test_sqlmi.py
hasani-h Oct 14, 2025
001d16e
Linert test_host_feature_flag_show.py
hasani-h Oct 14, 2025
c68af18
Linter test_host_feature_flag_set.py
hasani-h Oct 14, 2025
946448a
Linter test_host_feature_flag_delete.py
hasani-h Oct 14, 2025
b35f3b7
Linter test_backups_policy_set.py
hasani-h Oct 14, 2025
79f6354
Linter test_ag_failover.py
hasani-h Oct 14, 2025
db6d5f8
Linter test_ag_create.py
hasani-h Oct 14, 2025
5e1cf94
Linter test_restore.py
hasani-h Oct 14, 2025
cfc5e24
Linter test_kubernetes_sdk.py
hasani-h Oct 14, 2025
3adfcc4
Reformat with black
hasani-h Oct 14, 2025
740c482
Linter test_json_serialization.py
hasani-h Oct 14, 2025
3d8a184
Linter test_monitoring.py
hasani-h Oct 14, 2025
04b2fc0
Linter test_dc.py
hasani-h Oct 14, 2025
656d787
Linter test_dc.py
hasani-h Oct 14, 2025
1cf871e
Linter help files
hasani-h Oct 14, 2025
7238fd8
Linter feature flags
hasani-h Oct 14, 2025
6396d2a
Linter args
hasani-h Oct 14, 2025
76b20b3
Linter sqlarc database
hasani-h Oct 16, 2025
ebb5123
Linter sqlarc common
hasani-h Oct 16, 2025
0f67b07
Linter postgres
hasani-h Oct 16, 2025
8989361
Move AutoREST code to vendored_sdks
hasani-h Oct 16, 2025
3f0f1b3
Linter core
hasani-h Oct 16, 2025
d3ce6d9
Linter pg sqlmi
hasani-h Oct 16, 2025
de4f973
Linter
hasani-h Oct 16, 2025
6c30f85
Linter ad_connector
hasani-h Oct 17, 2025
f0cc3d6
Linter k8s
hasani-h Oct 23, 2025
e041d6e
Linter postgres
hasani-h Oct 28, 2025
8b0010f
Linter cr_models
hasani-h Oct 28, 2025
759907b
Linter cr_models
hasani-h Oct 28, 2025
2ab7df3
Linter
hasani-h Nov 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 32 additions & 0 deletions src/arcdata/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Exclude everything by default
*

# Make an exception
!arcdata/*

# Make an exception
!scripts/*

# Make an exception
!tools/*

# Make an exception
!dev-requirements.txt

# Make an exception
!LICENSE

# Make an exception
!THIRDPARTYNOTICES.txt

# Make an exception
!.flake8

# Make an exception
!pyproject.toml

# Exclude build artifacts
src/**/build
**/*.pyc
**/__pycache__
env/
17 changes: 17 additions & 0 deletions src/arcdata/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[flake8]
max-line-length = 81
max-complexity = 10
ignore =
E722, # bare except, bad practice, to be removed in the future
F401, # imported but unused, too many violations, to be removed in the future
F811, # redefinition of unused, to be removed in the future
C901, # code flow is too complex, too many violations, to be removed in the future
W504, # line break after binary operator effect on readability is subjective
W503 # line break before binary operator
exclude =
build
tools
scripts
doc
build_scripts
*/test/*
17 changes: 17 additions & 0 deletions src/arcdata/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Set the default behavior (used when a rule below doesn't match)
* text=auto

*.sln -text
*.ico -text
*.bmp -text
*.png -text
*.snk -text
*.mht -text
*.pickle -text

# Some Windows-specific files should always be CRLF
*.bat eol=crlf

# Shell scripts
*.sh eol=lf
*.completion eol=lf
55 changes: 55 additions & 0 deletions src/arcdata/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Python cache
__pycache__/
*.pyc

# Virtual environment
.env/
env/
env27/
venv/
python_env/
.python-version

# PTVS analysis
.ptvs/

# Misc
.idea/
dist/
logs/

# Result of running python setup.py install/pip install -e
RECORD.txt
*.egg-info/

# Mac desktop service store files
.DS_Store

# Code coverage and reports
*.coverage
htmlcov
*coverage.*
TEST-UT-results.xml

# Pytest
.cache/
.pytest_cache/
junit/

# Logs
pip.log

# Setuptools
.eggs/

# Tox
.tox/

# Misc

arcdata/build/
arcdata/azext_arcdata/THIRDPARTYNOTICES.txt
arcdata/azext_arcdata/LICENSE
arcdata/azext_arcdata/kubernetes_sdk/dc/templates/bootstrap/role-bootstrapper.yaml.tmpl
output/
scripts/ci/ev2/public-index.json
5 changes: 5 additions & 0 deletions src/arcdata/.isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[settings]
line_length = 80
multi_line_output = 3
include_trailing_comma = True
#known_third_party = celery,django,environ,pyquery,pytz,redis,requests,rest_framework
1 change: 1 addition & 0 deletions src/arcdata/.mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rules "~MD013", "~MD033", "~MD046"
7 changes: 7 additions & 0 deletions src/arcdata/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
exclude: ^projects/test/
repos:
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# CLI - PR pipeline
trigger:
batch: true
branches:
include:
- master
paths:
include:
- projects/azure-cli-extension/*
variables:
- name: Build.SourcesCliDirectory
value: '$(Build.SourcesDirectory)/projects/azure-cli-extension'
- name: PIPELINE_BUILD_NUMBER
value: $(Build.BuildNumber)
- name: SOURCE_BRANCH
value: $(Build.SourceBranch)
- name: LinuxContainerImage
value: onebranch.azurecr.io/linux/ubuntu-2204:latest
- name: WindowsContainerImage
value: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
resources:
repositories:
- repository: templates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
extends:
template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
parameters:
customTags: 'ES365AIMigrationTooling-BulkMigrated'
globalSdl: # https://aka.ms/obpipelines/sdl
asyncSdl: # https://aka.ms/obpipelines/asyncsdl
enabled: false #
tsa:
enabled: false # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode.
credscan:
suppressionsFile: $(Build.SourcesDirectory)\.config\CredScanSuppressions.json
binskim:
break: true # always break the build on binskim issues in addition to TSA upload
policheck:
break: true # always break the build on policheck issues. You can disable it by setting to 'false'
codeql:
compiled:
enabled: false
# suppression:
# suppressionFile: $(Build.SourcesDirectory)\.gdn\global.gdnsuppress
stages:
- template: /projects/azure-cli-extension/scripts/ci/pipeline-templates/build.yaml@self
- template: /projects/azure-cli-extension/scripts/ci/pipeline-templates/coverage.yaml@self
- template: /projects/azure-cli-extension/scripts/ci/pipeline-templates/lint-and-style.yaml@self
- template: /projects/azure-cli-extension/scripts/ci/pipeline-templates/test.yaml@self
81 changes: 81 additions & 0 deletions src/arcdata/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Contribute to the ArcData Extension

Thank you for your interest in contributing to the ArcData Extension!

There are many ways in which you can contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved.

## Have a question

Search existing github [issues](https://github.com/Microsoft/arcdata-cli-extension/issues?q=is%3Aopen+is%3Aissue+label%3Aquestion) for similar questions first, and feel free to file an issue with a "question" tag to get our attention.

## Found a bug

### Where to find known issues

Check open [issues](https://github.com/Microsoft/arcdata-cli-extension/issues?q=is%3Aopen+is%3Aissue+label%3Abug) before you file a new bug report.

If you find your issue already exists, make relevant comments and add your reaction. Use a reaction in place of a "+1" comment:
👍 - upvote
👎 - downvote

### Report new issue

The best way to get your bug fixed is to provide good repro steps. Use our [Bug template](https://github.com/Microsoft/arcdata-cli-extension/issues/new/choose) to report any issues.

## Feature requests

### Where to find existing requests

Check open [feature requests](https://github.com/Microsoft/arcdata-cli-extension/issues?q=is%3Aissue+is%3Aopen+label%3AFeature) before you file a new request.

If you find your request already exists, make relevant comments and add your reaction. Use a reaction in place of a "+1" comment:
👍 - upvote
👎 - downvote

### Submit New Feature request

Use our Feature Request [template](https://github.com/Microsoft/arcdata-cli-extension/issues/new/choose) to create a new feature request.

## Get started

Unsure where to begin contributing? You can start by looking through these beginner and help-wanted issues:

- [Beginner issues](https://github.com/Microsoft/arcdata-cli-extension/issues?q=is%3Aissue+is%3Aopen+label%3ABeginner) - issues which should only require a few lines of code, and a test or two.

- [Help wanted issues](https://github.com/Microsoft/arcdata-cli-extension/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) - issues which should be a bit more involved than beginner issues.

Refer our [Developer setup](./doc/dev_setup.md) instructions to get started with code and running tests.

### Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected])with any additional questions or comments.

### Pull Request etiquette

#### Guidelines

- Every contribution (PR) needs to have an issue referenced
- Approach(s) should be discussed and closed in the issue itself before raising a PR
- We use pylint and flake8 to have consistent coding styles followed. This is taken care in the Pull request checks.

#### If PR contains new commands

- Recorded tests are mandatory
- UTs are mandatory
- Command signature should be discussed and approved in referenced issue. [Sample](https://github.com/Microsoft/arcdata-cli-extension/issues/319)
- Table transforms are present (reviewed in PR)
- Help text is present for commands and parameters

#### If PR contains point fixes

- UTs are mandatory

### CLA requirements

You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright.

Submit a Contributor License Agreement (CLA) before submitting a pull request. You may visit [https://cla.microsoft.com](https://cla.microsoft.com) to sign digitally.

## Thank you

Your contributions to open source, large or small, make great projects like this possible. Thank you for taking the time to contribute.
31 changes: 31 additions & 0 deletions src/arcdata/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#------------------------------------------------------------------------------

ARG AZEXT_IMAGE
ARG CLI_VERSION
ARG BUILD_DATE

FROM ${AZEXT_IMAGE} AS build-env

LABEL maintainer="Microsoft" \
org.label-schema.schema-version="1.0" \
org.label-schema.vendor="Microsoft" \
org.label-schema.name="Azure CLI ArcData extension" \
org.label-schema.version=${CLI_VERSION} \
org.label-schema.license="MIT" \
org.label-schema.description="The Azure CLI ArcData extension." \
org.label-schema.url="https://docs.microsoft.com/cli/azure/overview" \
org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.docker.cmd="docker run -v \${HOME}/.kube:/root/.kube -v \${HOME}/.azure:/root/.azure -it mcr.microsoft.com/azure-cli:${CLI_VERSION}"

WORKDIR ../../azure-cli-extension
COPY . /azure-cli-extension

# package and install arcdata az ext
RUN ./scripts/install.sh

WORKDIR /
CMD bash
21 changes: 21 additions & 0 deletions src/arcdata/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
Loading
Loading