rdeploy 0.4.1__tar.gz → 0.4.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdeploy
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: CLI that makes it easy to build and deploy an application to k8s.
5
5
  Author-email: Rehive <info@rehive.com>
6
6
  License: MIT
rdeploy-0.4.2/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.4.2
@@ -724,6 +724,20 @@ def live_image(ctx, config):
724
724
  print(image)
725
725
 
726
726
 
727
+ def _run_interactive(cmd):
728
+ """
729
+ Run a command attached directly to the user's terminal.
730
+
731
+ kubectl manages the terminal itself, so invoke's pty layer is skipped: on
732
+ Python 3.14 its stdin forwarding dies (an undersized FIONREAD buffer now
733
+ raises SystemError), leaving the session unable to receive input.
734
+ """
735
+ print(cmd)
736
+ result = subprocess.run(cmd, shell=True)
737
+ if result.returncode:
738
+ sys.exit(result.returncode)
739
+
740
+
727
741
  @task
728
742
  def shell(ctx, config, tag=None):
729
743
  """Exec into the management container"""
@@ -731,7 +745,7 @@ def shell(ctx, config, tag=None):
731
745
  settings_dict = get_settings()
732
746
  config_dict = settings_dict['configs'][config]
733
747
  management_cmd = build_management_cmd(config_dict, "/bin/bash", tag)
734
- ctx.run(management_cmd, pty=True, warn=False, echo=True)
748
+ _run_interactive(management_cmd)
735
749
 
736
750
 
737
751
  @task
@@ -741,7 +755,7 @@ def manage(ctx, config, cmd, tag=None):
741
755
  settings_dict = get_settings()
742
756
  config_dict = settings_dict['configs'][config]
743
757
  management_cmd = build_management_cmd(config_dict, f'python manage.py {cmd}', tag)
744
- ctx.run(management_cmd, pty=True, warn=False, echo=True)
758
+ _run_interactive(management_cmd)
745
759
 
746
760
 
747
761
  @task
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdeploy
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: CLI that makes it easy to build and deploy an application to k8s.
5
5
  Author-email: Rehive <info@rehive.com>
6
6
  License: MIT
@@ -1,9 +1,7 @@
1
- CHANGES.txt
2
1
  LICENSE
3
2
  README.md
4
3
  VERSION
5
4
  pyproject.toml
6
- requirements.txt
7
5
  rdeploy/__init__.py
8
6
  rdeploy/exceptions.py
9
7
  rdeploy/main.py
@@ -17,6 +17,8 @@ from rdeploy.tasks import (
17
17
  git_release,
18
18
  upgrade,
19
19
  helm_setup,
20
+ shell,
21
+ manage,
20
22
  )
21
23
  from rdeploy.exceptions import ReleaseError, ExecuteError
22
24
 
@@ -724,3 +726,39 @@ class TestGitRelease:
724
726
  with patch('rdeploy.tasks.confirm'):
725
727
  with pytest.raises(SystemExit):
726
728
  git_release(mock_ctx, version_bump='pre')
729
+
730
+
731
+
732
+ class TestInteractiveCommands:
733
+ # shell and manage hand the terminal straight to kubectl instead of going
734
+ # through invoke's pty layer, which cannot forward stdin on Python 3.14.
735
+
736
+ def _run(self, task, sample_settings_v3, *args, returncode=0):
737
+ settings = yaml.safe_load(open(sample_settings_v3))
738
+ with patch('rdeploy.tasks.get_settings', return_value=settings), \
739
+ patch('rdeploy.tasks.set_context'), \
740
+ patch('rdeploy.tasks.build_management_cmd',
741
+ return_value='kubectl run management') as build, \
742
+ patch('rdeploy.tasks.subprocess.run',
743
+ return_value=MagicMock(returncode=returncode)) as run:
744
+ task(*args)
745
+ return build, run
746
+
747
+ def test_shell_runs_kubectl_on_the_terminal(self, mock_ctx, sample_settings_v3):
748
+ build, run = self._run(shell, sample_settings_v3, mock_ctx, 'staging')
749
+ assert build.call_args[0][1] == '/bin/bash'
750
+ run.assert_called_once_with('kubectl run management', shell=True)
751
+ mock_ctx.run.assert_not_called()
752
+
753
+ def test_manage_runs_the_management_command(self, mock_ctx, sample_settings_v3):
754
+ build, run = self._run(
755
+ manage, sample_settings_v3, mock_ctx, 'staging', 'migrate')
756
+ assert build.call_args[0][1] == 'python manage.py migrate'
757
+ run.assert_called_once_with('kubectl run management', shell=True)
758
+ mock_ctx.run.assert_not_called()
759
+
760
+ def test_exit_code_is_propagated(self, mock_ctx, sample_settings_v3):
761
+ with pytest.raises(SystemExit) as exc:
762
+ self._run(
763
+ shell, sample_settings_v3, mock_ctx, 'staging', returncode=3)
764
+ assert exc.value.code == 3
rdeploy-0.4.1/CHANGES.txt DELETED
@@ -1,208 +0,0 @@
1
- ----
2
- Version 0.4.1, Wed 28 Oct 2026
3
- ===============================
4
- - `rdeploy helm-setup` and the local helm path now use the machine's CPU
5
- architecture, so Apple Silicon Macs get the native `darwin-arm64` build
6
- instead of the x86_64 one (which fails without Rosetta, e.g. on macOS 27).
7
- Linux arm64 gets `linux-arm64`. Unsupported architectures raise an error
8
- instead of falling back to amd64.
9
- - `rdeploy helm-setup` now runs `helm version` on the binary it installed and
10
- fails with the error if it can't run, instead of printing
11
- "Successfully installed".
12
-
13
- UPGRADE NOTES:
14
- - On Apple Silicon, run `rdeploy helm-setup <config>` once to download the
15
- arm64 binary to `opt/helm-v<version>/darwin-arm64/`. The old
16
- `opt/helm-v<version>/darwin-amd64/` directory is no longer used and can be
17
- deleted.
18
-
19
- ----
20
- Version 0.4.0, Fri 10 Jul 2026
21
- ===============================
22
- - `rdeploy upgrade` now shows live rollout progress while the atomic helm
23
- upgrade waits: it polls `kubectl get pods` and shows the pod status table
24
- (prefixed with `[rollout]`), so you can watch pods being created, pulled,
25
- started and terminated (including helm hook pods such as migration jobs)
26
- instead of blocking silently. On a terminal the table is pinned to the
27
- bottom of the screen and updates in place while helm's output scrolls
28
- above it; on a non-TTY (e.g. CI logs) it prints the table once, then any
29
- row that changes.
30
- - Added `--no-progress` to disable the live progress display. The display is
31
- purely informational and runs concurrently with helm; helm `--atomic`
32
- remains the sole arbiter of success, failure and rollback, and the watcher
33
- never affects the command's exit code.
34
-
35
- ----
36
- Version 0.3.0, Thu 09 Jul 2026
37
- ===============================
38
- - `rdeploy upgrade` now runs helm with `--atomic` by default: helm waits for
39
- the rollout to complete (up to `--timeout`, default 15m) and automatically
40
- rolls back to the previous release if it fails, and the command exits with
41
- an error instead of reporting success.
42
- - Added `--no-atomic` to restore the previous fire-and-forget behaviour and
43
- `--timeout` to adjust how long helm waits.
44
-
45
- BREAKING CHANGES:
46
- - `rdeploy upgrade` now blocks until the rollout completes and exits non-zero
47
- on failure. Scripts that relied on it returning immediately should pass
48
- `--no-atomic`.
49
-
50
- Version 0.2.0, Thu 09 Jul 2026
51
- ===============================
52
- - Upgraded all dependencies to current versions: invoke 2.2+/3.x, semver 3.x,
53
- kubernetes 28+, packaging 23+, python-dotenv 1.0+, requests 2.31+.
54
- - Migrated packaging from setup.py to pyproject.toml.
55
- - Replaced deprecated pkg_resources and distutils.strtobool (removed in
56
- Python 3.12) with importlib.metadata and a local implementation.
57
- - Added a test suite (pytest).
58
- - Removed all Azure support. rdeploy now targets GCP exclusively. Commands
59
- fail with a clear error when rdeploy.yaml specifies a non-gcp provider.
60
- - Fixed latest-prerelease regex to escape the version argument.
61
-
62
- BREAKING CHANGES:
63
- - Azure support removed: set-cluster, set-context, set-project and cloudbuild
64
- no longer work with `cloud_provider.name: azure` configs, and the
65
- `container_registry_provider: azure` setting is no longer honoured.
66
- - `rdeploy upgrade` named argument renamed: `--version` is now `--tag`
67
- (positional usage, e.g. `rdeploy upgrade prod 1.2.3`, is unchanged).
68
- - The `bash` alias for the `shell` command was removed; use `rdeploy shell`.
69
- - `rdeploy latest-prerelease` named argument renamed: `--version` is now
70
- `--ver`. The misspelled `latest-prerelese` alias was removed.
71
- - Requires Python 3.9+.
72
-
73
- Version 0.1.9, Tue 30 Apr 2024
74
- ===============================
75
- - Fix bug in Google Artifact Registry for helm charts handling
76
-
77
- Version 0.1.8, Tue 30 Apr 2024
78
- ===============================
79
- - Added support for Google Artifact Registry for helm charts.
80
-
81
- Version 0.0.30, Mon 4 Jan 2020
82
- ===============================
83
- - Update helm stable repo url to new version.
84
-
85
- Version 0.0.26, Wed 14 Jul 2020
86
- ===============================
87
- - Add decode-secret command
88
- - Fix MANIFEST.in
89
-
90
- Version 0.0.25, Wed 25 Mar 2020
91
- ===============================
92
-
93
- - Migrated to use kubectl run command. Currently supporting the
94
- ExtensionsV1beta1/deployment
95
-
96
- a8a490a updated working management pod spec and command definition for both manage and shell commands
97
- 78d207c Created a command for building the management command
98
-
99
- Version 0.0.24, Tue 11 Feb 2020
100
- ===============================
101
- - Fix bug in helm install command version parsing.
102
-
103
- Version 0.0.22, Mon 10 Feb 2020
104
- ===============================
105
- - New rdeploy.yaml format, added rdeploy.example.yaml.
106
- - Added support for Azure in the set_context, and cloudbuild commands. Azure details to be provided in the `cloud_provider` field in rdeploy.yaml.
107
- - Added support for helm 3 in the `install` and `upgrade` commands.
108
- - Added helm_setup command which installs a specific helm version in a local opt directory. This can be enabled by specifying `use_system_helm: false` and `helm_version` in rdeploy.yaml.
109
- - Added a new `helm` command.
110
- - Added aliases for all commands with underscores. I.e. `rdeploy set-context` is now equivalent to `rdeploy set_context`
111
- - Renamed the `bash` to `shell`, keeping `bash` as an alias.
112
-
113
- Version 0.0.18, Fri 13 Sep 2019
114
- ===============================
115
-
116
- 0a1a8ff preference placed on bash instead of bourne shell (Mwangi)
117
- 9dbee31 explicitly added the separator for the command in the kubectl exec command (Mwangi)
118
- 41e48c7 added docs for the force flag (Mwangi)
119
- e7f11bf removed redundant prefix \venv\bin for future changes to our docker images (Mwangi)
120
- a9a5ac1 added a build option for git release (Mwangi)
121
- dee9af8 removed input option for confirm changes have been committed (Mwangi)
122
-
123
- Version 0.0.17, Mon 05 Aug 2019
124
- ===============================
125
-
126
- 0283cd1 Added gcs-log-dir option to the cloudbuild methods (Mwangi)
127
- 9efa2c9 fixed the YAML Loader (Mwangi)
128
- 7e98584 Refactoring the tasks file (Mwangi)
129
-
130
- Version 0.0.16, Thu 19 Jul 2019
131
- ===============================
132
-
133
- 7b8bd11 Merge pull request #19 from rehive/feature/18-tiller-migration (Mwangi)
134
- 3a16ae3 Tested the template_install (Mwangi)
135
- 35f082d split install and template_install (Mwangi)
136
- 6868aac WIP Added the helm fetch and helm template commands (Mwangi)
137
- c3deaee Default ACL set to private for non-static buckets (Mwangi)
138
-
139
- Version 0.0.15, Fri 5 Jul 2019
140
- ==============================
141
-
142
- 31b94f0944 Bumped version to 0.0.15 (Mwangi)
143
- ede64320fa Formatting fixes, bug fixes and deprecations (Mwangi)
144
- - Fixed formatting for readability
145
- - removed create_volume_claim action as it is deprecated
146
- - updated gsutil commands to be bucketPolicy only
147
- - updated bucket actions to be set on current project and not cluster
148
- - removed proxy action due to kubectl deprecation
149
- - Fixed initial versioning bug i.e when project has no tag
150
- d8cd0ea6fa Install flags fixed for Helm v3.0.1-alpha (Mwangi)
151
- 1c350ce854 Merging with master (Mwangi)
152
-
153
-
154
- Version 0.0.14, Mon 21 Jan 2019
155
- ================================
156
-
157
- eb44a57bc2 Hotfix yet another silly bug (Michail Brynard)
158
-
159
-
160
- Version 0.0.13, Mon 21 Jan 2019
161
- ================================
162
-
163
- fb181839a6 Hotfix: dictionary bug (Michail Brynard)
164
-
165
-
166
- Version 0.0.12, Mon 21 Jan 2019
167
- ================================
168
-
169
- 1c8bd5b220 Fix typo (Michail Brynard)
170
-
171
-
172
- Version 0.0.11, Mon 21 Jan 2019
173
- ================================
174
-
175
- fa6eec9b42 Version bump to 0.0.10 and updating CHANGES.txt (Michail Brynard)
176
- 666f6b5b87 Update formatting (Michail Brynard)
177
- 025548a9dc Add support for specifying zone or region in rdeploy.yaml. (Michail Brynard)
178
-
179
-
180
- Version 0.0.10, Mon 21 Jan 2019
181
- ================================
182
-
183
- 666f6b5b87 Update formatting (Michail Brynard)
184
- 025548a9dc Add support for specifying zone or region in rdeploy.yaml. (Michail Brynard)
185
-
186
-
187
- Version 0.0.7, Tue 05 Jun 2018
188
- ===============================
189
-
190
-
191
-
192
- Version 0.0.6, Tue 05 Jun 2018
193
- ===============================
194
-
195
- 91352e57ae Version bump to 0.0.5 and updating CHANGES.txt (Michail Brynard)
196
-
197
-
198
- Version 0.0.5, Tue 05 Jun 2018
199
- ===============================
200
-
201
- 5419c2fb42 Fix static upload command (Michail Brynard)
202
-
203
-
204
- Version 0.0.5, Tue 05 Jun 2018
205
- ===============================
206
-
207
- 5419c2fb42 Fix static upload command (Michail Brynard)
208
-
rdeploy-0.4.1/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.4.1
@@ -1,7 +0,0 @@
1
- invoke>=2.2,<4
2
- kubernetes>=28,<36
3
- packaging>=23
4
- python-dotenv>=1.0
5
- PyYAML>=6.0
6
- semver>=3.0,<4
7
- requests>=2.31
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes