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

generate: fix "invalid CSV name" bug #4276

Conversation

estroz
Copy link
Member

@estroz estroz commented Dec 4, 2020

Description of the change:

  • internal/generate/clusterserviceversion: use an empty base if no CSVs are in the collector
  • internal/generate/clusterserviceversion/bases: auto-migrate base name
  • docs/olm-integration: document updated behavior

Motivation for the change: This commit fixes a bug caused by an invalid CSV name being generated. operator-sdk generate kustomize manifests will auto-migrate a base CSV's name to <package name>.v<version> if it ends in .vX.Y.Z. operator-sdk generate <bundle|packagemanifests will always persist base CSV metadata unless --version or --from-version are set.

/kind bug

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 4, 2020
@estroz
Copy link
Member Author

estroz commented Dec 4, 2020

/cc @jmrodri @varshaprasad96

`operator-sdk generate kustomize manifests` will auto-migrate a base
CSV's name to `<package name>.v<version>` if it ends in `.vX.Y.Z`.
`operator-sdk generate <bundle|packagemanifests` will always persist
base CSV metadata unless `--version` or `--from-version` are set.

internal/generate/clusterserviceversion: use an empty base if no
CSVs are in the collector

internal/generate/clusterserviceversion/bases: auto-migrate base name

docs/olm-integration: document updated behavior
@estroz estroz force-pushed the feature/read-csv-from-kustomize-build branch from f8397a1 to 4e9ef97 Compare December 4, 2020 07:52
Copy link
Member

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2020
@estroz estroz merged commit a9c8051 into operator-framework:master Dec 4, 2020
estroz pushed a commit to estroz/operator-sdk that referenced this pull request Dec 7, 2020
This commit fixes a bug caused by an invalid CSV name being generated. 
`operator-sdk generate kustomize manifests` will auto-migrate a base
CSV's name to `<package name>.v<version>` if it ends in `.vX.Y.Z`.
`operator-sdk generate <bundle|packagemanifests` will always persist
base CSV metadata unless `--version` or `--from-version` are set.

internal/generate/clusterserviceversion: use an empty base if no
CSVs are in the collector

internal/generate/clusterserviceversion/bases: auto-migrate base name

docs/olm-integration: document updated behavior

Co-authored-by: anmol372 <[email protected]>
reinvantveer pushed a commit to reinvantveer/operator-sdk that referenced this pull request Feb 5, 2021
This commit fixes a bug caused by an invalid CSV name being generated. 
`operator-sdk generate kustomize manifests` will auto-migrate a base
CSV's name to `<package name>.v<version>` if it ends in `.vX.Y.Z`.
`operator-sdk generate <bundle|packagemanifests` will always persist
base CSV metadata unless `--version` or `--from-version` are set.

internal/generate/clusterserviceversion: use an empty base if no
CSVs are in the collector

internal/generate/clusterserviceversion/bases: auto-migrate base name

docs/olm-integration: document updated behavior

Co-authored-by: anmol372 <[email protected]>
Signed-off-by: reinvantveer <[email protected]>
rearl-scwx pushed a commit to rearl-scwx/operator-sdk that referenced this pull request Feb 5, 2021
This commit fixes a bug caused by an invalid CSV name being generated. 
`operator-sdk generate kustomize manifests` will auto-migrate a base
CSV's name to `<package name>.v<version>` if it ends in `.vX.Y.Z`.
`operator-sdk generate <bundle|packagemanifests` will always persist
base CSV metadata unless `--version` or `--from-version` are set.

internal/generate/clusterserviceversion: use an empty base if no
CSVs are in the collector

internal/generate/clusterserviceversion/bases: auto-migrate base name

docs/olm-integration: document updated behavior

Co-authored-by: anmol372 <[email protected]>
Signed-off-by: rearl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants