nokia / nokia/corteca-cli

Release 32.1.1 does not autocomplete "config set build.options.outputType", accepts arbitrary values

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
29
Forks
12
Avg merge
19h 37m
Merged PRs (30d)
2

Description

Corteca only supports three values for build.options.outputType: rootfs, oci and docker:

    options:
        # rootfs, produces a compressed root filesystem as the build output; 
        # oci, the output is an OCI image;
        # docker, for docker image output.
        outputType: rootfs

Corteca does not autocomplete the supported values for corteca config set build.options.outputType, and accepts arbitrary values both from the command line and in corteca.yaml, causing corteca build to fail:

oci-poc (main %) $ corteca config get build.options.outputType
rootfs
oci-poc (main %) $ corteca config set build.options.outputType foobar
oci-poc (main *%) $ corteca config get build.options.outputType
foobar
oci-poc (main *%) $ corteca build armv7l
[...]
Fatal error: Unknown image type: foobar

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the corteca config set build.options.outputType command and the configuration loading path used by corteca build. Check how autocomplete and validation are handled for this option. Done means the three supported values—rootfs, oci, and docker—are offered and arbitrary values are rejected from both the command line and corteca.yaml.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.