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

build: inform user that packing charm may take time (CRAFT-347) #428

Merged
merged 3 commits into from
Jul 2, 2021

Conversation

cjp256
Copy link
Contributor

@cjp256 cjp256 commented Jul 2, 2021

Let the user know which charm is being packed and that it may take some
time. Move launched_environment() logic into pack_charm_in_instance()
to have the information required (charm name) prior to launching.

Example output:

$ charmcraft pack
Packing charm 'foo_ubuntu-18.04-amd64.charm' which may take several minutes...
Created 'foo_ubuntu-18.04-amd64.charm'.
Packing charm 'foo_ubuntu-20.04-amd64.charm' which may take several minutes...
Created 'foo_ubuntu-20.04-amd64.charm'.

Signed-off-by: Chris Patterson chris.patterson@canonical.com

@cjp256 cjp256 changed the title build: inform using that packing charm may take time (CRAFT-347) build: inform user that packing charm may take time (CRAFT-347) Jul 2, 2021
Let the user know which charm is being packed and that it may take some
time.  Move launched_environment() logic into pack_charm_in_instance()
to have the information required (charm name) prior to launching.

Example output:

```
$ charmcraft pack
Packing charm 'foo_ubuntu-18.04-amd64.charm' which may take several minutes...
Created 'foo_ubuntu-18.04-amd64.charm'.
Packing charm 'foo_ubuntu-20.04-amd64.charm' which may take several minutes...
Created 'foo_ubuntu-20.04-amd64.charm'.
```

Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
raise CommandError(
f"Failed to build charm for bases index '{bases_index}'."
) from error
logger.info(f"Packing charm {charm_name!r} which may take several minutes...")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Mentioning minutes gives me a Windows 95 progress bar vibe, won't age well

Suggested change
logger.info(f"Packing charm {charm_name!r} which may take several minutes...")
logger.info(f"Packing charm {charm_name!r}...")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha, well I expect it to be redone in a month or so with @facundos new messages / status handling. Will update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
@cjp256 cjp256 requested a review from sergiusens July 2, 2021 16:02
Copy link
Contributor

@facundobatista facundobatista left a comment

Choose a reason for hiding this comment

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

+1

@cjp256 cjp256 enabled auto-merge July 2, 2021 16:47
@cjp256 cjp256 merged commit a3560a4 into canonical:master Jul 2, 2021
@cjp256 cjp256 deleted the log-status branch July 2, 2021 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants