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

Cleanup Docker interpolation context for version tags #14023

Closed
kaos opened this issue Dec 29, 2021 · 0 comments · Fixed by #14376
Closed

Cleanup Docker interpolation context for version tags #14023

kaos opened this issue Dec 29, 2021 · 0 comments · Fixed by #14376
Assignees

Comments

@kaos
Copy link
Member

kaos commented Dec 29, 2021

Currently, the context gets values on the form <stage>.tag = <tag>, where stage is either baseimage, stageN or <stage name>.

Given the dynamic nature of this key, it is not well suited to use as a root key for the context, as it may conflict with other values. e.g. if you have a stage named "build_args", it would collide with the context value for build args.

Proposing to deprecate the current layout in 2.10 and removing in 2.11, in favour of putting them under a tags key instead tags.<stage> = <tag>:

{
  "tags": {
    "baseimage": "latest",
    "stage0": "latest",
    "custom-stage-name": "1.2",
    ...
  },
  "build_args": {...},
  ...
}
@kaos kaos self-assigned this Dec 29, 2021
kaos added a commit that referenced this issue Feb 8, 2022
…stage>`. (#14376)

Fixes #14023 

Currently, the context gets values on the form `<stage>.tag = <tag>`, where stage is either `baseimage`, `stageN` or `<stage name>`. 

Given the dynamic nature of this key, it is not well suited to use as a root key for the context, as it may conflict with other values. e.g. if you have a stage named "build_args", it would collide with the context value for build args.

This PR deprecates the current layout in 2.10, in favour of putting them under a `tags` key instead `tags.<stage> = <tag>`:

```python
{
  "tags": {
    "baseimage": "latest",
    "stage0": "latest",
    "custom-stage-name": "1.2",
    ...
  },
  "build_args": {...},
  ...
}
```
kaos added a commit to kaos/pants that referenced this issue Feb 8, 2022
…stage>`. (pantsbuild#14376)

Fixes pantsbuild#14023 

Currently, the context gets values on the form `<stage>.tag = <tag>`, where stage is either `baseimage`, `stageN` or `<stage name>`. 

Given the dynamic nature of this key, it is not well suited to use as a root key for the context, as it may conflict with other values. e.g. if you have a stage named "build_args", it would collide with the context value for build args.

This PR deprecates the current layout in 2.10, in favour of putting them under a `tags` key instead `tags.<stage> = <tag>`:

```python
{
  "tags": {
    "baseimage": "latest",
    "stage0": "latest",
    "custom-stage-name": "1.2",
    ...
  },
  "build_args": {...},
  ...
}
```

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant