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

Make stage-snap jobs more smart about pushing metadata #475

Open
anonymouse64 opened this issue Sep 3, 2019 · 2 comments
Open

Make stage-snap jobs more smart about pushing metadata #475

anonymouse64 opened this issue Sep 3, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@anonymouse64
Copy link
Contributor

Currently, all of the snap's that are released from the jenkins stage-snap jobs also have a step to push the metadata for the snap:

# Also force an update of the meta-data
snapcraft push-metadata "$SNAP_NAME"*.snap --force

This is less than ideal because when we start having multiple git branches building stage-snap jobs concurrently, if the metadata gets out of sync the metadata on the store page will flip between the two jobs as the stage-snap jobs for each branch runs. What we did for edgex-go (and thus the edgexfoundry snap) is just to ensure that the metadata such as the title, description, license, etc. always matches across the git branches so that there is no visible changes, however this is hacky and subject to be forgotten as maintainers change, etc.

Instead what would be ideal is to have the stage-snap job check if it needs to push metadata by checking 2 conditions:

  • The stage-snap job is building on the master branch (we probably only want to pull metadata from the master branch)
  • The metadata in the snap file that was just built by the stage-snap job doesn't match what is already in the store. This could be done with the snap store's REST API, but would be a little bit finicky I think.

Note that this would probably just be another step in a potential snap job jenkins pipeline

@jamesrgregg jamesrgregg added this to the Geneva milestone Sep 16, 2019
@jamesrgregg jamesrgregg added the enhancement New feature or request label Sep 16, 2019
@jamesrgregg jamesrgregg removed this from the Geneva milestone Apr 1, 2020
@jamesrgregg
Copy link
Contributor

@tonyespy perhaps you could take a look at this issue in our icebox and let us know if this is still relevant and something we should consider for Hanoi scope. Thank you.

@tonyespy
Copy link
Member

tonyespy commented Apr 2, 2020

@jamesrgregg yes, I think this should be considered for Hanoi. The proposed changes are fairly simple. At minimum, we just restrict the metadata push to releases from master. I'm not sure it's worth doing the additional optimization (i.e. diff store metadata against local metadata, and only push if different) though.

@jamesrgregg jamesrgregg added this to the Hanoi milestone Apr 15, 2020
@jamesrgregg jamesrgregg added the hanoi Hanoi release label Apr 15, 2020
@jamesrgregg jamesrgregg removed the hanoi Hanoi release label Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants