Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package azure-cli-telemetry for 
openSUSE:Factory checked in at 2023-08-14 22:35:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azure-cli-telemetry (Old)
 and      /work/SRC/openSUSE:Factory/.azure-cli-telemetry.new.11712 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "azure-cli-telemetry"

Mon Aug 14 22:35:59 2023 rev:9 rq:1103884 version:1.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/azure-cli-telemetry/azure-cli-telemetry.changes  
2022-09-20 19:23:33.062468427 +0200
+++ 
/work/SRC/openSUSE:Factory/.azure-cli-telemetry.new.11712/azure-cli-telemetry.changes
       2023-08-14 22:36:14.612600711 +0200
@@ -1,0 +2,8 @@
+Mon Aug 14 13:13:14 UTC 2023 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- New upstream release
+  + Version 1.1.0
+  + For detailed information about changes see the
+    HISTORY.rst file provided with this package
+
+-------------------------------------------------------------------

Old:
----
  azure-cli-telemetry-1.0.8.tar.gz

New:
----
  azure-cli-telemetry-1.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ azure-cli-telemetry.spec ++++++
--- /var/tmp/diff_new_pack.OIKJfc/_old  2023-08-14 22:36:15.580606866 +0200
+++ /var/tmp/diff_new_pack.OIKJfc/_new  2023-08-14 22:36:15.588606917 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package azure-cli-telemetry
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           azure-cli-telemetry
-Version:        1.0.8
+Version:        1.1.0
 Release:        0
 Summary:        Microsoft Azure CLI Telemetry Package
 License:        MIT

++++++ azure-cli-telemetry-1.0.8.tar.gz -> azure-cli-telemetry-1.1.0.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-telemetry-1.0.8/HISTORY.rst 
new/azure-cli-telemetry-1.1.0/HISTORY.rst
--- old/azure-cli-telemetry-1.0.8/HISTORY.rst   2022-09-02 07:40:04.000000000 
+0200
+++ new/azure-cli-telemetry-1.1.0/HISTORY.rst   2023-07-27 09:10:05.000000000 
+0200
@@ -2,6 +2,10 @@
 
 Release History
 ===============
+1.1.0
++++++
+* Drop telemetry cache strategy. Records will be uploaded immediately
+
 1.0.8
 +++++
 * Keep storing telemetry to CLI AppInsights in local cache but send telemetry 
to other AppInsights immediately
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-telemetry-1.0.8/PKG-INFO 
new/azure-cli-telemetry-1.1.0/PKG-INFO
--- old/azure-cli-telemetry-1.0.8/PKG-INFO      2022-09-02 07:40:14.638116800 
+0200
+++ new/azure-cli-telemetry-1.1.0/PKG-INFO      2023-07-27 09:10:37.015299300 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: azure-cli-telemetry
-Version: 1.0.8
+Version: 1.1.0
 Summary: Microsoft Azure CLI Telemetry Package
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
@@ -11,7 +11,6 @@
 Classifier: Intended Audience :: System Administrators
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
@@ -33,6 +32,10 @@
 
 Release History
 ===============
+1.1.0
++++++
+* Drop telemetry cache strategy. Records will be uploaded immediately
+
 1.0.8
 +++++
 * Keep storing telemetry to CLI AppInsights in local cache but send telemetry 
to other AppInsights immediately
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-telemetry-1.0.8/azure/cli/telemetry/__init__.py 
new/azure-cli-telemetry-1.1.0/azure/cli/telemetry/__init__.py
--- old/azure-cli-telemetry-1.0.8/azure/cli/telemetry/__init__.py       
2022-09-02 07:40:04.000000000 +0200
+++ new/azure-cli-telemetry-1.1.0/azure/cli/telemetry/__init__.py       
2023-07-27 09:10:05.000000000 +0200
@@ -10,7 +10,7 @@
 
 from azure.cli.telemetry.util import save_payload
 
-__version__ = "1.0.8"
+__version__ = "1.1.0"
 
 DEFAULT_INSTRUMENTATION_KEY = 'c4395b75-49cc-422c-bc95-c7d51aef5d46'
 
@@ -47,15 +47,14 @@
 
 
 def save(config_dir, payload):
-    from azure.cli.telemetry.util import should_upload
     from azure.cli.telemetry.components.telemetry_client import 
CliTelemetryClient
     from azure.cli.telemetry.components.telemetry_logging import get_logger
 
     logger = get_logger('main')
     try:
         # Split payload to cli events and extra events by instrumentation key
-        # cli events should be stored in local cache and sent together
         # extra events can be sent immediately
+        # cli events will be handled in separate process
         import json
         events = json.loads(payload)
 
@@ -75,14 +74,13 @@
         logger.info("Split cli events and extra events failure: %s", str(ex))
         cli_payload = payload
 
-    if save_payload(config_dir, cli_payload) and should_upload(config_dir):
+    if save_payload(config_dir, cli_payload):
         logger.info('Begin creating telemetry upload process.')
         _start(config_dir)
         logger.info('Finish creating telemetry upload process.')
 
 
 def main():
-    from azure.cli.telemetry.util import should_upload
     from azure.cli.telemetry.components.telemetry_note import TelemetryNote
     from azure.cli.telemetry.components.records_collection import 
RecordsCollection
     from azure.cli.telemetry.components.telemetry_client import 
CliTelemetryClient
@@ -95,10 +93,6 @@
         logger = get_logger('main')
         logger.info('Attempt start. Configuration directory [%s].', 
sys.argv[1])
 
-        if not should_upload(config_dir):
-            logger.info('Exit early. The note file indicates it is not a 
suitable time to upload telemetry.')
-            sys.exit(0)
-
         try:
             with TelemetryNote(config_dir) as telemetry_note:
                 telemetry_note.touch()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-telemetry-1.0.8/azure/cli/telemetry/components/records_collection.py
 
new/azure-cli-telemetry-1.1.0/azure/cli/telemetry/components/records_collection.py
--- 
old/azure-cli-telemetry-1.0.8/azure/cli/telemetry/components/records_collection.py
  2022-09-02 07:40:04.000000000 +0200
+++ 
new/azure-cli-telemetry-1.1.0/azure/cli/telemetry/components/records_collection.py
  2023-07-27 09:10:05.000000000 +0200
@@ -8,7 +8,6 @@
 import shutil
 import stat
 import tempfile
-from knack.config import CLIConfig
 
 
 class RecordsCollection:
@@ -36,11 +35,8 @@
         if not os.path.isdir(folder):
             return
 
-        # Collect all cache.x files. If it has been a long time since last 
sent, also collect cache file itself.
-        push_interval = 
datetime.timedelta(hours=self._get_push_interval_config())
-        include_cache = datetime.datetime.now() - self._last_sent > 
push_interval
-        candidates = [(fn, os.stat(os.path.join(folder, fn))) for fn in 
os.listdir(folder)
-                      if include_cache or fn != 'cache']
+        # Collect all cache/cache.x files
+        candidates = [(fn, os.stat(os.path.join(folder, fn))) for fn in 
os.listdir(folder)]
 
         # sort the cache files base on their last modification time.
         candidates = [(fn, file_stat) for fn, file_stat in candidates if 
stat.S_ISREG(file_stat.st_mode)]
@@ -72,12 +68,6 @@
                       onerror=lambda _, p, tr: self._logger.error('Fail to 
remove file %s', p))
         self._logger.info('Remove directory %s', tmp)
 
-    def _get_push_interval_config(self):
-        config = CLIConfig(config_dir=self._config_dir)
-        threshold = config.getint('telemetry', 'push_interval_in_hours', 
fallback=24)
-        # the threshold for push telemetry can't be less than 1 hour, default 
value is 24 hours
-        return threshold if threshold >= 1 else 24
-
     def _read_file(self, path):
         """ Read content of a telemetry cache file and parse them into 
records. """
         try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-telemetry-1.0.8/azure/cli/telemetry/util.py 
new/azure-cli-telemetry-1.1.0/azure/cli/telemetry/util.py
--- old/azure-cli-telemetry-1.0.8/azure/cli/telemetry/util.py   2022-09-02 
07:40:04.000000000 +0200
+++ new/azure-cli-telemetry-1.1.0/azure/cli/telemetry/util.py   2023-07-27 
09:10:05.000000000 +0200
@@ -4,41 +4,8 @@
 # 
--------------------------------------------------------------------------------------------
 
 import os
-import stat
 import logging
 import logging.handlers
-from datetime import datetime
-
-from azure.cli.telemetry.const import TELEMETRY_NOTE_NAME, 
MANDATORY_WAIT_PERIOD
-
-
-def should_upload(config_dir):
-    """Returns True if it is the right moment to add telemetry.
-    Before the client request a telemetry add process, it can invoke this 
method to test if it is the right moment.
-    The conditions are:
-        1. The telemetry.txt file doesn't exist; OR
-        2. The telemetry.txt file is a regular file AND there have been enough 
time passed since last add.
-    """
-    logger = logging.getLogger('telemetry.check')
-
-    telemetry_note_path = os.path.join(config_dir, TELEMETRY_NOTE_NAME)
-    if not os.path.exists(telemetry_note_path):
-        logger.info('Positive: The %s does not exist.', telemetry_note_path)
-        return True
-
-    file_stat = os.stat(telemetry_note_path)
-    if not stat.S_ISREG(file_stat.st_mode):
-        logger.warning('Negative: The %s is not a regular file.', 
telemetry_note_path)
-        return False
-
-    modify_time = datetime.fromtimestamp(file_stat.st_mtime)
-    if datetime.now() - modify_time < MANDATORY_WAIT_PERIOD:
-        logger.warning('Negative: The %s was modified at %s, which in less 
than %f s',
-                       telemetry_note_path, modify_time, 
MANDATORY_WAIT_PERIOD.total_seconds())
-        return False
-
-    logger.info('Returns Positive.')
-    return True
 
 
 def save_payload(config_dir, payload):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-telemetry-1.0.8/azure_cli_telemetry.egg-info/PKG-INFO 
new/azure-cli-telemetry-1.1.0/azure_cli_telemetry.egg-info/PKG-INFO
--- old/azure-cli-telemetry-1.0.8/azure_cli_telemetry.egg-info/PKG-INFO 
2022-09-02 07:40:14.000000000 +0200
+++ new/azure-cli-telemetry-1.1.0/azure_cli_telemetry.egg-info/PKG-INFO 
2023-07-27 09:10:37.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: azure-cli-telemetry
-Version: 1.0.8
+Version: 1.1.0
 Summary: Microsoft Azure CLI Telemetry Package
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
@@ -11,7 +11,6 @@
 Classifier: Intended Audience :: System Administrators
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
@@ -33,6 +32,10 @@
 
 Release History
 ===============
+1.1.0
++++++
+* Drop telemetry cache strategy. Records will be uploaded immediately
+
 1.0.8
 +++++
 * Keep storing telemetry to CLI AppInsights in local cache but send telemetry 
to other AppInsights immediately
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-telemetry-1.0.8/setup.py 
new/azure-cli-telemetry-1.1.0/setup.py
--- old/azure-cli-telemetry-1.0.8/setup.py      2022-09-02 07:40:04.000000000 
+0200
+++ new/azure-cli-telemetry-1.1.0/setup.py      2023-07-27 09:10:05.000000000 
+0200
@@ -8,7 +8,7 @@
 from codecs import open
 from setuptools import setup
 
-VERSION = "1.0.8"
+VERSION = "1.1.0"
 
 CLASSIFIERS = [
     'Development Status :: 5 - Production/Stable',
@@ -16,7 +16,6 @@
     'Intended Audience :: System Administrators',
     'Programming Language :: Python',
     'Programming Language :: Python :: 3',
-    'Programming Language :: Python :: 3.7',
     'Programming Language :: Python :: 3.8',
     'Programming Language :: Python :: 3.9',
     'Programming Language :: Python :: 3.10',

Reply via email to