Skip to content

Commit 5cad1b0

Browse files
committed
Squashed commit of the following:
commit b48275d Author: wzrdx <128477299+wzrdx@users.noreply.github.com> Date: Fri Aug 29 18:25:28 2025 +0300 hotfix: Filter project jobs commit d5dda83 Author: wzrdx <128477299+wzrdx@users.noreply.github.com> Date: Fri Aug 29 18:07:50 2025 +0300 hotfix: Fix fetchRunningJobsWithAliases when 2 apps are deployed on 2 nodes commit d591348 Author: wzrdx <128477299+wzrdx@users.noreply.github.com> Date: Fri Aug 29 17:42:01 2025 +0300 hotfix: Use getMultiNodeEpochsRange in fetchOraclesCount commit 7118012 Merge: b0c3b3f 724652c Author: wzrdx <128477299+wzrdx@users.noreply.github.com> Date: Fri Aug 29 17:20:55 2025 +0300 Merge branch 'main' into develop commit b0c3b3f Author: wzrdx <128477299+wzrdx@users.noreply.github.com> Date: Thu Aug 28 17:50:32 2025 +0300 hotfix: Use tunneling secrets from TunnelsContext, fix the UX of deleting a tunnel with hostname commit 619c405 Author: wzrdx <128477299+wzrdx@users.noreply.github.com> Date: Thu Aug 28 15:46:19 2025 +0300 hotfix: Always fetch secrets, modify secrets feature
1 parent 1c638b8 commit 5cad1b0

File tree

2 files changed

+138
-1
lines changed

2 files changed

+138
-1
lines changed

src/lib/contexts/deployment/deployment-provider.tsx

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,139 @@ export const DeploymentProvider = ({ children }) => {
9595
}
9696
};
9797

98+
const testing = async () => {
99+
const testingApps = {
100+
'0xai_AhwJjQRyNHChWo_U5yuf89zJv200HIFeOR02SI29GlLj': {
101+
'r1-calculator_73f92ab': {
102+
initiator: '0xai_At9Swwd9yACokN8fvJBJjdhSFZ1l4KTCn1jVSSJOxnit',
103+
owner: '0x9999F6748d2C381571E66Cdccf1e9EF43640D5F8',
104+
last_config: '2025-08-21 05:35:29.787064',
105+
is_deeployed: true,
106+
deeploy_specs: {
107+
initial_target_nodes: [
108+
'0xai_AhwJjQRyNHChWo_U5yuf89zJv200HIFeOR02SI29GlLj',
109+
'0xai_Ag6uHHTTaVHn-ixE7tnrcSf5CdB09x1SR8XLNWUtEyQx',
110+
],
111+
job_id: 4,
112+
nr_target_nodes: 2,
113+
project_id: '0x6fa85db3cdae1c89de13b671f3d765b58ce21093566ddb0c51dc8ab2c43e716b',
114+
project_name: 'Ratio1-Calculator',
115+
},
116+
plugins: {
117+
CONTAINER_APP_RUNNER: [
118+
{
119+
instance: 'CONTAINER_APP_90fb03',
120+
start: '2025-08-25 19:06:05.483949',
121+
last_alive: '2025-08-29 14:42:31.198666',
122+
last_error: null,
123+
},
124+
],
125+
},
126+
},
127+
'r1-drive-app_4221042': {
128+
initiator: '0xai_A16JyAs142gvVWCPKH3d8rxck1jtkGBocHLi7tpv6WZZ',
129+
owner: '0x9999F6748d2C381571E66Cdccf1e9EF43640D5F8',
130+
last_config: '2025-08-29 13:52:34.134601',
131+
is_deeployed: true,
132+
deeploy_specs: {
133+
initial_target_nodes: [
134+
'0xai_AhwJjQRyNHChWo_U5yuf89zJv200HIFeOR02SI29GlLj',
135+
'0xai_Ag6uHHTTaVHn-ixE7tnrcSf5CdB09x1SR8XLNWUtEyQx',
136+
],
137+
job_id: 6,
138+
nr_target_nodes: 2,
139+
project_id: '0xfe46e9420803105092de28cee8122678688547e6c5163deb40d3963576410344',
140+
project_name: 'R1-Drive',
141+
},
142+
plugins: {
143+
CONTAINER_APP_RUNNER: [
144+
{
145+
instance: 'CONTAINER_APP_393292',
146+
start: '2025-08-29 13:52:34.264383',
147+
last_alive: '2025-08-29 14:42:33.485134',
148+
last_error: null,
149+
},
150+
],
151+
},
152+
},
153+
},
154+
'0xai_Ag6uHHTTaVHn-ixE7tnrcSf5CdB09x1SR8XLNWUtEyQx': {
155+
'r1-calculator_73f92ab': {
156+
initiator: '0xai_At9Swwd9yACokN8fvJBJjdhSFZ1l4KTCn1jVSSJOxnit',
157+
owner: '0x9999F6748d2C381571E66Cdccf1e9EF43640D5F8',
158+
last_config: '2025-08-21 05:35:31.737665',
159+
is_deeployed: true,
160+
deeploy_specs: {
161+
initial_target_nodes: [
162+
'0xai_AhwJjQRyNHChWo_U5yuf89zJv200HIFeOR02SI29GlLj',
163+
'0xai_Ag6uHHTTaVHn-ixE7tnrcSf5CdB09x1SR8XLNWUtEyQx',
164+
],
165+
job_id: 4,
166+
nr_target_nodes: 2,
167+
project_id: '0x6fa85db3cdae1c89de13b671f3d765b58ce21093566ddb0c51dc8ab2c43e716b',
168+
project_name: 'Ratio1-Calculator',
169+
},
170+
plugins: {
171+
CONTAINER_APP_RUNNER: [
172+
{
173+
instance: 'CONTAINER_APP_90fb03',
174+
start: '2025-08-25 19:04:43.229045',
175+
last_alive: '2025-08-29 14:42:35.933976',
176+
last_error: null,
177+
},
178+
],
179+
},
180+
},
181+
'r1-drive-app_4221042': {
182+
initiator: '0xai_A16JyAs142gvVWCPKH3d8rxck1jtkGBocHLi7tpv6WZZ',
183+
owner: '0x9999F6748d2C381571E66Cdccf1e9EF43640D5F8',
184+
last_config: '2025-08-29 13:52:35.439363',
185+
is_deeployed: true,
186+
deeploy_specs: {
187+
initial_target_nodes: [
188+
'0xai_AhwJjQRyNHChWo_U5yuf89zJv200HIFeOR02SI29GlLj',
189+
'0xai_Ag6uHHTTaVHn-ixE7tnrcSf5CdB09x1SR8XLNWUtEyQx',
190+
],
191+
job_id: 6,
192+
nr_target_nodes: 2,
193+
project_id: '0xfe46e9420803105092de28cee8122678688547e6c5163deb40d3963576410344',
194+
project_name: 'R1-Drive',
195+
},
196+
plugins: {
197+
CONTAINER_APP_RUNNER: [
198+
{
199+
instance: 'CONTAINER_APP_393292',
200+
start: '2025-08-29 13:52:37.438051',
201+
last_alive: '2025-08-29 14:42:35.968590',
202+
last_error: null,
203+
},
204+
],
205+
},
206+
},
207+
},
208+
};
209+
210+
console.log('[DeploymentProvider] Testing apps', testingApps);
211+
212+
const uniqueAppsWithAliases = _(Object.values(testingApps))
213+
.map((nodeApps) => {
214+
console.log(nodeApps);
215+
216+
return Object.entries(nodeApps).map(([alias, app]) => {
217+
return {
218+
alias,
219+
...app,
220+
};
221+
});
222+
})
223+
.flatten()
224+
.filter((app) => app.is_deeployed)
225+
.uniqBy((app) => app.alias)
226+
.value();
227+
228+
console.log('[DeploymentProvider] Unique Apps With Aliases', uniqueAppsWithAliases);
229+
};
230+
98231
const fetchRunningJobsWithAliases = async (): Promise<RunningJobWithAlias[]> => {
99232
if (!publicClient || !escrowContractAddress) {
100233
toast.error('Please connect your wallet and refresh this page.');

src/pages/deeploys/Project.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ export default function Project() {
6161

6262
try {
6363
const jobs: RunningJobWithAlias[] = await fetchRunningJobsWithAliases();
64-
setRunningJobsWithAliases(jobs);
64+
const projectJobs = jobs.filter((job) => job.projectHash === projectHash);
65+
66+
console.log('[Project] Project jobs', projectJobs);
67+
68+
setRunningJobsWithAliases(projectJobs);
6569
} catch (error) {
6670
toast.error('Failed to fetch running jobs.');
6771
} finally {

0 commit comments

Comments
 (0)