-
Notifications
You must be signed in to change notification settings - Fork 452
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
Conversation
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>
There was a problem hiding this 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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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 Report
@@ 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
Continue to review full report at Codecov.
|
Co-Authored-By: sergiusens <sergio.schvezov@canonical.com>
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>
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
./runtests.sh static
?./runtests.sh tests/unit
?