Skip to content

validator should not return an error if no default command, should return warning instead #577

@yangcao77

Description

@yangcao77

/kind bug

Which area this bug is related to?

/area api
/area library

What versions of software are you using?

Operating System:

Go Pkg Version:

Bug Summary

Describe the bug:

If devfile has no default command for each group kind, the validator error out.

To Reproduce:

use the validator on this devfile:https://raw.githubusercontent.com/yangcao77/web-coolstore/completed-sample/devfile.yaml

Expected behavior

since the devfile may contain multiple projects, it may not have default commands. The validation rule says if no default command defined, a warning will be displayed. but the current validator returns an error.

{build, run, test, debug}, each kind of group can only have one default command associated with it. If there are multiple commands of the same kind without a default, a warning will be displayed.

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable.

run parser from devfile/library on https://raw.githubusercontent.com/yangcao77/web-coolstore/completed-sample/devfile.yaml

parsing devfile from ./devfile.yaml

command group build error - there should be exactly one default command, currently there is no default command
command group run error - there should be exactly one default command, currently there is no default command

Additional context

Any workaround?

Suggestion on how to fix the bug

Metadata

Metadata

Assignees

Labels

area/apiEnhancement or issue related to the api/devfile specificationarea/libraryCommon devfile library for interacting with devfileskind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions