Cannot push snap 74.0b8: AttributeError: module 'platform' has no attribute 'dist'
Categories
(Release Engineering :: Release Automation: Snap, defect)
Tracking
(Not tracked)
People
(Reporter: jlorenzo, Assigned: jlorenzo)
References
Details
(Keywords: regression)
Attachments
(1 file)
Perma fail. Logs show[2]:
2020-02-26 05:55:41,353 - scriptworker.client - DEBUG - Task is validated against this schema: {'title': 'Taskcluster PushSnap task minimal schema', 'type': 'object', 'properties': {'dependencies': {'type': 'array', 'minItems': 1, 'uniqueItems': True, 'items': {'type': 'string'}}, 'scopes': {'type': 'array', 'uniqueItems': True, 'items': {'type': 'string'}}, 'payload': {'type': 'object', 'properties': {'channel': {'type': 'string'}, 'upstreamArtifacts': {'type': 'array', 'items': {'type': 'object', 'properties': {'taskType': {'type': 'string'}, 'taskId': {'type': 'string'}, 'paths': {'type': 'array', 'minItems': 1, 'uniqueItems': True, 'items': {'type': 'string'}}}, 'required': ['taskId', 'taskType', 'paths'], 'additionalProperties': False}, 'minItems': 1, 'uniqueItems': True}}, 'required': ['upstreamArtifacts'], 'additionalProperties': False}}, 'required': ['dependencies', 'scopes', 'payload']}
Traceback (most recent call last):
File "/app/bin/pushsnapscript", line 8, in <module>
sys.exit(main())
File "/app/lib/python3.8/site-packages/pushsnapscript/script.py", line 42, in main
return client.sync_main(async_main, config_path=config_path, default_config=get_default_config())
File "/app/lib/python3.8/site-packages/scriptworker/client.py", line 165, in sync_main
loop.run_until_complete(_handle_asyncio_loop(async_main, context))
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 612, in run_until_complete
return future.result()
File "/app/lib/python3.8/site-packages/scriptworker/client.py", line 204, in _handle_asyncio_loop
await async_main(context)
File "/app/lib/python3.8/site-packages/pushsnapscript/script.py", line 23, in async_main
snap_store.push(context, snap_file_path, channel)
File "/app/lib/python3.8/site-packages/pushsnapscript/snap_store.py", line 61, in push
with _store_session(macaroon_location) as store:
File "/usr/local/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/app/lib/python3.8/site-packages/pushsnapscript/snap_store.py", line 77, in _store_session
store = StoreClient()
File "/app/lib/python3.8/site-packages/snapcraft/storeapi/_store_client.py", line 31, in __init__
self.sso = SSOClient(self.conf)
File "/app/lib/python3.8/site-packages/snapcraft/storeapi/_sso_client.py", line 19, in __init__
super().__init__(
File "/app/lib/python3.8/site-packages/snapcraft/storeapi/_client.py", line 42, in __init__
self._snapcraft_headers = {"User-Agent": _agent.get_user_agent()}
File "/app/lib/python3.8/site-packages/snapcraft/storeapi/_agent.py", line 39, in get_user_agent
"/".join(platform.dist()[0:2]), # i.e. Ubuntu/16.04
AttributeError: module 'platform' has no attribute 'dist'
exit code: 1
It could be related to bug 1616048, but I currently doubt it. A more plausible explanation to me is the fact that we switched to python 3.8[3]. If so, it's probably a good time to bump the snapcraft dependency to 3.X. So far, we've been on 2.43.1[4].
I've been able to reproduce the bug locally. I'm looking into it.
[1] https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta&group_state=expanded&selectedJob=290507994&resultStatus=usercancel%2Ctestfailed%2Cbusted%2Cexception&revision=588c2ea6418034a20c33f21e122da5c3e2f335a7
[2] https://firefoxci.taskcluster-artifacts.net/U7VVpdctTZ2dz0WxYvX8mg/1/public/logs/live_backing.log
[3] https://github.com/mozilla-releng/scriptworker-scripts/pull/146
[4] https://github.com/mozilla-releng/scriptworker-scripts/blob/75e06d9c88a91ab9ed07e825db52aa9a3b6ccbcc/pushsnapscript/requirements/base.in#L6
Comment 1•4 years ago
|
||
Could this be from Bug 1615807 : https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta&resultStatus=pending%2Crunning%2Csuccess%2Csuperseded%2Ctestfailed%2Cbusted%2Cexception%2Crunnable&searchStr=linux%2Cx64%2Copt%2Csnap%2Cimage%2Cgeneration%2Crelease-snap-push-firefox%2Csnap%28push%29&fromchange=9760535819af8b55083200a0b8c387dfaf46fa5a&tochange=ba21e845453b294291394dca5f74380e569ce5de&selectedJob=290536916 ?
Comment 2•4 years ago
|
||
It's from the 3.8 update: https://docs.python.org/3.7/library/platform.html#platform.dist
Assignee | ||
Comment 3•4 years ago
|
||
(In reply to Julien Cristau [:jcristau] from comment #2)
👍
For the record, I managed to fix the bug on my local machine. It allowed me to publish 74.0b8. I'm checking the fix works with our infra.
Assignee | ||
Comment 4•4 years ago
|
||
snapcraft was upgraded to 3.10 and it worked perfectly! Firefox 74.0b9 snap was released: https://firefox-ci-tc.services.mozilla.com/tasks/YYYcphB3RCSl1qq6EM4zNg/runs/2/logs/https%3A%2F%2Ffirefox-ci-tc.services.mozilla.com%2Fapi%2Fqueue%2Fv1%2Ftask%2FYYYcphB3RCSl1qq6EM4zNg%2Fruns%2F2%2Fartifacts%2Fpublic%2Flogs%2Flive_backing.log#L139
Comment hidden (Intermittent Failures Robot) |
Description
•