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

charmcraft build failing if charm has manifest.yaml #287

Closed
mthaddon opened this issue Apr 15, 2021 · 5 comments
Closed

charmcraft build failing if charm has manifest.yaml #287

mthaddon opened this issue Apr 15, 2021 · 5 comments
Milestone

Comments

@mthaddon
Copy link
Contributor

I'm seeing the following error trying to build a charm with a manifest.yaml: https://pastebin.ubuntu.com/p/dzMkySj6dT/

$ snap info charmcraft
name:      charmcraft
summary:   The charming tool
publisher: Canonical✓
store-url: https://snapcraft.io/charmcraft
license:   Apache-2.0
description: |
  Charmcraft provides a streamlined, powerful, opinionated, and
  flexible tool to develop, package, and manage the lifecycle of Juju
  charm publication, focused particularly on charms written within the
  Operator Framework.
  
  It is still in heavy, initial development and so a lot is still To
  Be Done. However it is already useful, and already simplifies the
  life of the charmer.
commands:
  - charmcraft
snap-id:      gcqfpVCOUvmDuYT0Dh5PjdeGypSEzNdV
tracking:     latest/edge
refresh-date: today at 14:05 CEST
channels:
  latest/stable:    –                                       
  latest/candidate: –                                       
  latest/beta:      0.9.0             2021-03-11 (312) 10MB -
  latest/edge:      0.9.0+43.gfe2d065 2021-04-15 (357) 10MB -
installed:          0.9.0+43.gfe2d065            (357) 10MB -
@jnsgruk
Copy link
Member

jnsgruk commented Apr 15, 2021

So this is because #281 was merged yesterday

We were only including the manifest.yaml because charmcraft didn't previously do it. It's always machine generated, and inclusion in the source was just a workaround until that PR landed.

@facundobatista
Copy link
Contributor

@mthaddon you say that you have a manifest.yaml from before? We should support that and not crash as you're showing.

@jnsgruk
Copy link
Member

jnsgruk commented Apr 15, 2021

@facundobatista we have been manually including essentially empty manifest.yaml files until now, but yeh it probably shouldn't crash! Maybe replace at charm build time and log a message during the build?

@facundobatista
Copy link
Contributor

No, it should be too surprising that a file just changed (nobody reads the messages ;) ).

It should refuse to build, providing an error (just not crash).

@facundobatista facundobatista added this to the soon milestone Apr 27, 2021
@facundobatista facundobatista modified the milestones: soon, 1.2 Jun 7, 2021
@facundobatista
Copy link
Contributor

This should be fixed already in master, as on one side we check for valid manifest.yaml, and also we build in clean dirs.

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

No branches or pull requests

3 participants