Skip to content

inherits.component only accepts one path slash instead of several #333

Closed

Description

@hypnotisttom

Describe the Bug

I want to organize my components with folders. When I attempted to create something like path/to/component, atmos failed writing out the variables. What I noticed is the variable path was taking one of the slashes and trying to use that. When I changed it to something like path/component (i.e. only 1 slash), it worked.

Expected Behavior

Atmos should accept multiple (or at least a reasonable number of) paths in a inherits.component string.

Steps to Reproduce

  1. Create a path such as components/terraform/path/to/component
  2. Create a stack that inherits from that component
  3. Run the plan

Plan will fail with error like:

Writing the variables to file:
components/terraform/path/to/component/self-ue2-eng-path/to-mycomponent.terraform.tfvars.json
open components/terraform/path/to/component/self-ue2-eng-path/to-mycomponent.terraform.tfvars.json: no such file or directory

If I instead use path/component, the variable line works and says:

Writing the variables to file:
components/terraform/path/component/self-ue2-eng-path-mycomponent.terraform.tfvars.json

Screenshots

No response

Environment

Linux
Atmos version 1.24.0

Additional Context

No response

Activity

  1. added
    bug
    on Mar 1, 2023
  2. aknysh commented on Mar 1, 2023

    @aknysh
    Member

    hypnotisttom thanks for reporting this.
    I can confirm that the issue exists, and we'll fix it.
    (it's not related to "inherits.component string" though, it's related to the paths)

  3. hypnotisttom commented on Mar 1, 2023

    @hypnotisttom
    Author

    You are the best Andriy Knysh (@aknysh)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions