Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing trace record meta info in the task context #5402

Conversation

jorgee
Copy link
Contributor

@jorgee jorgee commented Oct 15, 2024

When retry trace record is generated and included in the task context with variable trace

In the first attempt, trace is null. I tried to set a partial trace record for the first attempt generating the trace record just after the creation of the TaskHandler. But the evaluation of the directives is executed before the generation of the first TaskHandler at executor.submit. So, the value was null. One alternative, could be to move the generation of the trace record to the TaskRun but it implies to move some data such as the status, start and stop time in the TaskRun.

Included a suggestion for documentation

@jorgee jorgee linked an issue Oct 15, 2024 that may be closed by this pull request
Copy link

netlify bot commented Oct 15, 2024

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit 77a7723
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/6718c72910c2d50008d49001
😎 Deploy Preview https://deploy-preview-5402--nextflow-docs-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pditommaso
Copy link
Member

Embarrassingly simple! tagging @luisas for visibility

@pditommaso
Copy link
Member

what if accessing trace in the script context?

@jorgee
Copy link
Contributor Author

jorgee commented Oct 16, 2024

what if accessing trace in the script context?

I though it was working in a similarly as in the directives, but it fails with No such variable. I need to add a default trace value, as null or empty TraceRecord. In the first case, users case easily check if there is no previous trace as in the example. @pditommaso what do you think?

docs/process.md Outdated Show resolved Hide resolved
@jorgee
Copy link
Contributor Author

jorgee commented Oct 17, 2024

I have done an update setting the trace record in task.previousTrace if you finally think it is better to have task.lastTrace, I can easily do. I have also included the access to the trace in the script context and updated the documentation.

@jorgee jorgee marked this pull request as ready for review October 18, 2024 06:14
@jorgee jorgee requested a review from a team as a code owner October 18, 2024 06:14
@jorgee jorgee force-pushed the 5396-consider-exposing-trace-record-meta-info-in-the-task-context branch from 1e4c613 to 19289c0 Compare October 22, 2024 07:19
docs/process.md Outdated Show resolved Hide resolved
Signed-off-by: Paolo Di Tommaso <[email protected]>
Copy link
Contributor

@christopher-hakkaart christopher-hakkaart left a comment

Choose a reason for hiding this comment

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

Suggestions to shorten sentences.

docs/process.md Outdated Show resolved Hide resolved
docs/process.md Outdated Show resolved Hide resolved
jorgee and others added 4 commits October 22, 2024 12:39
Co-authored-by: Christopher Hakkaart <[email protected]>
Signed-off-by: Jorge Ejarque <[email protected]>
Co-authored-by: Christopher Hakkaart <[email protected]>
Signed-off-by: Jorge Ejarque <[email protected]>
…sor.groovy

Co-authored-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Jorge Ejarque <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
@pditommaso pditommaso merged commit ffdd381 into master Oct 23, 2024
7 of 12 checks passed
@pditommaso pditommaso deleted the 5396-consider-exposing-trace-record-meta-info-in-the-task-context branch October 23, 2024 10:02
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.

Consider exposing trace record meta info in the task context
4 participants