Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/cli/bootstrap_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Sources use the same syntax as '` + string(constants.CLIExtensionPrefix) + ` add
return fmt.Errorf("--repo is required. Example: %s --repo github/gh-aw\n\nRun '%s --help' for usage information", cmd.CommandPath(), cmd.CommandPath())
}

bootstrapLog.Printf("Bootstrap command invoked: repo=%s, createRepo=%t, planOnly=%t, noCompile=%t, sources=%d", repo, createRepo, planOnly, noCompile, len(args))
return RunBootstrap(BootstrapOptions{
Ctx: cmd.Context(),
Repo: repo,
Expand Down
2 changes: 2 additions & 0 deletions pkg/cli/bootstrap_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func printBootstrapConfigTODO(w io.Writer, profile *resolvedBootstrapProfile) {
return
}

bootstrapLog.Printf("Printing bootstrap config TODO: package=%s, actions=%d", profile.PackageID, len(profile.Profile.Config))
fmt.Fprintln(w, "")
fmt.Fprintln(w, console.FormatInfoMessage("Post-installation steps from "+profile.PackageID+":"))

Expand Down Expand Up @@ -77,6 +78,7 @@ func executeBootstrapConfigForAdd(ctx context.Context, repo string, sources []st
return errors.New("--repo OWNER/REPO is required to apply bootstrap config steps interactively")
}

bootstrapLog.Printf("Applying bootstrap config for add: repo=%s, package=%s, actions=%d, useCopilotRequests=%t", repo, profile.PackageID, len(profile.Profile.Config), useCopilotRequests)
fmt.Fprintln(os.Stderr, "")
fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Applying post-installation steps from "+profile.PackageID+"..."))

Expand Down
4 changes: 4 additions & 0 deletions pkg/cli/bootstrap_profile_manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type resolvedBootstrapProfile struct {
}

func resolveBootstrapProfileFromSources(ctx context.Context, sources []string) (*resolvedBootstrapProfile, error) {
bootstrapLog.Printf("Resolving bootstrap profile from %d source(s)", len(sources))
profiles := make([]*resolvedBootstrapProfile, 0, 1)
seenPackageIDs := make(map[string]struct{})

Expand Down Expand Up @@ -100,9 +101,11 @@ func resolveBootstrapProfileFromSources(ctx context.Context, sources []string) (
}

if len(profiles) == 0 {
bootstrapLog.Print("No bootstrap profile matched the selected sources")
return nil, nil
}
if len(profiles) == 1 {
bootstrapLog.Printf("Resolved bootstrap profile: packageID=%s, actions=%d", profiles[0].PackageID, len(profiles[0].Profile.Config))
return profiles[0], nil
}

Expand Down Expand Up @@ -208,6 +211,7 @@ func extractManifestConfig(value any, manifestPath string) (*repositoryPackageBo
bootstrap.Config = append(bootstrap.Config, action)
}

bootstrapLog.Printf("Extracted bootstrap manifest config: actions=%d, manifest=%s", len(bootstrap.Config), manifestPath)
return bootstrap, nil
}

Expand Down
7 changes: 7 additions & 0 deletions pkg/cli/bootstrap_profile_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func buildBootstrapProfilePlan(ctx context.Context, repo string, profile *resolv
}
}

bootstrapLog.Printf("Built bootstrap profile plan: repo=%s, needsMutation=%t, planLines=%d", repo, needsMutation, len(lines))
return needsMutation, lines, nil
}

Expand All @@ -154,6 +155,8 @@ func executeBootstrapProfile(ctx context.Context, config bootstrapProfileRunConf
return nil
}

bootstrapLog.Printf("Executing bootstrap profile: repo=%s, actions=%d, useCopilotRequests=%t", config.Repo, len(config.Profile.Profile.Config), config.UseCopilotRequests)

state, err := bootstrapProfileState(ctx, config.Repo)
if err != nil {
return err
Expand All @@ -169,9 +172,11 @@ func executeBootstrapProfile(ctx context.Context, config bootstrapProfileRunConf
return err
}
if !pending && action.Type != "handoff" {
bootstrapLog.Printf("Skipping bootstrap action (no mutation needed): type=%s", action.Type)
continue
}

bootstrapLog.Printf("Applying bootstrap action: type=%s", action.Type)
switch action.Type {
case "require-owner-type":
if err := runBootstrapRequireOwnerType(ctx, config.Repo, action); err != nil {
Expand Down Expand Up @@ -546,6 +551,7 @@ func createBootstrapGitHubApp(ctx context.Context, repo, owner, repoName, ownerT
server := &http.Server{}
redirectURL := fmt.Sprintf("http://%s/callback", listener.Addr().String())
manifest := buildBootstrapGitHubAppManifest(action, appName, homepageURL, redirectURL, description)
bootstrapLog.Printf("Creating GitHub App via browser manifest flow: appOwner=%s, appName=%s, redirectURL=%s", appOwner, appName, redirectURL)
registrationURL := buildBootstrapGitHubAppRegistrationURL(appOwner, appOwnerType, state)
registrationPage, err := renderBootstrapGitHubAppRegistrationPage(registrationURL, manifest)
if err != nil {
Expand Down Expand Up @@ -695,6 +701,7 @@ func waitForBootstrapGitHubAppInstallation(ctx context.Context, repo string, cre
if createdApp == nil || createdApp.InstallURL == "" || createdApp.Slug == "" {
return nil
}
bootstrapLog.Printf("Polling for GitHub App installation: repo=%s, slug=%s", repo, createdApp.Slug)
deadlineTimer := time.NewTimer(bootstrapProfileManifestTimeout)
defer deadlineTimer.Stop()
pollTicker := time.NewTicker(bootstrapProfileInstallPollDelay)
Expand Down
2 changes: 2 additions & 0 deletions pkg/workflow/compiler_yaml_step_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ func (c *Compiler) generateCreateAwInfo(yaml *strings.Builder, data *WorkflowDat
firewallType = "squid"
}

compilerYamlStepLifecycleLog.Printf("Generating aw_info step: engine=%s, modelConfigured=%t, version=%s, firewallEnabled=%t, staged=%s", engineID, modelConfigured, version, firewallEnabled, stagedValue)

yaml.WriteString(" - name: Generate agentic run info\n")
yaml.WriteString(" id: generate_aw_info\n")
yaml.WriteString(" env:\n")
Expand Down
Loading