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

solver: allow debugging specific builder steps #4410

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

tonistiigi
Copy link
Member

This adds new environment variables for allowing debugging scheduler for only specific steps. This is useful because the scheduler debugging is quite verbose so if you run it on production builds it can generate lots of data that is hard to analyze. Old behavior is unchanged.

This adds new environment variables for allowing
debugging scheduler for only specific steps. This
is useful because the scheduler debugging is quite
verbose so if you run it on production builds it can
generate lots of data that is hard to analyze. Old
behavior is unchanged.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Comment on lines +39 to +58
if !e.debug && len(debugSchedulerSteps) > 0 {
withParents := strings.HasSuffix(debugSchedulerSteps[0], "^")
name := strings.TrimSuffix(debugSchedulerSteps[0], "^")
for _, v := range debugSchedulerSteps {
if strings.Contains(name, v) {
e.debug = true
break
}
}
if !e.debug && withParents {
for _, vtx := range ed.Vertex.Inputs() {
name := strings.TrimSuffix(vtx.Vertex.Name(), "^")
for _, v := range debugSchedulerSteps {
if strings.Contains(name, v) {
e.debug = true
break
}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Do you have some examples?

iiuc it could smth like BUILDKIT_SCHEDULER_DEBUG_STEPS=unpark,^status?

Copy link
Member Author

Choose a reason for hiding this comment

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

BUILDKIT_SCHEDULER_DEBUG_STEPS=COPY foo bar^

@tonistiigi tonistiigi merged commit 5997099 into moby:master Nov 22, 2023
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.

2 participants