pkg/generator: final cleanup of generator.go#313
Merged
theishshah merged 4 commits intooperator-framework:masterfrom Jun 14, 2018
Merged
pkg/generator: final cleanup of generator.go#313theishshah merged 4 commits intooperator-framework:masterfrom
theishshah merged 4 commits intooperator-framework:masterfrom
Conversation
Contributor
Author
|
Tested by following user-guide.md and ensuring proper file generation and directory structure |
hasbro17
reviewed
Jun 14, 2018
| if err := renderFile(buf, "codegen/update-generated.sh", updateGeneratedTmpl, ugTd); err != nil { | ||
| return err | ||
| } | ||
| return writeFileAndPrint(filepath.Join(codegenDir, updateGenerated), buf.Bytes(), defaultExecFileMode) |
Contributor
There was a problem hiding this comment.
We need the file codegen/update-generated.sh to be executable with the defaultExecFileMode. Currently with this PR operator-sdk new ... fails on the code generation step because the codegen script is not executable:
$ operator-sdk new app-operator --api-version=app.example.com/v1 --kind=App
...
(38/39) Wrote github.com/gogo/protobuf@v1.0.0
(39/39) Wrote k8s.io/client-go@kubernetes-1.9.3
Run dep ensure done
Run code-generation for custom resources
Error: failed to perform code-generation for CustomResources: ()
Also side note but it's weird that I didn't get an error message on failing to run the code generation command. But we can look into that later
https://github.com/operator-framework/operator-sdk/blob/master/commands/operator-sdk/cmd/generate/k8s.go#L55-L61
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #303