Skip to content

Bug: Resolve relative YAML include paths relative to the parent file instead of the CWD #111

@bhanucbp

Description

@bhanucbp

Problem/Opportunity

Describe the bug/problem: The current implementation of the YAML parsing module in ut-control handles the include option by resolving relative paths against the current working directory (CWD) from which the binary is executed.

Impact: If the binary execution path changes, all relative paths within the YAML configuration must be updated. This creates a brittle configuration that is difficult to maintain across different environments or directory structures.

Proposed Solution: Modify the YAML parser to resolve relative paths in an include directive relative to the directory of the parent YAML file currently being parsed.

Benefits:

Portability: Configuration folders can be moved without breaking internal references.

Consistency: The behavior aligns with standard include mechanisms in other YAML parsers and development environments.

User Experience: Users do not need to update paths every time the binary execution path changes.

Steps to reproduce

No response

Expected Behavior

Modify the YAML parser to resolve relative paths in an include directive relative to the directory of the parent YAML file currently being parsed

Actual Behavior

The current implementation of the YAML parsing module in ut-control handles the include option by resolving relative paths against the current working directory (CWD) from which the binary is executed.

Notes (Optional)

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions