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

manifest: expose snapcraft-started-at #2559

Merged
merged 2 commits into from
May 8, 2019

Conversation

sergiusens
Copy link
Collaborator

Expose snapcraft-started-at in the manifest.yaml to use as an ordering
mechanism when processing snaps coming into the Snap Store.

LP: #1806658

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?

Expose snapcraft-started-at in the manifest.yaml to use as an ordering
mechanism when processing snaps coming into the Snap Store.

LP: #1806658

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

@cmatsuoka cmatsuoka left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@@ -18,16 +18,20 @@
import os
import json
from collections import OrderedDict
from typing import Any, Dict # noqa: F401
from typing import Any, Dict, TYPE_CHECKING
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah interesting, I was looking for a constant like this one to avoid importing packages just for type checking.

manifest = OrderedDict() # type: Dict[str, Any]
manifest["snapcraft-version"] = snapcraft._get_version()
manifest["snapcraft-started-at"] = project._get_start_time().isoformat() + "Z"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like the way Python deals with times without timezones, but it's not something we can change right now.

@codecov-io
Copy link

codecov-io commented May 7, 2019

Codecov Report

Merging #2559 into master will decrease coverage by 0.03%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2559      +/-   ##
==========================================
- Coverage   88.85%   88.82%   -0.04%     
==========================================
  Files         202      202              
  Lines       13794    13801       +7     
  Branches     2088     2089       +1     
==========================================
+ Hits        12257    12259       +2     
- Misses       1093     1095       +2     
- Partials      444      447       +3
Impacted Files Coverage Δ
snapcraft/internal/meta/_snap_packaging.py 91.12% <ø> (ø) ⬆️
snapcraft/project/_project.py 87.5% <100%> (+1.38%) ⬆️
snapcraft/internal/meta/_manifest.py 95.23% <71.42%> (-4.77%) ⬇️
snapcraft/internal/pluginhandler/_plugin_loader.py 83.33% <0%> (-1.97%) ⬇️
snapcraft/internal/elf.py 80.71% <0%> (-0.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c541fac...2fec141. Read the comment docs.

Co-Authored-By: sergiusens <sergio.schvezov@canonical.com>
@sergiusens sergiusens merged commit 1c283cc into canonical:master May 8, 2019
@sergiusens sergiusens deleted the snapcraft-start-at branch May 8, 2019 22:20
clobrano pushed a commit to clobrano-forks/snapcraft that referenced this pull request Jun 8, 2019
Expose snapcraft-started-at in the manifest.yaml to use as an ordering
mechanism when processing snaps coming into the Snap Store.

LP: #1806658

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.

4 participants