cortexapps-cli 1.5.0__tar.gz → 1.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/PKG-INFO +1 -1
  2. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/cli.py +1 -1
  3. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/backup.py +8 -0
  4. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/cortex_client.py +1 -2
  5. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/pyproject.toml +1 -1
  6. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/LICENSE +0 -0
  7. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/README.rst +0 -0
  8. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/command_options.py +0 -0
  9. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/api_keys.py +0 -0
  10. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/audit_logs.py +0 -0
  11. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/backup_commands/cortex_export.py +0 -0
  12. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/catalog.py +0 -0
  13. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/custom_data.py +0 -0
  14. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/custom_events.py +0 -0
  15. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/custom_metrics.py +0 -0
  16. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/dependencies.py +0 -0
  17. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/deploys.py +0 -0
  18. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/discovery_audit.py +0 -0
  19. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/docs.py +0 -0
  20. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/entity_relationship_types.py +0 -0
  21. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/entity_relationships.py +0 -0
  22. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/entity_types.py +0 -0
  23. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/gitops_logs.py +0 -0
  24. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/groups.py +0 -0
  25. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/initiatives.py +0 -0
  26. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations.py +0 -0
  27. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/aws.py +0 -0
  28. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/azure_devops.py +0 -0
  29. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/azure_resources.py +0 -0
  30. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/circleci.py +0 -0
  31. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/coralogix.py +0 -0
  32. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/datadog.py +0 -0
  33. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/github.py +0 -0
  34. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/gitlab.py +0 -0
  35. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/incidentio.py +0 -0
  36. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/launchdarkly.py +0 -0
  37. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/newrelic.py +0 -0
  38. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/pagerduty.py +0 -0
  39. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/prometheus.py +0 -0
  40. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/integrations_commands/sonarqube.py +0 -0
  41. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/ip_allowlist.py +0 -0
  42. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/on_call.py +0 -0
  43. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/packages.py +0 -0
  44. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/packages_commands/go.py +0 -0
  45. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/packages_commands/java.py +0 -0
  46. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/packages_commands/node.py +0 -0
  47. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/packages_commands/nuget.py +0 -0
  48. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/packages_commands/python.py +0 -0
  49. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/plugins.py +0 -0
  50. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/queries.py +0 -0
  51. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/rest.py +0 -0
  52. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/scim.py +0 -0
  53. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/scorecards.py +0 -0
  54. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/scorecards_commands/exemptions.py +0 -0
  55. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/secrets.py +0 -0
  56. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/teams.py +0 -0
  57. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/commands/workflows.py +0 -0
  58. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/models/team.py +0 -0
  59. {cortexapps_cli-1.5.0 → cortexapps_cli-1.7.0}/cortexapps_cli/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cortexapps-cli
3
- Version: 1.5.0
3
+ Version: 1.7.0
4
4
  Summary: Command Line Interface for cortexapps
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -87,7 +87,7 @@ def global_callback(
87
87
  url: str = typer.Option(None, "--url", "-u", help="Base URL for the API", envvar="CORTEX_BASE_URL"),
88
88
  config_file: str = typer.Option(os.path.join(os.path.expanduser('~'), '.cortex', 'config'), "--config", "-c", help="Config file path", envvar="CORTEX_CONFIG"),
89
89
  tenant: str = typer.Option("default", "--tenant", "-t", help="Tenant alias", envvar="CORTEX_TENANT_ALIAS"),
90
- log_level: Annotated[str, typer.Option("--log-level", "-l", help="Set the logging level")] = "INFO",
90
+ log_level: Annotated[str, typer.Option("--log-level", "-l", help="Set the logging level")] = "WARNING",
91
91
  rate_limit: int = typer.Option(None, "--rate-limit", "-r", help="API rate limit in requests per minute (default: 1000)", envvar="CORTEX_RATE_LIMIT")
92
92
  ):
93
93
  if not ctx.obj:
@@ -472,6 +472,8 @@ def _import_entity_relationships(ctx, directory):
472
472
  return ("entity-relationships", len(results) - failed_count, [(fp, et, em) for rt, fp, et, em in results if et])
473
473
 
474
474
  def _import_catalog(ctx, directory):
475
+ results = []
476
+ failed_count = 0
475
477
  if os.path.isdir(directory):
476
478
  print("Processing: " + directory)
477
479
  files = [(filename, os.path.join(directory, filename))
@@ -507,6 +509,8 @@ def _import_catalog(ctx, directory):
507
509
  return ("catalog", len(results) - failed_count, [(fp, et, em) for fn, fp, et, em in results if et])
508
510
 
509
511
  def _import_plugins(ctx, directory):
512
+ results = []
513
+ failed_count = 0
510
514
  if os.path.isdir(directory):
511
515
  print("Processing: " + directory)
512
516
  files = [(filename, os.path.join(directory, filename))
@@ -543,6 +547,8 @@ def _import_plugins(ctx, directory):
543
547
  return ("plugins", len(results) - failed_count, [(fp, et, em) for fn, fp, et, em in results if et])
544
548
 
545
549
  def _import_scorecards(ctx, directory):
550
+ results = []
551
+ failed_count = 0
546
552
  if os.path.isdir(directory):
547
553
  print("Processing: " + directory)
548
554
  files = [(filename, os.path.join(directory, filename))
@@ -579,6 +585,8 @@ def _import_scorecards(ctx, directory):
579
585
  return ("scorecards", len(results) - failed_count, [(fp, et, em) for fn, fp, et, em in results if et])
580
586
 
581
587
  def _import_workflows(ctx, directory):
588
+ results = []
589
+ failed_count = 0
582
590
  if os.path.isdir(directory):
583
591
  print("Processing: " + directory)
584
592
  files = [(filename, os.path.join(directory, filename))
@@ -85,7 +85,6 @@ class CortexClient:
85
85
  # Client-side rate limiter (default: 1000 req/min = 16.67 req/sec)
86
86
  # Allows bursting up to 50 requests, then enforces rate limit
87
87
  self.rate_limiter = TokenBucket(rate=rate_limit/60.0, capacity=50)
88
- self.logger.info(f"Rate limiter initialized: {rate_limit} req/min (burst: 50)")
89
88
 
90
89
  # Create a session with connection pooling for better performance
91
90
  self.session = requests.Session()
@@ -99,7 +98,7 @@ class CortexClient:
99
98
  max_retries=Retry(
100
99
  total=3,
101
100
  backoff_factor=0.3,
102
- status_forcelist=[500, 502, 503, 504], # Removed 429 - we avoid it with rate limiting
101
+ status_forcelist=[429], # Only retry on rate limit errors
103
102
  allowed_methods=["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"],
104
103
  respect_retry_after_header=True
105
104
  )
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
  name = "cortexapps-cli"
3
3
  # version will be incremented via command line as part of github actions build
4
- version = "1.5.0"
4
+ version = "1.7.0"
5
5
  description = "Command Line Interface for cortexapps"
6
6
  license = "MIT"
7
7
  authors = [
File without changes