keon94 commented on code in PR #5153:
URL: 
https://github.com/apache/incubator-devlake/pull/5153#discussion_r1191231792


##########
backend/helpers/pluginhelper/api/api_rawdata.go:
##########
@@ -37,16 +38,23 @@ type RawData struct {
        CreatedAt time.Time
 }
 
+type TaskOptions interface {
+       GetParams() any
+}
+
 // RawDataSubTaskArgs FIXME ...
 type RawDataSubTaskArgs struct {
        Ctx plugin.SubTaskContext
 
        //      Table store raw data
        Table string `comment:"Raw data table name"`
 
-       //      This struct will be JSONEncoded and stored into database along 
with raw data itself, to identity minimal
-       //      set of data to be process, for example, we process JiraIssues 
by Board
-       Params interface{} `comment:"To identify a set of records with same 
UrlTemplate, i.e. {ConnectionId, BoardId} for jira entities"`
+       // Deprecated: Use Options instead

Review Comment:
   The idea here is to remove this boilerplate of setting the params in every 
single subtask of a plugin. This value is a constant for a given plugin (as far 
as I'm aware - correct me if I'm wrong), so it makes a lot more sense to have 
it be set in a single place and be enforced.  Doing this using an interface 
made the most sense to me.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to