Skip to content

librarian: configure should run when libraryID is not configured in state.yaml and add the entry #931

@zhumin8

Description

@zhumin8

Missed in #898 review. runConfigureCommand() is only invoked when library is not found in state.yaml

configured, err := r.detectIfLibraryConfigured(ctx)
if err != nil {
return err
}
if !configured {
if err := r.runConfigureCommand(ctx); err != nil {
return err
}
}

Then this logic leads into error

libraryID := findLibraryIDByAPIPath(r.state, r.cfg.API)
if libraryID == "" {
return errors.New("bug in Librarian: Library not found during configuration, despite being found in earlier steps")
}

Also, configure should create a LibraryState skeleton to pass down to container via configure-request.json

cc. @cuiy0006

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions