posit-dev / posit-dev/images-shared

[Spike] Investigate using YAML anchors in `bakery.yaml`

Open
#164 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cvp:0 docker docker/tools enhancement priority/medium python tdp:1
Dominant language
Python
Stars
2
Forks
0
Avg merge
4d 13h
Merged PRs (30d)
22

Description

This is a possible solution for the issues @bschwedler pointed out with reusing OS and variant definitions in bakery.yaml. I know that ruamel.yaml has support for YAML anchors which could make using common patterns in the config easier and more clear than trying to implement the same global/granular override/extend patterns we've applied to things such as registries.


Probably indent this under images: variants:

Can variants be specified at the top-level of the bakery.yaml file? If not, is this something we might want to add in the future?

Originally posted by @bschwedler in https://github.com/posit-dev/images-shared/pull/159#discussion_r2303933872


Thinking through our discussion of having an OS lookup.

In the future, it may be useful to make an OS list a top-level item in the bakery.yaml file, then this could be simplified to take either a string, and if it's a string, look up the definition from elsewhere.

This would be similar in concept to having variants at the top level.

Originally posted by @bschwedler in https://github.com/posit-dev/images-shared/pull/159#discussion_r2303953497

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the existing bakery.yaml structure and the linked pull request discussion first. Investigate ruamel.yaml anchor support and whether variants or OS definitions can be placed at the top level, then record the supported approach and its intended configuration shape as the outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, yaml
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.