Skip to content

enhancement(resolver): harden manifest.get(None) AttributeError hole #490

@yasinBursali

Description

@yasinBursali

Severity: Low
Category: Compose resolver
Platform: All
Confidence: Flagged during PR 2C review

Description

Both the built-in and user-extension loops in resolve-compose-stack.sh call
manifest.get("schema_version") and similar after parsing YAML. If the
manifest file is present but empty, yaml.safe_load returns None, and
None.get(...) raises AttributeError — which is NOT caught by the narrow
dispatch (YAMLError, JSONDecodeError, KeyError, TypeError) and falls
through to the outer except OSError (which re-raises because it doesn't
match), causing the whole resolver to crash with a stack trace.

DreamServer's "Let It Crash" philosophy technically allows this, but the
crash happens far from the user's action (resolver is an indirect
dependency), and the stack trace mentions .get() not "empty manifest
file" — hard to diagnose.

Affected file(s)

  • dream-server/scripts/resolve-compose-stack.sh — both extension loops

Suggested approach

Either (a) add if not isinstance(manifest, dict): continue after YAML parse,
or (b) catch AttributeError in the narrow dispatch alongside
KeyError/TypeError. Option (a) is more explicit.

Labels

enhancement, resolver, robustness

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions