← 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 tracker https://bugs.launchpad.net/snapcraft/+bug/1516775. Closed and superseded by upstream tracking due to the missing required options handling in snapcraft init.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Superseded by migration to Launchpad bug 1516775. Tracking moved externally after the report highlighted a crash when snapcraft init lacked required part options. Closed without a GitHub fix.

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 Running snapcraft init with parts requiring options triggers a jsonschema validation error. The report was closed without comments or documented resolution, indicating it was abandoned or superseded by newer versions.
83%
#1816 snapcraft update won't fetch from `SNAPCRAFT_PARTS_URI` snapcraft closed Closed without resolution or comments. Likely superseded by the linked Launchpad bug report. No fixes or code changes were applied.
74%
#1803776 snapcraft init missing a base snapcraft (launchpad) closed Closed without resolution. The base requirement for snapcraft init was later implemented in subsequent releases, superseding this report.
72%