snapctl 0.47.0__tar.gz → 0.47.1__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.

Potentially problematic release.


This version of snapctl might be problematic. Click here for more details.

Files changed (29) hide show
  1. {snapctl-0.47.0 → snapctl-0.47.1}/PKG-INFO +1 -1
  2. {snapctl-0.47.0 → snapctl-0.47.1}/pyproject.toml +1 -1
  3. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/commands/byosnap.py +29 -1
  4. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/config/constants.py +1 -1
  5. snapctl-0.47.1/snapctl/data/releases/beta-0.47.1.mdx +11 -0
  6. {snapctl-0.47.0 → snapctl-0.47.1}/LICENSE +0 -0
  7. {snapctl-0.47.0 → snapctl-0.47.1}/README.md +0 -0
  8. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/__init__.py +0 -0
  9. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/__main__.py +0 -0
  10. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/commands/__init__.py +0 -0
  11. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/commands/byogs.py +0 -0
  12. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/commands/game.py +0 -0
  13. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/commands/generate.py +0 -0
  14. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/commands/release_notes.py +0 -0
  15. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/commands/snapend.py +0 -0
  16. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/config/__init__.py +0 -0
  17. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/config/endpoints.py +0 -0
  18. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/config/hashes.py +0 -0
  19. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/data/profiles/snapser-byosnap-profile.json +0 -0
  20. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/data/profiles/snapser-byosnap-profile.yaml +0 -0
  21. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/data/releases/beta-0.46.0.mdx +0 -0
  22. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/data/releases/beta-0.46.4.mdx +0 -0
  23. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/data/releases/beta-0.47.0.mdx +0 -0
  24. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/main.py +0 -0
  25. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/types/__init__.py +0 -0
  26. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/types/definitions.py +0 -0
  27. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/utils/__init__.py +0 -0
  28. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/utils/echo.py +0 -0
  29. {snapctl-0.47.0 → snapctl-0.47.1}/snapctl/utils/helper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snapctl
3
- Version: 0.47.0
3
+ Version: 0.47.1
4
4
  Summary: Snapser CLI Tool
5
5
  Author: Ajinkya Apte
6
6
  Author-email: aj@snapser.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "snapctl"
3
- version = "0.47.0"
3
+ version = "0.47.1"
4
4
  description = "Snapser CLI Tool"
5
5
  authors = ["Ajinkya Apte <aj@snapser.com>"]
6
6
  readme = "README.md"
@@ -961,6 +961,8 @@ class ByoSnap:
961
961
  # Setup
962
962
  self._setup_token_and_token_parts(
963
963
  self.base_url, self.api_key, self.byosnap_id)
964
+ # Setup the profile data
965
+ self._setup_and_validate_byosnap_profile_data()
964
966
  # Validator
965
967
  ByoSnap._validate_byosnap_id(self.byosnap_id)
966
968
  if self.token_parts is None:
@@ -988,6 +990,8 @@ class ByoSnap:
988
990
  # Setup
989
991
  self._setup_token_and_token_parts(
990
992
  self.base_url, self.api_key, self.byosnap_id)
993
+ # Setup the profile data
994
+ self._setup_and_validate_byosnap_profile_data()
991
995
  # Validator
992
996
  ByoSnap._validate_byosnap_id(self.byosnap_id)
993
997
  if self.token_parts is None:
@@ -1405,8 +1409,32 @@ class ByoSnap:
1405
1409
  progress.add_task(
1406
1410
  description='Updating your Byosnap...', total=None)
1407
1411
  try:
1412
+ profile_data = self._get_profile_contents()
1413
+ dev_template = None
1414
+ if 'dev_template' in profile_data:
1415
+ dev_template = profile_data['dev_template']
1416
+ stage_template = None
1417
+ if 'stage_template' in profile_data:
1418
+ stage_template = profile_data['stage_template']
1419
+ prod_template = None
1420
+ if 'prod_template' in profile_data:
1421
+ prod_template = profile_data['prod_template']
1408
1422
  payload = {
1409
- 'image_tag': self.tag,
1423
+ "image_tag": self.tag,
1424
+ "base_url": f"{self.prefix}/{self.byosnap_id}",
1425
+ "ingress": {
1426
+ "external_port": self.ingress_external_port,
1427
+ "internal_ports": self.ingress_internal_ports
1428
+ },
1429
+ "readiness_probe_config": {
1430
+ "path": self.readiness_path,
1431
+ "initial_delay_seconds": self.readiness_delay
1432
+ },
1433
+ "dev_template": dev_template,
1434
+ "stage_template": stage_template,
1435
+ "prod_template": prod_template,
1436
+ # Currently not supported so we are just hardcoding an empty list
1437
+ "egress": {"ports": []},
1410
1438
  }
1411
1439
  res = requests.patch(
1412
1440
  f"{self.base_url}/v1/snapser-api/byosnaps/{self.byosnap_id}/versions/{self.version}",
@@ -3,7 +3,7 @@ Constants used by snapctl
3
3
  """
4
4
  COMPANY_NAME = 'Snapser'
5
5
  VERSION_PREFIX = 'beta-'
6
- VERSION = '0.47.0'
6
+ VERSION = '0.47.1'
7
7
  CONFIG_FILE_MAC = '~/.snapser/config'
8
8
  CONFIG_FILE_WIN = '%homepath%\\.snapser\\config'
9
9
 
@@ -0,0 +1,11 @@
1
+ ## beta-0.47.1
2
+ ##### March 12, 2025
3
+
4
+ ### [Breaking Change] Feature
5
+ 1. The sync command now also syncs the BYOSnap profile with the Snapend as well
6
+ ```bash
7
+ snapctl byosnap sync --byosnap-id byosnap-jinks-flask --path /Users/Ajinkya/Development/SnapserEngine/jinks_flask --version "$version" --snapend-id "${snapendId}" --blocking
8
+ ```
9
+ The only reason this constitutes a breaking change is if users of the sync command were not
10
+ anticipating the BYOSnap profile to be checked. Now that this command also synchronizes the profile,
11
+ you must have the BYOSnap profile located at the --path or within the --resources-path folder.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes