workpeg 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.
- {workpeg-0.4.1/src/workpeg.egg-info → workpeg-0.4.2}/PKG-INFO +1 -1
- {workpeg-0.4.1 → workpeg-0.4.2}/pyproject.toml +1 -1
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/submit.py +4 -4
- {workpeg-0.4.1 → workpeg-0.4.2/src/workpeg.egg-info}/PKG-INFO +1 -1
- {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_submit.py +5 -5
- {workpeg-0.4.1 → workpeg-0.4.2}/LICENSE +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/MANIFEST.in +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/README.md +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/setup.cfg +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/__init__.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/build.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/cli.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/config.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/context.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/create_new.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/run.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/runtime.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/__init__.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/Dockerfile +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/LICENSE +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/README.md +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/app/__init__.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/app/main.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg/templates/functions/requirements.txt +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg.egg-info/SOURCES.txt +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg.egg-info/dependency_links.txt +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg.egg-info/entry_points.txt +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg.egg-info/requires.txt +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/src/workpeg.egg-info/top_level.txt +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_build.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_cli.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_context.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_create_new.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_run.py +0 -0
- {workpeg-0.4.1 → workpeg-0.4.2}/tests/test_runtime.py +0 -0
|
@@ -106,7 +106,7 @@ def submit_bundle(
|
|
|
106
106
|
api_base: str,
|
|
107
107
|
peg_id: str,
|
|
108
108
|
token: str,
|
|
109
|
-
|
|
109
|
+
branch_id: str,
|
|
110
110
|
version: str,
|
|
111
111
|
bundle_bytes: bytes,
|
|
112
112
|
timeout_s: int = 60,
|
|
@@ -117,7 +117,7 @@ def submit_bundle(
|
|
|
117
117
|
"bundle": ("bundle.tar.gz", bundle_bytes, "application/gzip"),
|
|
118
118
|
}
|
|
119
119
|
data = {
|
|
120
|
-
"
|
|
120
|
+
"branch_id": branch_id,
|
|
121
121
|
"version": version,
|
|
122
122
|
}
|
|
123
123
|
headers = {
|
|
@@ -144,7 +144,7 @@ def main(argv=None) -> None:
|
|
|
144
144
|
parser.add_argument(
|
|
145
145
|
"ref",
|
|
146
146
|
help="Function reference in the form <branch_name>:<version>"
|
|
147
|
-
" (e.g.,
|
|
147
|
+
" (e.g., main:1.0.0)")
|
|
148
148
|
parser.add_argument("--api", default=os.environ.get(API_ENV,
|
|
149
149
|
DEFAULT_API_BASE), help="API base URL")
|
|
150
150
|
parser.add_argument("--path", default=os.environ.get(PATH_ENV,
|
|
@@ -173,7 +173,7 @@ def main(argv=None) -> None:
|
|
|
173
173
|
api_base=args.api,
|
|
174
174
|
peg_id=str(peg_id),
|
|
175
175
|
token=token,
|
|
176
|
-
|
|
176
|
+
branch_id=branch_name,
|
|
177
177
|
version=version,
|
|
178
178
|
bundle_bytes=bundle_bytes,
|
|
179
179
|
timeout_s=args.timeout,
|
|
@@ -155,7 +155,7 @@ def test_submit_bundle_success_builds_request(mock_post):
|
|
|
155
155
|
api_base="https://repo.workpeg.com",
|
|
156
156
|
peg_id="peg-123",
|
|
157
157
|
token="jwt-token",
|
|
158
|
-
|
|
158
|
+
branch_id="fn_echo",
|
|
159
159
|
version="1.0.0",
|
|
160
160
|
bundle_bytes=b"tgz-bytes",
|
|
161
161
|
timeout_s=60,
|
|
@@ -168,7 +168,7 @@ def test_submit_bundle_success_builds_request(mock_post):
|
|
|
168
168
|
|
|
169
169
|
assert args[0] == "https://repo.workpeg.com/api/pegs/peg-123/functions/"
|
|
170
170
|
assert kwargs["headers"]["Authorization"] == "Bearer jwt-token"
|
|
171
|
-
assert kwargs["data"] == {"
|
|
171
|
+
assert kwargs["data"] == {"branch_id": "fn_echo", "version": "1.0.0"}
|
|
172
172
|
assert "files" in kwargs
|
|
173
173
|
file_tuple = kwargs["files"]["bundle"]
|
|
174
174
|
assert file_tuple[0] == "bundle.tar.gz"
|
|
@@ -189,7 +189,7 @@ def test_submit_bundle_http_error_json(mock_post):
|
|
|
189
189
|
api_base="https://repo.workpeg.com",
|
|
190
190
|
peg_id="peg-123",
|
|
191
191
|
token="jwt-token",
|
|
192
|
-
|
|
192
|
+
branch_id="fn_echo",
|
|
193
193
|
version="1.0.0",
|
|
194
194
|
bundle_bytes=b"tgz-bytes",
|
|
195
195
|
)
|
|
@@ -209,7 +209,7 @@ def test_submit_bundle_http_error_non_json(mock_post):
|
|
|
209
209
|
api_base="https://repo.workpeg.com",
|
|
210
210
|
peg_id="peg-123",
|
|
211
211
|
token="jwt-token",
|
|
212
|
-
|
|
212
|
+
branch_id="fn_echo",
|
|
213
213
|
version="1.0.0",
|
|
214
214
|
bundle_bytes=b"tgz-bytes",
|
|
215
215
|
)
|
|
@@ -265,7 +265,7 @@ def test_main_happy_path_uses_default_api_base(
|
|
|
265
265
|
_, kwargs = mock_submit_bundle.call_args
|
|
266
266
|
assert kwargs["api_base"] == "https://repo.workpeg.com"
|
|
267
267
|
assert kwargs["peg_id"] == "peg-123"
|
|
268
|
-
assert kwargs["
|
|
268
|
+
assert kwargs["branch_id"] == "fn_echo"
|
|
269
269
|
assert kwargs["version"] == "1.0.0"
|
|
270
270
|
assert kwargs["token"] == token
|
|
271
271
|
assert isinstance(kwargs["bundle_bytes"], (bytes, bytearray))
|
|
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
|
|
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
|
|
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
|