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

Disabling content sets using YAML null values is not possible #533

Closed
spolti opened this issue Jun 5, 2019 · 2 comments

Comments

Projects
2 participants
@spolti
Copy link
Contributor

commented Jun 5, 2019

Describe the solution you'd like
The yaml's remove character is not accepted by CEKit thus not possible to remove a property from the image.yaml using overrides file.

Example: given the following image.yaml file:

schema_version: 1

name: "image-name"
version: "1.1"
from: "ubi8"
labels:
  - name: "com.redhat.component"
    value: "image"
packages:
  content_sets_file: content_sets.yml
  install:
    - java-1.8.0-openjdk-headless

And supposing we want the remove the content_sets_file property using an overrides file:

schema_version: 1

name: "rhpam-7/rhpam7-dev-apb"
from: "ansibleplaybookbundle/apb-base:v3.11"

packages:
  content_sets_file: ~

It will fail with the following message:

TypeError: join() argument must be str or bytes, not 'NoneType'

using null produces the same result.

@goldmann

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

@spolti I'll make this report specific about disabling the content sets.

@goldmann goldmann changed the title Allow unset properties in the image.yaml using overrides file Disabling content sets using YAML null values is not possible Jun 6, 2019

@goldmann

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

@goldmann goldmann added this to To do in Release 3.2.0 via automation Jun 6, 2019

@goldmann goldmann added this to the 3.2.0 milestone Jun 6, 2019

@goldmann goldmann moved this from To do to In progress in Release 3.2.0 Jun 12, 2019

goldmann added a commit to goldmann/cekit that referenced this issue Jun 12, 2019

Make it possible to remove disable content sets with null values
This adds support for removal of content sets if you use the
null values in YAML: https://yaml.org/type/null.html.

This makes it possible to override images that have content sets
defined to use the same source with other types of repositories.

Example:

packages:
  content_sets: ~

Fixes cekit#533

goldmann added a commit to goldmann/cekit that referenced this issue Jun 12, 2019

Make it possible to remove disable content sets with null values
This adds support for removal of content sets if you use the
null values in YAML: https://yaml.org/type/null.html.

This makes it possible to override images that have content sets
defined to use the same source with other types of repositories.

Example:

packages:
  content_sets: ~

Fixes cekit#533

goldmann added a commit to goldmann/cekit that referenced this issue Jun 12, 2019

Make it possible to remove disable content sets with null values
This adds support for removal of content sets if you use the
null values in YAML: https://yaml.org/type/null.html.

This makes it possible to override images that have content sets
defined to use the same source with other types of repositories.

Example:

packages:
  content_sets: ~

Fixes cekit#533

@goldmann goldmann self-assigned this Jun 14, 2019

Release 3.2.0 automation moved this from In progress to Done Jun 19, 2019

goldmann added a commit that referenced this issue Jun 19, 2019

Make it possible to remove disable content sets with null values
This adds support for removal of content sets if you use the
null values in YAML: https://yaml.org/type/null.html.

This makes it possible to override images that have content sets
defined to use the same source with other types of repositories.

Example:

packages:
  content_sets: ~

Fixes #533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.