Skip to content

Commit 2c0d2b8

Browse files
committed
merge development
2 parents a8030ca + 2b6e3a6 commit 2c0d2b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+254
-276
lines changed

CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @AhmedHanafy725 @zaelgohary @maayarosama @MohamedElmdary @Mahmoud-Emad @amiraabouhadid @AlaaElattar @0oM4R @samaradel
1+
* @AhmedHanafy725 @zaelgohary @MohamedElmdary @Mahmoud-Emad @amiraabouhadid @AlaaElattar @0oM4R @samaradel

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "2.7.0-rc2",
3+
"version": "2.7.0",
44
"npmClient": "yarn"
55
}

packages/UI/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@threefold/ui",
3-
"version": "2.7.0-rc2",
3+
"version": "2.7.0",
44
"private": false,
55
"main": "dist/threefold-ui.umd.js",
66
"publishConfig": {

packages/graphql_client/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@threefold/graphql_client",
3-
"version": "2.7.0-rc2",
3+
"version": "2.7.0",
44
"main": "./dist/node/index.js",
55
"module": "./dist/es6/index.js",
66
"exports": {
@@ -18,7 +18,7 @@
1818
"es6-build": "tsc --build tsconfig.json"
1919
},
2020
"dependencies": {
21-
"@threefold/types": "2.7.0-rc2",
21+
"@threefold/types": "2.7.0",
2222
"ts-mixer": "^6.0.2"
2323
},
2424
"devDependencies": {

packages/grid_client/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@threefold/grid_client",
33
"author": "Ahmed Hanafy",
4-
"version": "2.7.0-rc2",
4+
"version": "2.7.0",
55
"license": "ISC",
66
"homepage": "https://github.com/threefoldtech/tfgrid-sdk-ts/tree/development/packages/grid_client/README.md",
77
"repository": {
@@ -14,11 +14,11 @@
1414
"dependencies": {
1515
"@jimber/pkid": "1.0.4",
1616
"@noble/secp256k1": "^1.7.1",
17-
"@threefold/gridproxy_client": "2.7.0-rc2",
18-
"@threefold/monitoring": "2.7.0-rc2",
19-
"@threefold/rmb_direct_client": "2.7.0-rc2",
20-
"@threefold/tfchain_client": "2.7.0-rc2",
21-
"@threefold/types": "2.7.0-rc2",
17+
"@threefold/gridproxy_client": "2.7.0",
18+
"@threefold/monitoring": "2.7.0",
19+
"@threefold/rmb_direct_client": "2.7.0",
20+
"@threefold/tfchain_client": "2.7.0",
21+
"@threefold/types": "2.7.0",
2222
"algosdk": "^1.19.0",
2323
"appdata-path": "^1.0.0",
2424
"await-lock": "^2.2.2",

packages/grid_client/src/zos/zmachine.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Zmachine extends WorkloadData {
6565
@Expose() @Type(() => ZmachineNetwork) @ValidateNested() network: ZmachineNetwork;
6666
@Expose() @IsInt() @Min(0) @Max(10 * 1024 ** 4) size: number; // in bytes
6767
@Expose() @Type(() => ComputeCapacity) @ValidateNested() compute_capacity: ComputeCapacity;
68-
@Expose() @Type(() => Mount) @ValidateNested({ each: true }) mounts: Mount[];
68+
@Expose() @Type(() => Mount) @IsOptional() @ValidateNested({ each: true }) mounts: Mount[];
6969
@Expose() @IsString() @IsDefined() entrypoint: string;
7070
@Expose() env: Record<string, unknown>;
7171
@Expose() @Transform(({ value }) => (value ? true : false)) @IsBoolean() corex: boolean;

packages/grid_client/src/zos/zmachine_light.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ZmachineLight extends WorkloadData {
4444
@Expose() @Type(() => ZmachineLightNetwork) @ValidateNested() network: ZmachineLightNetwork;
4545
@Expose() @IsInt() @Min(0) @Max(10 * 1024 ** 4) size: number; // in bytes
4646
@Expose() @Type(() => ComputeCapacity) @ValidateNested() compute_capacity: ComputeCapacity;
47-
@Expose() @Type(() => Mount) @ValidateNested({ each: true }) mounts: Mount[];
47+
@Expose() @Type(() => Mount) @IsOptional() @ValidateNested({ each: true }) mounts: Mount[];
4848
@Expose() @IsString() @IsDefined() entrypoint: string;
4949
@Expose() env: Record<string, string>;
5050
@Expose() @Transform(({ value }) => (value ? true : false)) @IsBoolean() corex: boolean;

packages/grid_http_server/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@threefold/grid_http_server",
33
"author": "Ahmed Hanafy",
4-
"version": "2.7.0-rc2",
4+
"version": "2.7.0",
55
"license": "ISC",
66
"homepage": "https://github.com/threefoldtech/tfgrid-sdk-ts/blob/development/packages/grid_http_server/README.md",
77
"repository": {
@@ -12,7 +12,7 @@
1212
"access": "public"
1313
},
1414
"dependencies": {
15-
"@threefold/grid_client": "2.7.0-rc2",
15+
"@threefold/grid_client": "2.7.0",
1616
"express": "^4.21.2",
1717
"http-server": "^14.1.1",
1818
"typescript": "^4.7.4"

packages/grid_rmb_server/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@threefold/grid_rmb_server",
33
"author": "Ahmed Hanafy",
4-
"version": "2.7.0-rc2",
4+
"version": "2.7.0",
55
"license": "ISC",
66
"homepage": "https://github.com/threefoldtech/tfgrid-sdk-ts/blob/development/packages/grid_rmb_server/README.md",
77
"repository": {
@@ -12,12 +12,12 @@
1212
"access": "public"
1313
},
1414
"dependencies": {
15-
"@threefold/grid_client": "2.7.0-rc2",
16-
"@threefold/rmb_peer_server": "2.7.0-rc2",
15+
"@threefold/grid_client": "2.7.0",
16+
"@threefold/rmb_peer_server": "2.7.0",
1717
"typescript": "^4.7.4"
1818
},
1919
"devDependencies": {
20-
"@threefold/rmb_peer_client": "2.7.0-rc2",
20+
"@threefold/rmb_peer_client": "2.7.0",
2121
"ts-node": "^10.9.1"
2222
},
2323
"main": "./dist/index.js",

packages/gridproxy_client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@threefold/gridproxy_client",
3-
"version": "2.7.0-rc2",
3+
"version": "2.7.0",
44
"description": "gridproxy_client help to interact with gridproxy based on network",
55
"main": "./dist/node/public_api.js",
66
"module": "./dist/es6/public_api.js",

packages/gridproxy_client/src/builders/nodes.ts

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export interface NodesQuery {
7474
sortOrder: SortOrder;
7575
numGpu: number;
7676
hasIPv6: boolean;
77+
rentableOrRentedBy: number;
7778
}
7879

7980
const NODES_MAPPER: BuilderMapper<NodesQuery> = {
@@ -118,6 +119,7 @@ const NODES_MAPPER: BuilderMapper<NodesQuery> = {
118119
sortOrder: "sort_order",
119120
numGpu: "num_gpu",
120121
hasIPv6: "has_ipv6",
122+
rentableOrRentedBy: "rentable_or_rented_by",
121123
};
122124

123125
const NODES_VALIDATOR: BuilderValidator<NodesQuery> = {
@@ -176,6 +178,7 @@ const NODES_VALIDATOR: BuilderValidator<NodesQuery> = {
176178
sortOrder: assertString,
177179
numGpu: assertInt,
178180
hasIPv6: assertBoolean,
181+
rentableOrRentedBy: assertId,
179182
};
180183

181184
export class NodesBuilder extends AbstractBuilder<NodesQuery> {

packages/monitoring/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@threefold/monitoring",
3-
"version": "2.7.0-rc2",
3+
"version": "2.7.0",
44
"description": "Threefold monitoring package",
55
"license": "Apache-2.0",
66
"main": "./dist/node/index.js",
@@ -26,9 +26,9 @@
2626
"access": "public"
2727
},
2828
"dependencies": {
29-
"@threefold/rmb_direct_client": "2.7.0-rc2",
30-
"@threefold/tfchain_client": "2.7.0-rc2",
31-
"@threefold/types": "2.7.0-rc2",
29+
"@threefold/rmb_direct_client": "2.7.0",
30+
"@threefold/tfchain_client": "2.7.0",
31+
"@threefold/types": "2.7.0",
3232
"chalk": "4.1.2",
3333
"ts-node": "^10.9.1",
3434
"typescript": "^5.3.3",

packages/playground/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@threefold/playground",
3-
"version": "2.7.0-rc2",
3+
"version": "2.7.0",
44
"private": true,
55
"scripts": {
66
"dev": "vite",
@@ -13,11 +13,11 @@
1313
"dependencies": {
1414
"@mdi/font": "^7.2.96",
1515
"@sentry/vue": "^8.19.0",
16-
"@threefold/graphql_client": "2.7.0-rc2",
17-
"@threefold/grid_client": "2.7.0-rc2",
18-
"@threefold/gridproxy_client": "2.7.0-rc2",
19-
"@threefold/monitoring": "2.7.0-rc2",
20-
"@threefold/types": "2.7.0-rc2",
16+
"@threefold/graphql_client": "2.7.0",
17+
"@threefold/grid_client": "2.7.0",
18+
"@threefold/gridproxy_client": "2.7.0",
19+
"@threefold/monitoring": "2.7.0",
20+
"@threefold/types": "2.7.0",
2121
"@types/ip": "^1.1.3",
2222
"@types/md5": "^2.3.5",
2323
"await-lock": "^2.2.2",

packages/playground/playground-charts/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ version: 0.1.0
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "v2.7.0-rc2"
24+
appVersion: "v2.7.0"

packages/playground/playground-charts/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ image:
88
repository: ghcr.io/threefoldtech/playground
99
pullPolicy: Always
1010
# Overrides the image tag whose default is the chart appVersion.
11-
tag: "2.7.0-rc2"
11+
tag: "2.7.0"
1212

1313
env:
1414
- name: "MODE"

packages/playground/src/App.vue

+2-8
Original file line numberDiff line numberDiff line change
@@ -413,16 +413,10 @@ const routes: AppRoute[] = [
413413
tooltip: "Deploy your Virtal Machine instances.",
414414
},
415415
{
416-
title: "Orchestrators",
417-
icon: "mdi-group",
418-
route: DashboardRoutes.Deploy.Orchestrators,
419-
tooltip: "Deploy your orchestrator instances.",
420-
},
421-
{
422-
title: "Applications",
416+
title: "Labs",
423417
icon: "mdi-lightbulb-on-outline",
424418
route: DashboardRoutes.Deploy.Applications,
425-
tooltip: "Deploy ready applications on the ThreeFold grid.",
419+
tooltip: "Deploy ready labs on the ThreeFold grid.",
426420
releaseDate: new Date("2024-11-13"),
427421
},
428422
{

packages/playground/src/components/caprover_worker.vue

+2-8
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,10 @@
3232
v-model:wireguard="$props.modelValue.wireguard"
3333
/>
3434
<!-- <input-tooltip inline tooltip="" :href="manual"> -->
35-
<v-switch
36-
color="primary"
37-
inset
38-
label="Nodes rented by me (only)"
39-
v-model="$props.modelValue.rentedByMe"
40-
hide-details
41-
/>
35+
<v-switch color="primary" inset label="Rented By Me" v-model="$props.modelValue.rentedByMe" hide-details />
4236
<!-- </input-tooltip> -->
4337
<input-tooltip inline tooltip="Click to know more about dedicated machines." :href="manual.dedicated_machines">
44-
<v-switch color="primary" inset label="Rentable nodes" v-model="$props.modelValue.dedicated" hide-details />
38+
<v-switch color="primary" inset label="Rentable" v-model="$props.modelValue.dedicated" hide-details />
4539
</input-tooltip>
4640
<input-tooltip inline tooltip="Renting capacity on certified nodes is charged 25% extra.">
4741
<v-switch color="primary" inset label="Certified" v-model="$props.modelValue.certified" hide-details />

packages/playground/src/components/k8s_worker.vue

+2-8
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,10 @@
7777
/>
7878

7979
<!-- <input-tooltip inline tooltip="" :href="manual"> -->
80-
<v-switch
81-
color="primary"
82-
inset
83-
label="Nodes rented by me (only)"
84-
v-model="$props.modelValue.rentedByMe"
85-
hide-details
86-
/>
80+
<v-switch color="primary" inset label="Rented By Me" v-model="$props.modelValue.rentedByMe" hide-details />
8781
<!-- </input-tooltip> -->
8882
<input-tooltip inline tooltip="Click to know more about dedicated machines." :href="manual.dedicated_machines">
89-
<v-switch color="primary" inset label="Rentable nodes" v-model="$props.modelValue.dedicated" hide-details />
83+
<v-switch color="primary" inset label="Rentable" v-model="$props.modelValue.dedicated" hide-details />
9084
</input-tooltip>
9185

9286
<input-tooltip inline tooltip="Renting capacity on certified nodes is charged 25% extra.">

packages/playground/src/components/logged_in_landing.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,16 @@ export default {
119119
path: DashboardRoutes.Deploy.VirtualMachines,
120120
},
121121
{
122-
title: "Deploy Applications",
122+
title: "Deploy Labs",
123123
icon: "mdi-lightbulb-on-outline",
124124
text: "Deploy from a wide range of in demand solutions such as Algorand, Funkwhale, Wordpress, Discourse and much more!",
125125
path: DashboardRoutes.Deploy.Applications,
126126
},
127127
{
128-
title: "Deploy Orchestrators",
129-
icon: "mdi-group",
130-
text: "Deploy Kubernetes clusters out of the box or Caprover app/database deployment & web server manager on the Threefold Grid.",
131-
path: DashboardRoutes.Deploy.Orchestrators,
128+
title: "Domains",
129+
icon: "mdi-web-box",
130+
text: "Expose servers hosted on local machines or VMs to the public internet.",
131+
path: DashboardRoutes.Deploy.Domains,
132132
},
133133
{
134134
title: "Explore Grid Capacity",

packages/playground/src/components/node_selector/TfAutoNodeSelector.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ export default {
304304
const nodeInputValidateTask = useAsync<boolean, string, [NodeInfo | undefined]>(
305305
async node => {
306306
const nodeCapacityValid = await checkNodeCapacityPool(gridStore, node, props.filters);
307-
const rentContractValid = await validateRentContract(gridStore, node);
307+
const rentContractValid = await validateRentContract(gridStore, node, props.filters.hasGPU);
308308
309309
if (node && !isNodeValid(props.getFarm, node!, props.selectedMachines, filters.value)) {
310310
throw `Node (${node.nodeId}) is not valid.`;

packages/playground/src/components/node_selector/TfManualNodeSelector.vue

+7-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
:key="modelValue?.rentedByTwinId"
77
flat
88
:node="modelValue || placeholderNode"
9-
@update:node="$emit('update:model-value', $event as any)"
9+
@update:node="
10+
$emit('update:model-value', $event as any);
11+
validationTask.run(nodeId);
12+
"
1013
:status="
1114
validationTask.loading
1215
? 'Pending'
@@ -168,10 +171,7 @@ export default {
168171
case props.filters.dedicated && !node.dedicated:
169172
throw `Node ${nodeId} is not dedicated`;
170173
171-
case props.filters.dedicated && node.rentedByTwinId === 0:
172-
throw `Node ${nodeId} is not rented`;
173-
174-
case props.filters.dedicated && node.rentedByTwinId !== gridStore.client.twinId:
174+
case props.filters.dedicated && node.rentedByTwinId && node.rentedByTwinId !== gridStore.client.twinId:
175175
throw `Node ${nodeId} is Dedicated, but rented by someone else`;
176176
177177
case node.rentedByTwinId !== 0 && node.rentedByTwinId !== gridStore.client.twinId:
@@ -223,9 +223,6 @@ export default {
223223
throw `Node ${nodeId} doesn't have enough Storage`;
224224
}
225225
226-
await validateRentContract(gridStore, node);
227-
await checkNodeCapacityPool(gridStore, node, props.filters);
228-
229226
if (props.filters.ipv4) {
230227
const ipsCount = props.selectedMachines.filter(m => m.publicIp && m.farmId === node.farmId).length + 1;
231228
if (ipsCount > 1) {
@@ -236,6 +233,8 @@ export default {
236233
}
237234
}
238235
}
236+
await checkNodeCapacityPool(gridStore, node, props.filters);
237+
await validateRentContract(gridStore, node, props.filters.hasGPU);
239238
240239
bindModelValue(node);
241240
placeholderNode.value = undefined;

packages/playground/src/components/node_selector/TfSelectGpu.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"
2424
return-object
2525
:disabled="!$props.validNode"
26-
:hint="$props.validNode ? undefined : 'Please select a valid node to load it\'s GPU cards.'"
26+
:hint="$props.validNode ? undefined : 'Please select a valid node to load its GPU cards.'"
2727
:persistent-hint="!$props.validNode"
2828
@update:menu="opened => !opened && $props.modelValue.length === 0 && bindStatus(ValidatorStatus.Invalid)"
2929
/>

0 commit comments

Comments
 (0)