Skip to content

Commit 60f9749

Browse files
authored
fixing bug with launcher (#34)
* fixing bug with launcher * unstupidify! harry potter! the bug is that the launcher is always specified because when we check for a boolean argument, we always add it to be true. Instead we need to add it to be the found value (true or false) and then ensure it does not get passed to flux Signed-off-by: vsoch <[email protected]>
1 parent 979b544 commit 60f9749

File tree

5 files changed

+30
-2
lines changed

5 files changed

+30
-2
lines changed

.github/workflows/build-deploy.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ jobs:
4343
echo "Tagging and releasing ${{ env.container }}:${tag}"
4444
docker tag ${{env.container}}:latest ${{env.container}}:${tag}
4545
docker push ${{env.container}}:${tag}
46+
# Named tag
47+
tag=$(cat ./VERSION)
48+
echo "Tagging and releasing ${{ env.container }}:${tag}"
49+
docker tag ${{env.container}}:latest ${{env.container}}:${tag}
50+
docker push ${{env.container}}:${tag}
4651
4752
- name: Deploy
4853
if: (github.event_name != 'pull_request')

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# CHANGELOG
2+
3+
This is a manually generated log to track changes to the repository for each release.
4+
Each section should include general headers such as **Implemented enhancements**
5+
and **Merged pull requests**. Critical items to know are:
6+
7+
- renamed commands
8+
- deprecated / removed commands
9+
- changed defaults
10+
- backward incompatible changes (recipe file format? image file format?)
11+
- migration guidance (how to convert images?)
12+
- changed behaviour (recipe sections work differently)
13+
14+
The versions coincide with releases on pip. Only major versions will be released as tags on Github.
15+
16+
## [0.0.x](https://github.com/flux-framework/flux-restful-api/tree/main) (0.0.x)
17+
- Fixing bug with launcher always being specified (0.0.1)
18+
- Project (faux) skeleton release (0.0.0)

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.1

app/forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def __init__(self, request: Request):
2020
self.is_launcher: Optional[bool] = False
2121
self.exclusive: Optional[bool] = False
2222

23-
# STOPPED HERE - serialize in jquery from form, submit as application/json.
2423
async def load_data(self):
2524
form = await self.request.form()
2625
self.command = form.get("command")
@@ -44,6 +43,7 @@ def kwargs(self):
4443
for key in as_int + as_bool + ["command"]:
4544
if getattr(self, key, None) is not None:
4645
value = getattr(self, key)
46+
4747
# Form could submit an empty value
4848
if value == "":
4949
continue
@@ -52,7 +52,7 @@ def kwargs(self):
5252
if key in as_int:
5353
kwargs[key] = int(value)
5454
elif key in as_bool:
55-
kwargs[key] = True
55+
kwargs[key] = value
5656
else:
5757
kwargs[key] = value
5858
return kwargs

app/library/flux.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ def prepare_job(kwargs, runtime=0, workdir=None, envars=None):
6060

6161
# Delete command from the kwargs (we added because is required and validated that way)
6262
del kwargs["command"]
63+
64+
# From the command line API client this won't be here, in the UI it will.
65+
if "is_launcher" in kwargs:
66+
del kwargs["is_launcher"]
6367
fluxjob = flux.job.JobspecV1.from_command(command, **kwargs)
6468

6569
print(f"⭐️ Workdir provided: {workdir}")

0 commit comments

Comments
 (0)