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

Testcommittedchanges #1330

Open
wants to merge 29 commits into
base: master
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
9 changes: 6 additions & 3 deletions .azure-pipelines/azure-pipelines-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
strategy:
matrix:
Python36:
python.version: '3.6.x'
python.version: '3.10'
Python37:
python.version: '3.x'
python.version: '3.10'
maxParallel: 3

steps:
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
versionSpec: '3.8'
architecture: 'x64'

- template: templates/install-azure-cli-edge.yml
Expand All @@ -155,6 +155,9 @@ jobs:
targetType: 'filePath'
filePath: 'scripts/runStyleCheck.ps1'




- job: 'Run_HelpText_Check'
dependsOn: 'Build_Publish_Azure_CLI_Test_SDK'
pool:
Expand Down
18 changes: 12 additions & 6 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
max-line-length = 120
max-complexity = 10
ignore =
E501, # line too long, it is covered by pylint
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
# line too long, it is covered by pylint
E501,
# bare except, bad practice, to be removed in the future
E722,
# imported but unused, too many violations, to be removed in the future
F401,
# redefinition of unused, to be removed in the future
F811,
# code flow is too complex, too many violations, to be removed in the future
C901,
# line break after binary operator effect on readability is subjective
W504
exclude =
tests
build
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/azext_devops/dev/pipelines/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def build_list(definition_ids=None, branch=None, organization=None, project=None
return builds


def build_cancel(build_id, open=False, organization=None, project=None, detect=None):
def build_cancel(build_id, open=False, organization=None, project=None, detect=None): # pylint: disable=redefined-builtin
"""Cancels if build is running.
:param build_id: ID of the build.
:type build_id: int
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/azext_devops/dev/repos/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def load_code_arguments(self, _):
with self.argument_context('repos policy') as context:
context.argument('policy_configuration', options_list=('--policy-configuration', '--config'),
help='Local file path for configuration file. ' +
'Please use backslash(\) when typing in directory path. ')
'Please use \\backslash when typing in directory path.')
context.argument('policy_id', options_list=('--policy-id', '--id'),
help='ID of the policy.')
context.argument('repository_id', help='Id of the repository on which to apply the policy')
Expand Down
2 changes: 1 addition & 1 deletion doc/security_tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ If the tokens have variable-length path parts, then a separator character is use

Token format for project level permissions : 'repoV2/PROJECT_ID/REPO_ID'

For more information on this namespace and its tokens refer this [blog](https://devblogs.microsoft.com/devops/git-repo-tokens-for-the-security-service/)
For more information on this namespace and its tokens refer this [blog](https://devblogs.microsoft.com/devops/git-repo-tokens-for-the-security-service/)
2 changes: 1 addition & 1 deletion doc/troubleshooting_common_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Team level iterations| `VS1530019: Cannot find iteration with id 'b1e33737-e943-xxxx-xxxx-e3f1cbaxxxx'. The iteration might have been deleted, or it might not be selected for your team.` | Cannot find iteration: When you try to add a backlog iteration to a team. | You can only add child iterations of backlog iteration to your team. Create child iterations of your backlog iteration using command `az boards iteration project create --name "child_iteration_name" --path <BacklogIterationPath>`. Get the identifier of this iteration and add it to your team using `az boards iteration team add -h` command.|
| Team level Areas | `DefaultValue` | If you are trying to add your first area to a team without passing the flag --set-as-default. |Pass `--set-as-default` when adding an area to a team or use `az boards area team update` command to change the default area for the team. Refer help for `az boards area team add -h`|
| Team level Areas | `TF400499: You have not set your team field.`| Adding/removing/updating area to team | Be cautious while working with team areas, --path parameter for team area must be `\ProjectName\RootAreaName\ChildArea1` and not `\ProjectName\Area\RootAreaName\ChildArea1`. Team area commands don't expect 'Area' keyword to be passed in the --path parameter. |
| Team level Areas | `TF400499: You have not set your team field.`| Adding/removing/updating area to team | Be cautious while working with team areas, --path parameter for team area must be `\ProjectName\RootAreaName\ChildArea1` and not `\ProjectName\Area\RootAreaName\ChildArea1`. Team area commands don't expect 'Area' keyword to be passed in the --path parameter. |
6 changes: 4 additions & 2 deletions tests/test_pipelinesBuildCancelTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ def test_build_cancel(self):
#QueueBuild to get a build ID
queue_build_command = 'az pipelines build queue --definition-name "' + build_definition_name + '" --detect false --output json'
queue_build_output = self.cmd(queue_build_command).get_output_in_json()
print(queue_build_output)
queued_build_id = queue_build_output["id"]

#Cancel the running build
cancel_running_build_command = 'az pipelines build cancel --id ' + str(queued_build_id) + ' --detect false --output json'
cancel_running_build_command = 'az pipelines build cancel --build-id ' + str(queued_build_id) + ' --detect false --output json'
cancel_running_build_output = self.cmd(cancel_running_build_command).get_output_in_json()
assert cancel_running_build_output["status"] == "cancelling"
assert cancel_running_build_output["status"] == "cancelling"