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

feat: improve fingerprint and output with wildcard #1808

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vmaerten
Copy link
Member

@vmaerten vmaerten commented Sep 15, 2024

Fixes :

It also improve the output, now the task with wildcard replaced are displayed :

image

I was struggled a bit with the naming. I choose Fullname but feel free if you have a better idea.

@vmaerten vmaerten force-pushed the feat/improve-fingerprint-with-wildcard branch from feb5d44 to dab7cb3 Compare September 15, 2024 10:32
@vmaerten vmaerten marked this pull request as ready for review September 15, 2024 10:35
@@ -447,6 +446,7 @@ func (e *Executor) GetTask(call *ast.Call) (*ast.Task, error) {
call.Vars = &ast.Vars{}
}
call.Vars.Set("MATCH", ast.Var{Value: matchingTasks[0].Wildcards})
matchingTasks[0].Task.FullName = call.Task
Copy link
Member

Choose a reason for hiding this comment

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

It looks like we'd be getting a race condition here, no? Parallel calls to this task would be overiding the same attribute.

Tricky to implement this in another way, though, I know...

Copy link
Member Author

Choose a reason for hiding this comment

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

You are totally right. The same task with a wildcard, used twice in a dep (ran in parallel) the first one will be overridden by the last

Put this in draft until I find a solution for it

Thanks!

@vmaerten vmaerten removed the request for review from pd93 October 20, 2024 13:06
@vmaerten vmaerten marked this pull request as draft October 20, 2024 13:07
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.

Wildcards and fingerprinting: consider to automatically concat the wildcard parameter on the cache key
2 participants