profile
viewpoint

microsoft/service-fabric-cli 46

Service Fabric CLI Tools

jeffj6123/azure-cli 0

Command-line tools for Azure.

jeffj6123/azure-cli-extensions 0

Public Repository for Extensions of Azure CLI.

jeffj6123/azure-docs 0

Open source documentation of Microsoft Azure

jeffj6123/azure-rest-api-specs 0

The source for REST API specifications for Microsoft Azure.

jeffj6123/ffdecks-draft-sim 0

ffdecks draft sim

PR opened microsoft/service-fabric-cli

Adding move-primary, move-secondary and move-instance commands

Fixes # .

Changes include:

  • Adding command move-primary for moving primary replica (present in SF v6.5)
  • Adding command move-secondary for moving secondary replica (present in SF v6.5)
  • Adding command move-instance for moving stateless instance (present in SF v8.0)

Verified:

  • [ ] Build and test CI passes
  • [ ] History and readme updated to reflect changes
  • [ ] Package version updated according to semantic versioning rules
  • [ ] Tests modified or added, when applicable
  • [ ] Updated code owners file, when applicable
  • [ ] Read the PR checklist
+34 -3

0 comment

4 changed files

pr created time in 2 days

pull request commentmicrosoft/service-fabric-explorer

Fixes for PR https://github.com/microsoft/service-fabric-explorer/pull/434

What is wrong with the previous pull request?

Hi Jeffrey, In the previous PR, the issue was that when customer changes from file share to azure blob storage and checkboxes are false, it would not save the backup policy even if it is using azure blob since it would still consider the username and password as required field. So when I am changing the storage type to azure, I need to make and not required fields.

ayushi1411

comment created time in 5 days

PR opened microsoft/service-fabric-explorer

User/aygoyal/brs

Fixes related to PR https://github.com/microsoft/service-fabric-explorer/pull/434 https://github.com/microsoft/service-fabric-explorer/issues/439

+76 -9

0 comment

3 changed files

pr created time in 6 days

pull request commentmicrosoft/service-fabric-explorer

Implemented #438

The failed test doesn't appear to have anything to do with my modification as I didn't change anything having to do with the larger application.

WhitWaldo

comment created time in 6 days

PR opened microsoft/service-fabric-explorer

Implemented #438

Implemented #438 allowing whitespace around the confirmation value so as to make copy/pasting more convenient

+1 -1

0 comment

1 changed file

pr created time in 6 days

issue commentmicrosoft/service-fabric-explorer

Edit Backup Policy dialog box takes in invalid default chars (****)

Checkboxes have been added for primary and secondary credentials in file share storage for backup policy while creating and updating the backup policy for the user to specify if the credentials are empty. Otherwise providing the credentials will be required on creating or updating backup policy

ayushi1411

comment created time in 9 days

issue openedmicrosoft/service-fabric-explorer

Edit Backup Policy dialog box takes in invalid default chars (****)

While updating backup policy, password fields take **** as the default value.

created time in 9 days

pull request commentmicrosoft/service-fabric-explorer

added checkboxes for empty credentials for file share backup policy

As reference can you attach screenshot of the dialog box?

image image

ayushi1411

comment created time in 9 days

issue openedmicrosoft/service-fabric-explorer

Allow whitespace before or after unprovision verification input text

Is your feature request related to a problem? Please describe. In either version, there is often a need to manually remove services, applications and types. Doing this prompts a box that has me provide the full ID of whatever I'm looking to remove. In SFX v1, I can usually just copy/paste the value from the text provided above the box and paste this in. If there was any whitespace before or after the value, it passed validation anyway, which simply eased the pain of a necessary validation step.

In SFX v2, if there is any whitespace present, validation fails and I have to step through the input, find the whitespace and remove it before proceeding. I understand and support the reason for this confirmation, but my applications are often GUIDs (as they are multi-tenanted) and I'm absolutely not typing in these values to delete them. As I'm just copy/pasting, and Chrome often "helpfully" grabs the surrounding whitespace, it would be a nice quality of life improvement for the validation to support whitespace on either end of the pasted value as in v1.

Describe the solution you'd like Allow whitespace on either side of the value being validated in the prompt validating removal of a service, application or type.

Additional context As mentioned, v1 allows this whitespace and v2 presently doesn't. Ideally, I'd just appreciate it going back to the mildly less strict approach taken in v1.

Thank you for your consideration!

created time in 9 days

push eventmicrosoft/service-fabric-cli

Max Burlik

commit sha 7a1efe9ac051449cd519a427701003e8376b928b

application upload - perf improvement using joblib (#223) * Updated 'application upload' native imagestore application upload to parallelize uploads, greatly reducing overall upload time for applications with many smaller files. Also improved progress log shown by flag '--show-progress'. * remove jsonpickle requirement based on PR review

view details

push time in 11 days

PR merged microsoft/service-fabric-cli

Reviewers
application upload - perf improvement using joblib

Fixes Bug 8657234: sfctl application upload has perf issue since it uploads files one at a time. 7.2 release validation timed out and required timeout increase for small app

Changes include:

  • Updated 'application upload' native imagestore application upload to parallelize uploads, greatly reducing overall upload time for applications with many smaller files.
  • Improved progress log shown by flag '--show-progress' to have progress slider, using tqdm module.

Verified:

  • [x] Build and test CI passes
  • [x] History and readme updated to reflect changes
  • [ ] N/A Package version updated according to semantic versioning rules
  • [x] Tests modified or added, when applicable
  • [ ] N/A Updated code owners file, when applicable
  • [x] Read the PR checklist

During 7.2 release validation the app uploads timed out at 5 min for some small apps, which led me to look at the implementation of application upload. Since it takes time to start file transfers for each file it's commonly beneficial to do this across multiple threads/processes.

After the change to use machine no. threads for degree of parallelism, the app that was timing out uploading at 5 min was able to be uploaded in 10 sec.

From src/test/current/scripts/linuxonebox/installgithubsamples.sh:

Uploading path: CounterServiceWebServicePkg/Code/runtimes/debian-x64: 0it [00:00, ?it/s] [114/342] files, CounterServiceWebServicePkg/Code/runtimes/debian-x64/.dir Time left: 1193 seconds Uploading path: CounterServiceWebServicePkg/Code/runtimes/debian-x64/native: 100%|█| 1/1 [00:00<00:00, 7.1 [116/342] files, CounterServiceWebServicePkg/Code/runtimes/debian-x64/native/.dir Time left: 1193 seconds Uploading path: CounterServiceWebServicePkg/Code/refs: 100%|█████████████| 158/158 [00:03<00:00, 45.96it/s] [275/342] files, CounterServiceWebServicePkg/Code/refs/.dir Time left: 1189 seconds Uploading path: CounterServiceWebServicePkg/Data: 100%|██████████████████████| 1/1 [00:00<00:00, 9.33it/s] [277/342] files, CounterServiceWebServicePkg/Data/.dir Time left: 1189 seconds Uploading path: CounterServiceWebServicePkg/Config: 100%|████████████████████| 2/2 [00:00<00:00, 17.54it/s] [280/342] files, CounterServiceWebServicePkg/Config/.dir Time left: 1189 seconds Uploading path: CounterServicePkg: 100%|█████████████████████████████████████| 3/3 [00:00<00:00, 26.66it/s] [284/342] files, CounterServicePkg/.dir Time left: 1189 seconds Uploading path: CounterServicePkg/Code: 100%|████████████████████████████████| 9/9 [00:00<00:00, 43.03it/s] [294/342] files, CounterServicePkg/Code/.dir Time left: 1189 seconds Uploading path: CounterServicePkg/Code/runtimes: 0it [00:00, ?it/s] [295/342] files, CounterServicePkg/Code/runtimes/.dir Time left: 1188 seconds Uploading path: CounterServicePkg/Code/runtimes/linux: 0it [00:00, ?it/s] [296/342] files, CounterServicePkg/Code/runtimes/linux/.dir Time left: 1188 seconds Uploading path: CounterServicePkg/Code/runtimes/linux/lib: 0it [00:00, ?it/s] [297/342] files, CounterServicePkg/Code/runtimes/linux/lib/.dir Time left: 1188 seconds Uploading path: CounterServicePkg/Code/runtimes/linux/lib/netstandard2.0: 100%|█| 21/21 [00:01<00:00, 17.30 [319/342] files, CounterServicePkg/Code/runtimes/linux/lib/netstandard2.0/.dir Time left: 1187 seconds Uploading path: CounterServicePkg/Code/runtimes/win: 0it [00:00, ?it/s] [320/342] files, CounterServicePkg/Code/runtimes/win/.dir Time left: 1187 seconds Uploading path: CounterServicePkg/Code/runtimes/win/lib: 0it [00:00, ?it/s] [321/342] files, CounterServicePkg/Code/runtimes/win/lib/.dir Time left: 1187 seconds Uploading path: CounterServicePkg/Code/runtimes/win/lib/netstandard2.0: 100%|█| 15/15 [00:00<00:00, 35.07it [337/342] files, CounterServicePkg/Code/runtimes/win/lib/netstandard2.0/.dir Time left: 1186 seconds Uploading path: CounterServicePkg/Data: 100%|████████████████████████████████| 1/1 [00:00<00:00, 5.69it/s] [339/342] files, CounterServicePkg/Data/.dir Time left: 1186 seconds Uploading path: CounterServicePkg/Config: 100%|██████████████████████████████| 2/2 [00:00<00:00, 18.08it/s] [342/342] files, CounterServicePkg/Config/.dir Time left: 1186 seconds Complete

+117 -33

8 comments

4 changed files

maburlik

pr closed time in 11 days

pull request commentmicrosoft/service-fabric-cli

application upload - perf improvement using joblib

<samp> Azure Pipelines successfully started running 1 pipeline(s).<br>

</samp>

maburlik

comment created time in 11 days

pull request commentmicrosoft/service-fabric-cli

application upload - perf improvement using joblib

<samp> Pull request contains merge conflicts.<br>

</samp>

maburlik

comment created time in 11 days

pull request commentmicrosoft/service-fabric-cli

application upload - perf improvement using joblib

/azp run

maburlik

comment created time in 11 days

pull request commentmicrosoft/service-fabric-explorer

added checkboxes for empty credentials for file share backup policy

As reference can you attach screenshot of the dialog box?

ayushi1411

comment created time in 12 days

pull request commentmicrosoft/service-fabric-explorer

added checkboxes for empty credentials for file share backup policy

When would a user know if the checkbox should be checked?

If the checkbox is not checked then the username and password fields are required fields. So if the user doesn't want to provide the username and password then they need to check the checkbox.

ayushi1411

comment created time in 12 days

Pull request review commentmicrosoft/service-fabric-explorer

added checkboxes for empty credentials for file share backup policy

             <dd>                 <input type="text" class="input-flat" formControlName="Path" name="Path">             </dd>+            <dt>IsPrimaryCredsEmpty</dt>

Thanks. I have made the necessary changes

ayushi1411

comment created time in 12 days

Pull request review commentmicrosoft/service-fabric-explorer

added checkboxes for empty credentials for file share backup policy

 export class StorageFormComponent implements OnInit {        storage.get('Path').setValidators([Validators.required]);     }-+    this.updateStorageKindValidatorsPrimaryCredentials(storage, false);+    this.updateStorageKindValidatorsSecondaryCredentials(storage, false);     storage.get('ContainerName').updateValueAndValidity();     storage.get('ConnectionString').updateValueAndValidity();     storage.get('Path').updateValueAndValidity();   }+  updateStorageKindValidatorsPrimaryCredentials(storage: AbstractControl, IsEmptyPrimaryCredential: boolean){+    if(IsEmptyPrimaryCredential === true)

Thanks. I have made the necessary changes

ayushi1411

comment created time in 12 days

Pull request review commentmicrosoft/service-fabric-explorer

added checkboxes for empty credentials for file share backup policy

 export class StorageFormComponent implements OnInit {        storage.get('Path').setValidators([Validators.required]);     }-+    this.updateStorageKindValidatorsPrimaryCredentials(storage, false);+    this.updateStorageKindValidatorsSecondaryCredentials(storage, false);     storage.get('ContainerName').updateValueAndValidity();     storage.get('ConnectionString').updateValueAndValidity();     storage.get('Path').updateValueAndValidity();   }+  updateStorageKindValidatorsPrimaryCredentials(storage: AbstractControl, IsEmptyPrimaryCredential: boolean){+    if(IsEmptyPrimaryCredential === true)+    {+      storage.get('PrimaryUserName').setValidators(null);+      storage.get('PrimaryPassword').setValidators(null);+      storage.get('PrimaryUserName').setValue('');+      storage.get('PrimaryPassword').setValue('');+    }+    else+    {+      storage.get('PrimaryUserName').setValidators([Validators.required]);+      storage.get('PrimaryPassword').setValidators([Validators.required]);+    }+    storage.get('PrimaryUserName').updateValueAndValidity();+    storage.get('PrimaryPassword').updateValueAndValidity();+  } +  updateStorageKindValidatorsSecondaryCredentials(storage: AbstractControl, IsEmptySecondaryCredential: boolean){+    if(IsEmptySecondaryCredential === true)

Thanks. I have made the necessary changes

ayushi1411

comment created time in 12 days

Pull request review commentmicrosoft/service-fabric-explorer

added checkboxes for empty credentials for file share backup policy

             <dd>                 <input type="text" class="input-flat" formControlName="Path" name="Path">             </dd>+            <dt>IsPrimaryCredsEmpty</dt>+            <dd class="checkbox-container-default">+                <input type="checkbox" formControlName="IsEmptyPrimaryCredential"/>+            </dd>             <dt>PrimaryUserName</dt>             <dd>-                <input type="text" class="input-flat" formControlName="PrimaryUserName" name="PrimaryUserName">+                <input type="text" class="input-flat" formControlName="PrimaryUserName" name="PrimaryUserName" [attr.disabled]="localForm.value.IsEmptyPrimaryCredential?true:null">

Thanks. I have made the necessary changes

ayushi1411

comment created time in 12 days

pull request commentmicrosoft/service-fabric-cli

adding get-loaded-partition-info-list command

@jeffj6123 , is API version fine?

mrdakj

comment created time in 16 days

pull request commentmicrosoft/service-fabric-cli

adding get-loaded-partition-info-list command

@mrdakj looking at the swagger spec released for 7.2, I dont see this API in there. I see it added for the next version 7.3/8.0.

Yes. API is meant for 8.0 version.

mrdakj

comment created time in 19 days

Pull request review commentmicrosoft/service-fabric-cli

application upload - perf improvement using joblib

 def get_lesser(num_a, num_b):      return max(0, min(num_a, num_b)) +def upload_single_file_native_imagestore(sesh, endpoint, basename, #pylint: disable=too-many-locals,too-many-arguments+                                         rel_path, single_file, root, target_timeout):+    """+    Used by upload_to_native_imagestore to upload individual files+    of the application package to cluster++    :param sesh: A requests (module) session object.+    """+    try:+        from urllib.parse import urlparse, urlencode, urlunparse+    except ImportError:+        from urllib import urlencode+        from urlparse import urlparse, urlunparse  # pylint: disable=import-error++    current_time_left = get_timeout_left(target_timeout)   # an int representing seconds++    if current_time_left == 0:+        raise SFCTLInternalException('Upload has timed out. Consider passing a longer '+                                        'timeout duration.')++    url_path = (+        os.path.normpath(os.path.join('ImageStore', basename,+                                        rel_path, single_file))+    ).replace('\\', '/')+    fp_norm = os.path.normpath(os.path.join(root, single_file))+    with open(fp_norm, 'rb') as file_opened:+        url_parsed = list(urlparse(endpoint))+        url_parsed[2] = url_path+        url_parsed[4] = urlencode(+            {'api-version': '6.1',+                'timeout': current_time_left})+        url = urlunparse(url_parsed)++        # timeout is (connect_timeout, read_timeout)+        res = sesh.put(url, data=file_opened,+                        timeout=(get_lesser(60, current_time_left), current_time_left))++        res.raise_for_status()+ def upload_to_native_imagestore(sesh, endpoint, abspath, basename, #pylint: disable=too-many-locals,too-many-arguments

Will do. You mean just for the parameters?

maburlik

comment created time in 19 days

Pull request review commentmicrosoft/service-fabric-cli

application upload - perf improvement using joblib

 def get_lesser(num_a, num_b):      return max(0, min(num_a, num_b)) +def upload_single_file_native_imagestore(sesh, endpoint, basename, #pylint: disable=too-many-locals,too-many-arguments+                                         rel_path, single_file, root, target_timeout):+    """+    Used by upload_to_native_imagestore to upload individual files+    of the application package to cluster++    :param sesh: A requests (module) session object.+    """+    try:+        from urllib.parse import urlparse, urlencode, urlunparse+    except ImportError:+        from urllib import urlencode+        from urlparse import urlparse, urlunparse  # pylint: disable=import-error++    current_time_left = get_timeout_left(target_timeout)   # an int representing seconds++    if current_time_left == 0:+        raise SFCTLInternalException('Upload has timed out. Consider passing a longer '+                                        'timeout duration.')++    url_path = (+        os.path.normpath(os.path.join('ImageStore', basename,+                                        rel_path, single_file))+    ).replace('\\', '/')+    fp_norm = os.path.normpath(os.path.join(root, single_file))+    with open(fp_norm, 'rb') as file_opened:+        url_parsed = list(urlparse(endpoint))+        url_parsed[2] = url_path+        url_parsed[4] = urlencode(+            {'api-version': '6.1',+                'timeout': current_time_left})+        url = urlunparse(url_parsed)++        # timeout is (connect_timeout, read_timeout)+        res = sesh.put(url, data=file_opened,+                        timeout=(get_lesser(60, current_time_left), current_time_left))++        res.raise_for_status()+ def upload_to_native_imagestore(sesh, endpoint, abspath, basename, #pylint: disable=too-many-locals,too-many-arguments

Is there a practical scenario a customer would want this? For each file transfer there is an initial round trip time & file transfer turnaround period of exponential rate ramp up (to throughput cap), which results in slow transfer today when an app has even a relatively small number of files (<100).

maburlik

comment created time in 19 days

Pull request review commentmicrosoft/service-fabric-cli

application upload - perf improvement using joblib

 def path_from_imagestore_string(imagestore_connstr):         return conn_str_list[1]     return False +def get_job_count():+    """+    Test-mockable wrapper for returning cpu count.+    """+    jobcount = cpu_count()

ok

maburlik

comment created time in 19 days

Pull request review commentmicrosoft/service-fabric-cli

application upload - perf improvement using joblib

 from __future__ import print_function  import os-from multiprocessing import Process+from multiprocessing import Process, cpu_count from time import time import sys import zipfile import shutil import xml.etree.ElementTree as ET+import contextlib from knack.util import CLIError+import joblib+from joblib import Parallel, delayed

Need import joblib due to the tqdm callback logic, and the 'from' line was to make the Parallel, delayed calls more concise. I would need to either add extra things to the from or lengthen the explicit calls for componenents under joblib. What do you prefer?

maburlik

comment created time in 19 days

startedtailwindlabs/heroicons

started time in 20 days

PR opened microsoft/service-fabric-explorer

added checkboxes for empty credentials for file share backup policy

https://msazure.visualstudio.com/One/_workitems/edit/7507750

The changes are for adding checkboxes to indicate that the credentials for file share storage is empty while creating or updating backup policy. It is set to false by default. Hence if the primary or secondary credentials are not required the checkbox needs to be checked and username & password fields will be disabled.

+66 -7

0 comment

3 changed files

pr created time in 20 days

fork sebelga/example-node-ops

Example node project with nginx, haproxy, and pool-hall

fork in 22 days

more