posit-dev / posit-dev/images-shared
Fix handling of unknown build OSes to not produce errors
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 22
Description
We should anticipate end users utilizing any variety of base operating systems that we may not have coded in as BuildOS objects to bakery. Currently, attempting to load a project with an arbitrary OS will result in an error because the build_os.image_tag attribute will be None in ImageVariant.load. We should fix this behavior so users are warned on utilizing an arbitrary OS, but any operations performed with an arbitrary OS still succeed.
How to Reproduce
- Create a temp directory to test in and use it as working directory.
- Run
bakery create project. - Run
bakery create image test. - Change extension on
Containerfile.jinja2toContainerfile.randomos.jinja2. (See #108) - Run
bakery create version test 1.0.0. This will propagate an error during tag rendering because attributes for theBuildOSobject are not set.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ImageVariant.load and the tag-rendering path used by bakery create version test 1.0.0; compare how known BuildOS objects are handled. Done means an unrecognized Containerfile..jinja2 produces a warning instead of an error and the create-version operation succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100