New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 826985 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

[Findit] AssertionError: task_slices not defined in SwarmingTaskRequest

Project Member Reported by chanli@chromium.org, Mar 29 2018

Issue description

https://pantheon.corp.google.com/errors/CNmXwer3mb32GA?time=P30D&project=findit-for-me

I think maybe it's not a good idea to use dto for external data like SwarmingTaskRequest. Findit may be broken because changes on the SwarmingTaskRequest format at swarming side.

Possible solutions:
1. Resume the non-dto version of SwarmingTaskRequest
2. Don't convert a request from swarming to dto directly, rather use a util function to do the conversion and only keep the info Findit really needs.

 
For Findit side it's maybe better to keep the DTO when Findit does its own processing as we want to avoid nested dicts. Perhaps when getting the request we introduce a function that converts it to a Findit-specific DTO instead of directly converting it from Swarming, so maybe SwarmingTaskRequest would have to override FromSerializable to strip out the unused fields.

Comment 2 by st...@chromium.org, Mar 29 2018

Who is going to own and fix this? This is a priority task that blocks all new versions.

Comment 3 by chanli@chromium.org, Mar 29 2018

Owner: lijeffrey@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/aeb48a8a9ba9c46709c6c61d997103fc96b2f0d1

commit aeb48a8a9ba9c46709c6c61d997103fc96b2f0d1
Author: Jeffrey Li <lijeffrey@chromium.org>
Date: Thu Mar 29 21:44:02 2018

[Findit] Implementing custom FromSerializable method for SwarmingTaskRequest

Due to Swarming's frequent addition of new fields, Findit will assert if any
of those new fields are not defined in SwarmingTaskRequest, even though they
may not be consumed by Findit. This change overrides StructuredObject's
FromSerializable method for SwarmingTaskRequest, relaxing the necessity for
all fields to be defined.

Bug:  826985 
Change-Id: I69292a49bb8fa98bdcb5ebad0dc13ae3564c82c6
Reviewed-on: https://chromium-review.googlesource.com/986853
Reviewed-by: Chan Li <chanli@chromium.org>
Commit-Queue: Jeffrey Li <lijeffrey@chromium.org>

[modify] https://crrev.com/aeb48a8a9ba9c46709c6c61d997103fc96b2f0d1/appengine/findit/infra_api_clients/swarming/test/swarming_task_request_test.py
[modify] https://crrev.com/aeb48a8a9ba9c46709c6c61d997103fc96b2f0d1/appengine/findit/infra_api_clients/swarming/swarming_task_request.py

Status: Verified (was: Assigned)

Sign in to add a comment