Skip to content

Commit 013598a

Browse files
committed
remove the explicit 'required=False' (use default) from --config under update and --run-status under list parameters
1 parent 36752dd commit 013598a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/acrcssc/azext_acrcssc/_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ def load_arguments(self: AzCommandsLoader, _):
2626
c.argument("dryrun", options_list=["--dry-run"], help="Use this flag to see the qualifying repositories and tags that would be affected by the workflow. Default value: false. 'config' parameter is mandatory to provide with dry-run", arg_type=get_three_state_flag())
2727

2828
with self.argument_context("acr supply-chain workflow update") as c:
29-
c.argument("config", help="Configuration file path containing the json schema for the list of repositories and tags to filter within the registry. Schema example:{\"repositories\":[{\"repository\":\"alpine\",\"tags\":[\"tag1\",\"tag2\"],\"enabled\":true},{\"repository\":\"python\",\"tags\":[\"*\"],\"enabled\":false}], \"version\": \"v1\", \"tag-convention\": \"floating\"}. \"tag-convention\" is an optional property, values can be \"incremental\" (the default behavior, will increase the patch version of the tag, for example \"{repository}:{original-tag}-1\", \"{repository}:{original-tag}-2\", etc), or \"floating\" (will reuse the tag \"{repository}:{original-tag}-patched\" for patching)", required=False)
29+
c.argument("config", help="Configuration file path containing the json schema for the list of repositories and tags to filter within the registry. Schema example:{\"repositories\":[{\"repository\":\"alpine\",\"tags\":[\"tag1\",\"tag2\"],\"enabled\":true},{\"repository\":\"python\",\"tags\":[\"*\"],\"enabled\":false}], \"version\": \"v1\", \"tag-convention\": \"floating\"}. \"tag-convention\" is an optional property, values can be \"incremental\" (the default behavior, will increase the patch version of the tag, for example \"{repository}:{original-tag}-1\", \"{repository}:{original-tag}-2\", etc), or \"floating\" (will reuse the tag \"{repository}:{original-tag}-patched\" for patching)")
3030
c.argument("schedule", help=f"schedule to run the scan and patching task. E.g. `<n>d` where n is the number of days between each run. Max value is {CONTINUOUSPATCH_SCHEDULE_MAX_DAYS}d.")
3131
c.argument("run_immediately", help="Set this flag to trigger the immediate run of the selected workflow task. Default value: false.", arg_type=get_three_state_flag())
3232
c.argument("dryrun", options_list=["--dry-run"], help="Use this flag to see the qualifying repositories and tags that would be affected by the workflow. Default value: false. 'config' parameter is mandatory to provide with dry-run", arg_type=get_three_state_flag())
3333

3434
with self.argument_context("acr supply-chain workflow list") as c:
35-
c.argument("status", arg_type=get_enum_type(WorkflowTaskState), options_list=["--run-status"], help="Status to filter the supply-chain workflow image status.", required=False)
35+
c.argument("status", arg_type=get_enum_type(WorkflowTaskState), options_list=["--run-status"], help="Status to filter the supply-chain workflow image status.")
3636

3737
with self.argument_context("acr supply-chain workflow delete") as c:
3838
c.argument("yes", options_list=["--yes", "-y"], help="Proceed with the deletion without user confirmation")

src/acrcssc/azext_acrcssc/cssc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def update_acrcssc(cmd,
8383
resource_group_name,
8484
registry_name,
8585
workflow_type,
86-
config,
87-
schedule,
86+
config=None,
87+
schedule=None,
8888
dryrun=False,
8989
run_immediately=False):
9090
'''Update a continuous patch task in the registry.'''
@@ -141,7 +141,7 @@ def cancel_runs(cmd,
141141
cancel_continuous_patch_runs(cmd, resource_group_name, registry_name)
142142

143143

144-
def list_scan_status(cmd, registry_name, resource_group_name, status, workflow_type):
144+
def list_scan_status(cmd, registry_name, resource_group_name, workflow_type, status=None):
145145
'''track in continuous patch in the registry.'''
146146
logger.debug('Entering track_scan_status with parameters:%s %s %s', resource_group_name, registry_name, workflow_type)
147147

src/acrcssc/azext_acrcssc/helper/_taskoperations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def _cancel_task_runs(acr_task_run_client, registry_name, resource_group_name, r
310310
logger.error(f"Failed to cancel task {task.name} from registry {registry_name}: {exception}")
311311

312312

313-
def track_scan_progress(cmd, resource_group_name, registry, status):
313+
def track_scan_progress(cmd, resource_group_name, registry, status=None):
314314
logger.debug("Entering track_scan_progress")
315315

316316
cssc_tasks_exists, _ = check_continuous_task_exists(cmd, registry)

0 commit comments

Comments
 (0)