Bump operator-registry dependency#2662
Bump operator-registry dependency#2662kevinrizza wants to merge 1 commit intooperator-framework:masterfrom
Conversation
|
/lgtm |
camilamacedo86
left a comment
There was a problem hiding this comment.
See that it is not passing in the CI because the go.mod and .go.sum are not updated properly.
See; https://travis-ci.org/github/operator-framework/operator-sdk/jobs/663172166#L969
Note that you need to update the testdata framework too .
So, I'd recommend to you:
- Run go mod tidy
- Then, you need to exec the script
./hack/generate/gen-test-framework.shto update it.
5a41d35 to
da66ed5
Compare
CHANGELOG.md
Outdated
| - Upgrade the Helm dependency version from `v3.0.1` to `v3.0.2`. ([#2621](https://github.com/operator-framework/operator-sdk/pull/2621)) | ||
| - Changed the scaffolded `serveCRMetrics` to use the namespaces informed in the environment variable `WATCH_NAMESPACE` in the MultiNamespace scenario. ([#2603](https://github.com/operator-framework/operator-sdk/pull/2603)) | ||
| - Improve skip metrics logs when running the operator locally in order to make clear the information for Helm based operators. ([#2603](https://github.com/operator-framework/operator-sdk/pull/2603)) | ||
| - Bumped operator-registry dependency version to `v1.6.0` to update `bundle create` behavior. Includes adding new optional `output-dir` flag to specify a result bundle directory. |
There was a problem hiding this comment.
Could you please update it as follows?
In the changes section:
- Upgrade the `operator-registry` dependency version from ` v1.5.7`to `v1.6.0` to update `bundle create` behaviour. ([#2662](https://github.com/operator-framework/operator-sdk/pull/2662))
In the add section:
- Add the new flag `output-dir` to the command `operator-sdk bundle create`. ([#2662](https://github.com/operator-framework/operator-sdk/pull/2662))
da66ed5 to
cd72770
Compare
| @@ -96,7 +96,7 @@ $ operator-sdk bundle create \ | |||
| defer cleanup() | |||
There was a problem hiding this comment.
These cleanup funcs assume the generated files are present in c.directory. You'll have to set the correct cleanup dir in c.cleanupFuncs():
func (c bundleCmd) cleanupFuncs() (fs []func()) {
dir := c.outputDir
if dir == "" {
dir = c.directory
}
metaDir := filepath.Join(dir, bundle.MetadataDir)
dockerFile := filepath.Join(dir, bundle.DockerFile)
...
}There was a problem hiding this comment.
@estroz ah. so, the explicit purpose of --output-dir is to end up with a generated directory as output so that you don't have to keep generating them everytime you build. annotations.yaml is sort of supposed to be a long lived file that you can edit yourself manually.
It seems like --generate-only and --output-dir being set are either interchangeable (but with a specific dir set) OR passing the output-dir while also building would result in the files living around after you build.
IMO though it seems weird to me to generate and throw these files away all the time, given that OLM's packaging format is at some point probably going to want you to drive other stuff in the metadata/ folder (ex. https://github.com/operator-framework/enhancements/blob/master/enhancements/operator-dependency-resolution.md#dependency-specification). I had assumed that we treated the bundle command as a "run once to scaffold things" rather than something that should default to deleting stuff afterwards. Maybe we should sync up on this?
There was a problem hiding this comment.
Also this change renames the index.Dockerfile and throws it in the same working directory as the context of where you're running the command. so if we end up wanting to clean it up, we will need to delete that file too.
|
@kevinrizza this is still waiting on @estroz comment to be addressed: https://github.com/operator-framework/operator-sdk/pull/2662/files#r394514725 |
cd72770 to
d1e7009
Compare
|
New changes are detected. LGTM label has been removed. |
CHANGELOG.md
Outdated
| - Upgrade the Helm dependency version from `v3.0.1` to `v3.0.2`. ([#2621](https://github.com/operator-framework/operator-sdk/pull/2621)) | ||
| - Changed the scaffolded `serveCRMetrics` to use the namespaces informed in the environment variable `WATCH_NAMESPACE` in the MultiNamespace scenario. ([#2603](https://github.com/operator-framework/operator-sdk/pull/2603)) | ||
| - Improve skip metrics logs when running the operator locally in order to make clear the information for Helm based operators. ([#2603](https://github.com/operator-framework/operator-sdk/pull/2603)) | ||
| - Upgrade the `operator-registry` dependency version from `v1.5.7`to `v1.6.0` to update `bundle create` behaviour. ([#2662](https://github.com/operator-framework/operator-sdk/pull/2662)) |
There was a problem hiding this comment.
Could we not bump v1.6.1 already?
There was a problem hiding this comment.
We could but that version is a kube version bump and doesn't directly affect the registry dependency at all. I would prefer to generate a followup pr for that, especially given the context of this PR and the purpose of the discussion around it
d1e7009 to
3bbc7cd
Compare
|
@kevinrizza you've been hit by the CHANGELOG.md conflict :( please rebase |
*Update operator-registry dependency to 1.6.0 *Adds fix for generated dockerfiles *Adds optional output-directory parameter *Update cleanup funcs to handle new structure
3bbc7cd to
cbcdc13
Compare
|
Rebased, ptal :) |
| if manifestDir == "" { | ||
| manifestDir = c.directory | ||
| } | ||
| absManifestDir, _ := filepath.Abs(manifestDir) |
There was a problem hiding this comment.
Does this need to be abs? If so import log "github.com/sirupsen/logrus" above and add:
| absManifestDir, _ := filepath.Abs(manifestDir) | |
| absManifestDir, err := filepath.Abs(manifestDir) | |
| if err != nil { | |
| log.Fatal(err) | |
| } |
| metaDir := filepath.Join(manifestParent, bundle.MetadataDir) | ||
| metaExists := isExist(metaDir) | ||
|
|
||
| workingDir, _ := os.Getwd() |
There was a problem hiding this comment.
| workingDir, _ := os.Getwd() | |
| workingDir, err := os.Getwd() | |
| if err != nil { | |
| log.Fatal(err) | |
| } |
|
Closing in favor of #2714 which includes the commit in this pr |
Description of the change:
*Update operator-registry dependency to 1.6.0
*Adds fix for generated dockerfiles
*Adds optional output-directory parameter
Motivation for the change:
Include fixes for
operator-sdk bundle create