Skip to content

Commit

Permalink
Pause telemetry. Ready for release 7.0.2 (#172)
Browse files Browse the repository at this point in the history
Tests passed. Coveralls showing small decrease in coverage.
  • Loading branch information
Christina-Kang authored Dec 19, 2018
1 parent 042c2f9 commit 985d795
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 25 deletions.
4 changes: 4 additions & 0 deletions src/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ To get started, after installation run the following:
Change Log
==========

7.0.2
----------
- Pause telemetry collection. Update code for 7.0.2 release (#172)

7.0.1
----------
- Fix bug where an empty directory is generated in the current location. Update code for 7.0.1 release (#167)
Expand Down
2 changes: 1 addition & 1 deletion src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def read(fname):

setup(
name='sfctl',
version='7.0.1',
version='7.0.2',
description='Azure Service Fabric command line',
long_description=read('README.rst'),
url='https://github.com/Azure/service-fabric-cli',
Expand Down
2 changes: 1 addition & 1 deletion src/sfctl/custom_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def sfctl_cluster_version_matches(cluster_version, sfctl_version):
:return: True if they are a match. False otherwise.
"""

if sfctl_version in ['7.0.0', '7.0.1']:
if sfctl_version in ['7.0.0', '7.0.1', '7.0.2']:

return cluster_version.startswith('6.4')

Expand Down
22 changes: 1 addition & 21 deletions src/sfctl/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from sfctl.config import SF_CLI_CONFIG_DIR, SF_CLI_ENV_VAR_PREFIX, SF_CLI_NAME
from sfctl.commands import SFCommandLoader, SFCommandHelp
from sfctl.custom_cluster import check_cluster_version
from sfctl.telemetry import check_and_send_telemetry
from sfctl.util import is_help_command


Expand Down Expand Up @@ -46,26 +45,7 @@ def launch():

is_help_cmd = is_help_command(args_list)

try:
invocation_return_value = cli_env.invoke(args_list)

# Do not record help commands in telemetry
if not is_help_cmd:
check_and_send_telemetry(args_list, invocation_return_value, cli_env.result.error)

# Cannot use except BaseException until python 2.7 support is dropped
except: # pylint: disable=bare-except

# Do not record help commands in telemetry
if not is_help_cmd:
ex = sys.exc_info()[0]

# We don't get a very useful message from SystemExit, which are the errors which are
# returned locally to the user, for example, if the command doesn't exist in sfctl.
check_and_send_telemetry(args_list, -1, str(ex))

# Log the exception and pass it back to the user
raise
invocation_return_value = cli_env.invoke(args_list)

# We don't invoke cluster version checking when the user gets an exception, since it means that
# there is something wrong with their command input, such as missing a required parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/sfctl/helps/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
short-summary: Turn off telemetry.
- name: --on
type: bool
short-summary: Turn on telemetry. This is the default value.
short-summary: Turn on telemetry.
examples:
Expand Down
2 changes: 1 addition & 1 deletion src/sfctl/tests/version_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_valid_current_version(self):
note: this will require changing the sfctl_version on releases
"""
sfctl_version = '7.0.1'
sfctl_version = '7.0.2'

pipe = Popen('sfctl --version', shell=True, stdout=PIPE, stderr=PIPE)
# returned_string and err are returned as bytes
Expand Down

0 comments on commit 985d795

Please sign in to comment.