Skip to content

Commit 03a171a

Browse files
authored
Merge branch 'master' into is1988/upgrading-director-to-fastapi
2 parents a8bc7a5 + 2f0cfb0 commit 03a171a

File tree

24 files changed

+110
-59
lines changed

24 files changed

+110
-59
lines changed

.env-devel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ COMPUTATIONAL_BACKEND_DEFAULT_FILE_LINK_TYPE=PRESIGNED
9797
COMPUTATIONAL_BACKEND_ON_DEMAND_CLUSTERS_FILE_LINK_TYPE=PRESIGNED
9898
DIRECTOR_V2_DEV_FEATURES_ENABLED=0
9999
DIRECTOR_V2_DYNAMIC_SCHEDULER_CLOSE_SERVICES_VIA_FRONTEND_WHEN_CREDITS_LIMIT_REACHED=1
100-
DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL=0
100+
DIRECTOR_V2_DYNAMIC_SIDECAR_SLEEP_AFTER_CONTAINER_REMOVAL=PT0S
101101
DIRECTOR_V2_GENERIC_RESOURCE_PLACEMENT_CONSTRAINTS_SUBSTITUTIONS='{}'
102102
DIRECTOR_V2_HOST=director-v2
103103
DIRECTOR_V2_LOGLEVEL=INFO
@@ -117,7 +117,7 @@ DYNAMIC_SIDECAR_API_SAVE_RESTORE_STATE_TIMEOUT=3600
117117
# DIRECTOR_V2 ----
118118
DYNAMIC_SCHEDULER_LOGLEVEL=DEBUG
119119
DYNAMIC_SCHEDULER_PROFILING=1
120-
DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT=3600
120+
DYNAMIC_SCHEDULER_STOP_SERVICE_TIMEOUT=PT1H
121121

122122
FUNCTION_SERVICES_AUTHORS='{"UN": {"name": "Unknown", "email": "[email protected]", "affiliation": "unknown"}}'
123123

scripts/maintenance/computational-clusters/autoscaled_monitor/cli.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
DEFAULT_COMPUTATIONAL_EC2_FORMAT_WORKERS,
1414
DEFAULT_DYNAMIC_EC2_FORMAT,
1515
DEPLOY_SSH_KEY_PARSER,
16+
UNIFIED_SSH_KEY_PARSE,
1617
wallet_id_spec,
1718
)
1819
from .ec2 import autoscaling_ec2_client, cluster_keeper_ec2_client
@@ -78,16 +79,12 @@ def main(
7879

7980
# locate ssh key path
8081
for file_path in deploy_config.glob("**/*.pem"):
81-
if any(_ in file_path.name for _ in ["license", "pkcs8"]):
82-
continue
83-
# very bad HACK where the license file contain openssh in the name
84-
if (
85-
any(_ in f"{file_path}" for _ in ("sim4life.io", "osparc-master"))
86-
and "openssh" not in f"{file_path}"
87-
):
82+
if any(_ in file_path.name for _ in ["license", "pkcs8", "dask"]):
8883
continue
8984

90-
if DEPLOY_SSH_KEY_PARSER.parse(f"{file_path.name}") is not None:
85+
if DEPLOY_SSH_KEY_PARSER.parse(
86+
f"{file_path.name}"
87+
) is not None or UNIFIED_SSH_KEY_PARSE.parse(f"{file_path.name}"):
9188
rich.print(
9289
f"will be using following ssh_key_path: {file_path}. "
9390
"TIP: if wrong adapt the code or manually remove some of them."

scripts/maintenance/computational-clusters/autoscaled_monitor/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def wallet_id_spec(text) -> None | int:
2222
DEPLOY_SSH_KEY_PARSER: Final[parse.Parser] = parse.compile(
2323
r"{prefix}-{random_name}.pem"
2424
)
25+
UNIFIED_SSH_KEY_PARSE: Final[parse.Parser] = parse.compile("sshkey.pem")
2526

2627
MINUTE: Final[int] = 60
2728
HOUR: Final[int] = 60 * MINUTE

services/agent/src/simcore_service_agent/core/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings):
5353
AGENT_VOLUMES_CLEANUP_INTERVAL: timedelta = Field(
5454
timedelta(minutes=1), description="interval for running volumes removal"
5555
)
56-
AGENT_VOLUMES_CLENUP_BOOK_KEEPING_INTERVAL: timedelta = Field(
56+
AGENT_VOLUMES_CLEANUP_BOOK_KEEPING_INTERVAL: timedelta = Field(
5757
timedelta(minutes=1),
5858
description=(
5959
"interval at which to scan for unsued volumes and keep track since "
6060
"they were detected as being unused"
6161
),
6262
)
63-
AGENT_VOLUMES_CLENUP_REMOVE_VOLUMES_INACTIVE_FOR: timedelta = Field(
63+
AGENT_VOLUMES_CLEANUP_REMOVE_VOLUMES_INACTIVE_FOR: timedelta = Field(
6464
timedelta(minutes=65),
6565
description=(
6666
"if a volume is unused for more than this interval it can be removed. "

services/agent/src/simcore_service_agent/services/volumes_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ async def _on_startup() -> None:
174174

175175
volumes_manager = VolumesManager(
176176
app=app,
177-
book_keeping_interval=settings.AGENT_VOLUMES_CLENUP_BOOK_KEEPING_INTERVAL,
177+
book_keeping_interval=settings.AGENT_VOLUMES_CLEANUP_BOOK_KEEPING_INTERVAL,
178178
volume_cleanup_interval=settings.AGENT_VOLUMES_CLEANUP_INTERVAL,
179-
remove_volumes_inactive_for=settings.AGENT_VOLUMES_CLENUP_REMOVE_VOLUMES_INACTIVE_FOR.total_seconds(),
179+
remove_volumes_inactive_for=settings.AGENT_VOLUMES_CLEANUP_REMOVE_VOLUMES_INACTIVE_FOR.total_seconds(),
180180
)
181181
volumes_manager.set_to_app_state(app)
182182
await volumes_manager.setup()

services/static-webserver/client/source/class/osparc/file/FileDrop.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ qx.Class.define("osparc.file.FileDrop", {
102102
}
103103
}
104104
return files;
105-
}
105+
},
106+
107+
ONE_FILE_ONLY: qx.locale.Manager.tr("Only one file at a time is accepted.") + "<br>" + qx.locale.Manager.tr("Please zip all files together."),
106108
},
107109

108110
events: {
@@ -299,7 +301,7 @@ qx.Class.define("osparc.file.FileDrop", {
299301
pos: this.__pointerFileEventToScreenPos(e)
300302
});
301303
} else {
302-
osparc.FlashMessenger.getInstance().logAs(this.tr("Only one file at a time is accepted."), "ERROR");
304+
osparc.FlashMessenger.getInstance().logAs(osparc.file.FileDrop.ONE_FILE_ONLY, "ERROR");
303305
}
304306
} else {
305307
osparc.FlashMessenger.getInstance().logAs(this.tr("Folders are not accepted. You might want to upload a zip file."), "ERROR");

services/static-webserver/client/source/class/osparc/file/FilePicker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ qx.Class.define("osparc.file.FilePicker", {
417417
},
418418

419419
uploadPendingFiles: function(files) {
420-
if (files.length > 0) {
420+
if (files.length) {
421421
if (files.length === 1) {
422422
const fileUploader = new osparc.file.FileUploader(this.getNode());
423423
fileUploader.addListener("uploadAborted", () => this.__resetOutput());
@@ -428,7 +428,7 @@ qx.Class.define("osparc.file.FilePicker", {
428428
fileUploader.retrieveUrlAndUpload(files[0]);
429429
return true;
430430
}
431-
osparc.FlashMessenger.getInstance().logAs(this.tr("Only one file is accepted"), "ERROR");
431+
osparc.FlashMessenger.getInstance().logAs(osparc.file.FileDrop.ONE_FILE_ONLY, "ERROR");
432432
}
433433
return false;
434434
},

services/static-webserver/client/source/class/osparc/form/renderer/PropForm.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ qx.Class.define("osparc.form.renderer.PropForm", {
3636
},
3737

3838
events: {
39+
"highlightEdge": "qx.event.type.Data",
3940
"linkFieldModified": "qx.event.type.Data",
4041
"fileRequested": "qx.event.type.Data",
4142
"filePickerRequested": "qx.event.type.Data",
@@ -928,6 +929,17 @@ qx.Class.define("osparc.form.renderer.PropForm", {
928929
nodeUuid: fromNodeId,
929930
output: fromPortId
930931
};
932+
const highlightEdgeUI = highlight => {
933+
this.fireDataEvent("highlightEdge", {
934+
highlight,
935+
toNodeId: this.getNode().getNodeId(),
936+
toPortId,
937+
fromNodeId,
938+
fromPortId,
939+
});
940+
};
941+
ctrlLink.addListener("mouseover", () => highlightEdgeUI(true));
942+
ctrlLink.addListener("mouseout", () => highlightEdgeUI(false));
931943

932944
const workbench = study.getWorkbench();
933945
const fromNode = workbench.getNode(fromNodeId);

services/static-webserver/client/source/class/osparc/info/StudyMedium.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ qx.Class.define("osparc.info.StudyMedium", {
162162
const title = this.tr("Study Information");
163163
const width = osparc.info.CardLarge.WIDTH;
164164
const height = osparc.info.CardLarge.HEIGHT;
165-
osparc.ui.window.Window.popUpInWindow(studyDetails, title, width, height);
165+
osparc.ui.window.Window.popUpInWindow(studyDetails, title, width, height).set({
166+
maxHeight: height
167+
});
166168
}
167169
}
168170
});

services/static-webserver/client/source/class/osparc/metadata/ServicesInStudy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ qx.Class.define("osparc.metadata.ServicesInStudy", {
150150
const title = this.tr("Service information");
151151
const width = osparc.info.CardLarge.WIDTH;
152152
const height = osparc.info.CardLarge.HEIGHT;
153-
osparc.ui.window.Window.popUpInWindow(serviceDetails, title, width, height);
153+
osparc.ui.window.Window.popUpInWindow(serviceDetails, title, width, height).set({
154+
maxHeight: height
155+
});
154156
}, this);
155157
this._servicesGrid.add(infoButton, {
156158
row: i,

0 commit comments

Comments
 (0)