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

lifecycle: only warn when a default provider snap is missing #2885

Merged
merged 5 commits into from Jan 20, 2020

Conversation

sergiusens
Copy link
Collaborator

Snapcraft gained the ability to check for artifacts from snaps listed as plugs
when using the content interface.

The side effect, is that the snap needs to be published on the main Snap Store,
this is a requirement brand stores cannot meet, so instead of failing,
Snapcraft resorts to warning instead.

Signed-off-by: Sergio Schvezov sergio.schvezov@canonical.com

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run ./runtests.sh static?
  • Have you successfully run ./runtests.sh tests/unit?

Snapcraft gained the ability to check for artifacts from snaps listed as plugs
when using the content interface.

The side effect, is that the snap needs to be published on the main Snap Store,
this is a requirement brand stores cannot meet, so instead of failing,
Snapcraft resorts to warning instead.

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Copy link
Contributor

@flexiondotorg flexiondotorg left a comment

Choose a reason for hiding this comment

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

This is a much better outcome to warn when attempting to inspect a content snap in a brand store rather than an outright hard failure.

Copy link
Contributor

@cjp256 cjp256 left a comment

Choose a reason for hiding this comment

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

Excellent! LGTM, a couple of optional UI text nits.

Thanks for taking it on 👍

installed_snaps += repo.snaps.install_snaps([content_snap])
except repo.snaps.errors.SnapUnavailableError:
logger.warning(
f"Could not install snap defined in a plug {content_snap!r}. "
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: s/in a plug/in plug/

logger.warning(
f"Could not install snap defined in a plug {content_snap!r}. "
"The missing library report may have false positives listed if those "
"libraries were to be provided by the content snap."
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: s/were to be/are

@sergiusens sergiusens merged commit edb7a0f into canonical:master Jan 20, 2020
@sergiusens sergiusens deleted the content branch January 20, 2020 14:02
sergiusens added a commit to sergiusens/snapcraft that referenced this pull request Jan 20, 2020
…al#2885)

Snapcraft gained the ability to check for artifacts from snaps listed as plugs
when using the content interface.

The side effect, is that the snap needs to be published on the main Snap Store,
this is a requirement brand stores cannot meet, so instead of failing,
Snapcraft resorts to warning instead.

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
sergiusens added a commit that referenced this pull request Jan 20, 2020
Snapcraft gained the ability to check for artifacts from snaps listed as plugs
when using the content interface.

The side effect, is that the snap needs to be published on the main Snap Store,
this is a requirement brand stores cannot meet, so instead of failing,
Snapcraft resorts to warning instead.

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
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.

None yet

3 participants