Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support anchors and aliases across YAML files in decomposed orbs #341

Open
3 tasks done
mcafaro opened this issue Oct 9, 2019 · 10 comments
Open
3 tasks done

Support anchors and aliases across YAML files in decomposed orbs #341

mcafaro opened this issue Oct 9, 2019 · 10 comments
Labels
needs-product-review The CircleCI product team need to triage this issue.

Comments

@mcafaro
Copy link

mcafaro commented Oct 9, 2019

Do you want to request a feature or report a bug?
Request a feature.

What is the current behavior?
circleci config pack produces an "unknown anchor" error when attempting to define a YAML anchor in one file and alias it in another.

Can you provide an example?

Example directory structure:

my-orb/src/
├ anchors
│ └ @anchors.yml
└ commands
  └ my-command.yml

@anchors.yml:

my-anchor: &my-anchor my-value

my-command.yml:

description: *my-anchor

running circleci config pack:

> circleci config pack src
Error: Failed trying to marshal the tree to YAML : yaml: unknown anchor 'my-anchor' referenced

What is the expected behavior?

running circleci config pack:

> circleci config pack src
anchors:
  my-anchor: my-value
commands:
  my-command:
    description: my-value

Which version of the CLI and OS are you using? Did this work in previous versions?

> circleci version
0.1.5879+416032d

I am not aware of a version where this ever worked.

@valentinsavenko
Copy link

Is there any progress on this? Especially big config files, like ours (> 1000 lines) need both, packaging and working anchors.

@marcomorain marcomorain added the needs-product-review The CircleCI product team need to triage this issue. label Mar 10, 2020
@marcomorain
Copy link
Contributor

cc @KunalJain

@gmemstr
Copy link
Contributor

gmemstr commented Jun 16, 2020

Digging a little deeper into this, although it's unlikely I'll be able to get around to implementing it until #432 is complete.

@gmemstr gmemstr self-assigned this Jun 16, 2020
@alessandroberlati
Copy link

Is there any workaround for this as of today? 🤔

@joshdholtz
Copy link

joshdholtz commented Feb 19, 2022

Hello! Just wanted to see if there was any update on this? 😊

I have a workaround where I do some manual preprocessing for merging aliases/anchors but it's a bit messy 🤷‍♂️ Would be super cool if this was able to become a builtin feature!

@juanpciceri
Copy link

Hello do you have any advance regarding this? Im facing the same issue

@gmemstr gmemstr removed their assignment Jul 3, 2022
@benoittgt
Copy link

benoittgt commented Oct 5, 2022

That's sad to tell people to upgrade and use pack but also loosing this ability. Is there any tips or direction that could be provided by CircleCI's team, so maybe one of us could implement it?

At least let us use include() for anchors files. :)

@klaukl
Copy link

klaukl commented Mar 23, 2023

Also facing the same issue. Any updates on this? Thank you!

@Jinxiansen
Copy link

Any updates?
I also want to know how to support the context/anchors declaration when executing the circleci config pack.

@KevinAnthony
Copy link

Digging a little deeper into this, although it's unlikely I'll be able to get around to implementing it until #432 is complete.

this was merged over 3 years ago, can this be worked on sometime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-product-review The CircleCI product team need to triage this issue.
Projects
None yet
Development

No branches or pull requests