Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Ship should show human readable messages when running in headless #289

Merged
merged 2 commits into from
Aug 9, 2018

Conversation

kevherro
Copy link

@kevherro kevherro commented Aug 9, 2018

What I Did

Ship headless now prints human-readable progress messages!

Changed the behavior from this

$ ship update
load
resolve
build
{"step_number":0,"total_steps":1}
backup
execute
commit

to this

$ ship update
loading state from .ship/state.json
downloading latest from upstream (<chart url>)
generating installable application manifests
reading application release
rendering assets and configuration values

How I Did it

  • kustomize.go: added relevant ship update kustomize progress messages

  • render.go: cleaned up render progress messages. concatenated critical messages into human readable format and created debug logs for the remaining messages

How to verify it

run ship update to see the progress messages printed

Related to Issue #266

Description for the Changelog

Picture of a Boat (not required but encouraged)

🛥

@kevherro kevherro force-pushed the headless-human-readable branch 2 times, most recently from a25128e to 32141b4 Compare August 9, 2018 16:26
@kevherro kevherro force-pushed the headless-human-readable branch from 32141b4 to e2b92a1 Compare August 9, 2018 16:42
ProgressBuild = daemontypes.StringProgress("render", "build")
ProgressBackup = daemontypes.StringProgress("render", "backup")
ProgressExecute = daemontypes.StringProgress("render", "execute")
ProgressCommit = daemontypes.StringProgress("render", "commit")
Copy link
Author

Choose a reason for hiding this comment

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

Opted to merge these into a few human-readable messages. However, they have been preserved through debug logs below!

@kevherro kevherro requested review from marccampbell and dexhorthy and removed request for marccampbell August 9, 2018 17:00
@kevherro kevherro added the type::feature New feature or request label Aug 9, 2018
@kevherro kevherro merged commit b1dbed0 into master Aug 9, 2018
@kevherro kevherro deleted the headless-human-readable branch August 9, 2018 17:35
@@ -56,6 +57,8 @@ func (s *Ship) Update(ctx context.Context) error {
// does a state file exist on disk?
existingState, err := s.State.TryLoad()

s.Daemon.SetProgress(daemontypes.StringProgress("kustomize", `loading state from `+constants.StatePath))
Copy link
Member

Choose a reason for hiding this comment

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

@kevinherro should this be the viper flag, not the constant?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type::feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants