-
Notifications
You must be signed in to change notification settings - Fork 31
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
Update lifecycle status #144
Update lifecycle status #144
Conversation
…charts repository. Now it executes all operations in the current charts repository. Removing the legacy code. Updating git methods.
…json implementation
@@ -0,0 +1,136 @@ | |||
package lifecycle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all logging from library code please.
} | ||
|
||
file, _ := os.Open(s.StateFile) | ||
// Read the file content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this comment above the operation
pkg/lifecycle/state.go
Outdated
// initState will create a new state file and save the state to it | ||
func (s *Status) initState() error { | ||
|
||
err := s.createStateFile() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make all calls that do a single error check inline.
pkg/lifecycle/state.go
Outdated
// Marshal the Project struct into JSON | ||
data, err := json.MarshalIndent(s, "", " ") | ||
if err != nil { | ||
err = fmt.Errorf("error marshalling project to JSON: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all of the errors here lacking enough context to warrant having more info added? Usually not necessary and not a standard for the lang.
@briandowns all fixes implemented. |
Issue:
rancher/ecm-distro-tools#445
Solution:
Preparing
charts-build-scripts
commandlifecycle-status
to be migrated into automation inside: ecm-distro-toolsChanging main behavior of
lifecycle-status
from creating and cloning a temporary directory structure forrancher/charts repository
to executing all actions in the current charts repository and persisting the results to parsablestate.json
file that can be loaded by different commands.Result example: