Skip to content

Fix validUntil value for free c2d.#899

Merged
mariacarmina merged 4 commits intomainfrom
fix-validUntil-for-free-c2d
Mar 31, 2025
Merged

Fix validUntil value for free c2d.#899
mariacarmina merged 4 commits intomainfrom
fix-validUntil-for-free-c2d

Conversation

@mariacarmina
Copy link
Copy Markdown
Contributor

@mariacarmina mariacarmina commented Mar 29, 2025

Fixes #900 .

Changes proposed in this PR:

  • fix workflow for system tests to avoid infinite loop
  • update logic for validUntil:
    If validUntil exceeds env.maxJobDuration -> validUntil == env.maxJobDuration
  • if validUntil is not provided (because it was set with null on free start compute task) -> fallback to env.maxJobDuration if exists, if env.maxJobDuration does not exist -> validUntil remains null.

@mariacarmina
Copy link
Copy Markdown
Contributor Author

mariacarmina commented Mar 29, 2025

Before validUntil modification:
Screenshot 2025-03-29 at 22 23 36
where validUntil was identical with dateCreated

After validUntil modification:
Screenshot 2025-03-29 at 21 59 04
Now the alogorithm printed the whole steps, meaning that the validUntil was sufficient.

Copy link
Copy Markdown
Contributor

@giurgiur99 giurgiur99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@alexcos20
Copy link
Copy Markdown
Member

Hold this for a moment, please

@alexcos20
Copy link
Copy Markdown
Member

Please checkout

let maxDuration = null
if (env.free.maxJobDuration) {
maxDuration = env.free.maxJobDuration
}
const response = await engine.startComputeJob(
task.datasets,
task.algorithm,
task.output,
task.environment,
task.consumerAddress,
maxDuration,
task.resources,
{
chainId: null,
token: null,
lockTx: null,
claimTx: null
}
)

@mariacarmina mariacarmina merged commit bc5558a into main Mar 31, 2025
13 checks passed
@mariacarmina mariacarmina deleted the fix-validUntil-for-free-c2d branch March 31, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ValidUntil is null which makes expiration timestamp identical with creation date of C2D job

3 participants