← Back to issue list

snapcraft init with parts fails with required options

View original Github issue

Metadata

Project
snapcraft
Number
#81
Type
issue
State
closed
Author
plars
Labels
—
Created
Updated
Closed

Current evaluation

Migrated to Launchpad bug #1516775; obsolete init part arguments were later removed in commit b0d15b0e.

Resolution: closed superseded

Reason: The closing maintainer comment moved the report to Launchpad bug #1516775 rather than fixing it on GitHub. Commit b0d15b0e later removed the legacy part arguments from init.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When running snapcraft init with a part specified, there's no way right I can see to specify the required options. Rather than prefilling these options with some sort of placeholder, we get an exception: example: $ snapcraft init make Traceback (most recent call last): File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 65, in **init** self._load_code(plugin_name, properties) File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 91, in _load_code options = _make_options(properties, plugin.schema()) File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 247, in _make_options jsonschema.validate(properties, schema) File "/usr/lib/python3/dist-packages/jsonschema/validators.py", line 432, in validate cls(schema, _args, *_kwargs).validate(instance) File "/usr/lib/python3/dist-packages/jsonschema/validators.py", line 117, in validate raise error jsonschema.exceptions.ValidationError: 'source' is a required property Failed validating 'required' in schema: {'$schema': 'http://json-schema.org/draft-04/schema#', 'properties': {'source': {'type': 'string'}, 'source-branch': {'default': '', 'type': 'string'}, 'source-tag': {'default': '', 'type:': 'string'}, 'source-type': {'default': '', 'type': 'string'}}, 'required': ['source'], 'type': 'object'} On instance: {} During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/snapcraft", line 33, in <module> snapcraft.main.main() File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 147, in main args.func(args) File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 58, in init part = lifecycle.load_plugin(part_name, part_name) File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 274, in load_plugin return PluginHandler(plugin_name, part_name, properties) File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 68, in **init** part_name, e.message)) snapcraft.lifecycle.PluginError: properties failed to load for make: 'source' is a required property

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Migrated to Launchpad bug #1516775; obsolete init part arguments were later removed in commit b0d15b0e.
stealth/space-bunny-alpha — closed superseded Migrated to Launchpad bug #1516775; legacy part arguments were later removed from init in commit b0d15b0e.
qwen/qwen3.6-35b-a3b — — Migrated to Launchpad bug tracker https://bugs.launchpad.net/snapcraft/+bug/1516775. Closed and superseded by upstream tracking due to the missing required options handling in snapcraft init.
qwen/qwen3.6-35b-a3b — — Reported crash during snapcraft init with required part options was migrated to Launchpad bug 1516775 and closed. The report was superseded by the upstream tracker migration.
qwen/qwen3.6-35b-a3b — — Reporting a crash when snapcraft init processes parts with required options was closed and superseded by migration to Launchpad bug 1516775. No code changes were applied.
qwen3.6-35b-a3b-mtp-q6 — — Superseded by migration to Launchpad bug 1516775. The report details a crash when running snapcraft init with a part due to missing required properties. No code changes were applied.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1516775 snapcraft init with parts fails with required options snapcraft (launchpad) closed Legacy "snapcraft init <part>" support was removed in commit b0d15b0e9, pending redesign for the new CLI; the maintainer closed the report as intentional.
86%