[Bug] Test server in time-skipping mode does return userMetadata.summary
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện ví dụ với test server ở chế độ time-skipping, đồng thời so sánh lịch sử workflow của nó với chế độ dev. Theo dõi việc xử lý summary từ workflow.execute_activity qua fetch_history_events đến user_metadata.summary. Hoàn thành khi summary xuất hiện trong HistoryEvent được trả về ở cả hai chế độ và các bài kiểm thử liên quan đều chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What are you really trying to do?
I want to leverage userMetadata.summary and show it in UI, and test the functionality.
Describe the bug
My tests fail when running tests with test server in time-skipping mode.
I am passing summary attribute when executing workflow and activities. Then I query workflow history I can see userMetadata.summary populated on the HistoryEvent when running in dev mode, but it is missing in time-skipping mode.
Minimal Reproduction
@workflow.defn
class WorkflowSample:
@workflow.run
async def run(self, name: str) -> list[str]:
result = await workflow.execute_activity(ActivitySample.greeting, name, summary=f"Calculating greeting for {name}")
return [result]
async def get_payload_value(self, *args: Payload | None) -> str | None:
decoded_summary = await self.data_converter.decode(non_empty_payloads(*args))
if len(decoded_summary) == 0:
return None
return decoded_summary[0]
async def get_summary(self, history_event: HistoryEvent) -> str | None:
logger.debug("Getting summary for event %s", MessageToJson(history_event))
return await self.get_payload_value(
history_event.user_metadata.summary)
async def run(self):
async for event in workflow_handle.fetch_history_events(wait_new_event=wait_new_event):
summary = await self.get_summary(event)
print(summary)
Environment/Versions
- OS and processor: M1 Mac
- Temporal Version: 1.10.0
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 241
- Merge trung bình
- 3 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 49
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của temporalio/sdk-python
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
temporalio/sdk-python#1517 · 10 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
temporalio/sdk-python#496 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
temporalio/sdk-python#1890 ·
-
[Bug] Local activity resolutions regrouped on replay since 1.32.0, delivering the wrong payload Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
temporalio/sdk-python#1881 · 1 bình luận ·
-
bug
temporalio/sdk-python#1817 · 1 bình luận · 1 người được giao ·
Tất cả issue của temporalio/sdk-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100