beetmover doesn't skip GCS uploads when it claims to
还没有人认领这个 Issue。
评估
调研方向
从 beetmoverscript/gcloud.py 中的 set_gcs_client 和 upload_to_gcs 开始,然后跟踪它们在 beetmoverscript/script.py 和 beetmoverscript/utils.py 中的调用方。复现或跟踪缺少客户端时的路径,并验证每个提前返回条件都会跳过 GCS 上传,且不会触发 AttributeError。
由索引模型根据 Issue 内容生成。
描述
set_gcs_client has a number of error conditions that result in an early return, and context.gcs_client being unset. The messages given claim that GCS uploads will be skipped, but instead it continues on and ends up failing. For example:
2023-02-23 01:22:56,468 - beetmoverscript.gcloud - WARNING - GCS bucket <Bucket: mozilla-releng-dep-partner> doesn't exist. Skipping GCS uploads.
2023-02-23 01:22:56,470 - beetmoverscript.task - DEBUG - Loading release_props from task's payload: {'appName': 'Firefox', 'appVersion': '112.0', 'branch': 'try', 'buildid': '20230222192533', 'hashType': 'sha512', 'platform': 'linux'}
2023-02-23 01:22:56,470 - beetmoverscript.task - INFO - Action types: ['push-to-partner']
<snip>
2023-02-23 01:22:56,716 - beetmoverscript.task - DEBUG - Loading release_props from task's payload: {'appName': 'Firefox', 'appVersion': '112.0', 'branch': 'try', 'buildid': '20230222192533', 'hashType': 'sha512', 'platform': 'linux'}
2023-02-23 01:22:59,227 - beetmoverscript.script - INFO - put /app/workdir/cot/XMhpfS5_T4aYb2qrypIxyQ/releng/partner/test/test-002/win32/he/target.installer.exe: 200
2023-02-23 01:22:59,228 - charset_normalizer - DEBUG - Encoding detection on empty bytes, assuming utf_8 intention.
2023-02-23 01:22:59,413 - beetmoverscript.script - INFO - put /app/workdir/cot/XMhpfS5_T4aYb2qrypIxyQ/releng/partner/test/test-002/win64/en-CA/target.installer.exe: 200
2023-02-23 01:22:59,413 - charset_normalizer - DEBUG - Encoding detection on empty bytes, assuming utf_8 intention.
2023-02-23 01:22:59,432 - beetmoverscript.script - INFO - put /app/workdir/cot/XMhpfS5_T4aYb2qrypIxyQ/releng/partner/test/test-002/win64/he/target.installer.exe: 200
2023-02-23 01:22:59,432 - charset_normalizer - DEBUG - Encoding detection on empty bytes, assuming utf_8 intention.
2023-02-23 01:22:59,466 - beetmoverscript.script - INFO - put /app/workdir/cot/XMhpfS5_T4aYb2qrypIxyQ/releng/partner/test/test-002/win32/en-CA/target.installer.exe: 200
2023-02-23 01:22:59,466 - charset_normalizer - DEBUG - Encoding detection on empty bytes, assuming utf_8 intention.
Traceback (most recent call last):
File "/app/bin/beetmoverscript", line 8, in <module>
sys.exit(main())
File "/app/lib/python3.9/site-packages/beetmoverscript/script.py", line 683, in main
client.sync_main(async_main, config_path=config_path, default_config=default_config, should_validate_task=False)
File "/app/lib/python3.9/site-packages/scriptworker/client.py", line 166, in sync_main
loop.run_until_complete(_handle_asyncio_loop(async_main, context))
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/app/lib/python3.9/site-packages/scriptworker/client.py", line 205, in _handle_asyncio_loop
await async_main(context)
File "/app/lib/python3.9/site-packages/beetmoverscript/script.py", line 335, in async_main
await action_map[context.action](context)
File "/app/lib/python3.9/site-packages/beetmoverscript/script.py", line 168, in push_to_partner
await move_partner_beets(context, mapping_manifest)
File "/app/lib/python3.9/site-packages/beetmoverscript/script.py", line 485, in move_partner_beets
await await_and_raise_uploads(cloud_uploads, context.config["clouds"], context.bucket)
File "/app/lib/python3.9/site-packages/beetmoverscript/utils.py", line 333, in await_and_raise_uploads
await raise_future_exceptions(cloud_uploads[cloud])
File "/app/lib/python3.9/site-packages/scriptworker/utils.py", line 409, in raise_future_exceptions
succeeded_results, _ = await _process_future_exceptions(tasks, raise_at_first_error=True)
File "/app/lib/python3.9/site-packages/scriptworker/utils.py", line 443, in _process_future_exceptions
raise exc
File "/app/lib/python3.9/site-packages/beetmoverscript/gcloud.py", line 92, in upload_to_gcs
bucket = Bucket(context.gcs_client, name=bucket_name)
AttributeError: 'Context' object has no attribute 'gcs_client'
- 主要语言
- Python
- 星标
- 16
- 派生
- 38
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 14
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mozilla-releng/scriptworker-scripts 的其他 Issue
-
难度 5/5 一周以上 新手友好度 15/100
-
难度 5/5 一周以上 新手友好度 25/100
-
treescript
难度 5/5 一周以上 新手友好度 35/100
mozilla-releng/scriptworker-scripts#1055 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 32/100
mozilla-releng/scriptworker-scripts#994 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
mozilla-releng/scriptworker-scripts#980 · 1 条评论 ·
查看 mozilla-releng/scriptworker-scripts 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100