SourceFile.syncAll() throws error about existing BatchJobRun type with same ID

#1

7.8 environment.

I have curled data using the /file api.

Now, I want to sync all my sourceFiles (then process them).

SourceFile.syncAll() throws this error:

VM30:1 POST https://training2-lightbulb-dev1.c3-e.com/api/1/lightbulb/dev1/SourceFile?action=syncAll 500`
(anonymous) @ VM30:1
C3.client.sendRequest @ all.js?env=browser&compat:20614
request @ all.js?env=browser&compat:861
call @ all.js?env=browser&compat:567
c3Call @ all.js?env=browser&compat:100
_call @ all.js?env=browser&compat:2764
(anonymous) @ VM2387:5
(anonymous) @ VM2386:1
all.js?env=browser&compat:570 Uncaught C3.client.ActionError {name: “ActionError”, message: “Write failed: The specified ID ‘3’ already exists …r type BatchJobRun. Please change to a unique ID.”, error: C3.t…s.Obj, stack: “Error: Write failed: The specified ID ‘3’ already …77:20), :5:15)↵ at :1:12”}error: C3.typesys.Obj {id: “7086.409”, key: “c3.engine.database.DbException_validationErrors”, template: “{}”, parameters: Array(1), codes: Array(1), …}message: "Write failed: The specified ID ‘3’ already exists for type BatchJobRun. Please change to a unique ID."name: "ActionError"stack: "Error: Write failed: The specified ID ‘3’ already exists for type BatchJobRun. Please change to a unique ID.↵ at new C3.client.ActionError (https://training2-lightbulb-dev1.c3-e.com/typesys/1/all.js?env=browser&compat:1130:13)↵ at Object.request (https://training2-lightbulb-dev1.c3-e.com/typesys/1/all.js?env=browser&compat:882:15)↵ at Object.call (https://training2-lightbulb-dev1.c3-e.com/typesys/1/all.js?env=browser&compat:567:27)↵ at c3Call (https://training2-lightbulb-dev1.c3-e.com/typesys/1/all.js?env=browser&compat:100:20)↵ at Object._call (https://training2-lightbulb-dev1.c3-e.com/typesys/1/all.js?env=browser&compat:2764:20)↵ at Object.eval (eval at get (https://training2-lightbulb-dev1.c3-e.com/typesys/1/all.js?env=browser&compat:3177:20), :5:15)↵ at :1:12"proto: Error
call @ all.js?env=browser&compat:570
c3Call @ all.js?env=browser&compat:100
_call @ all.js?env=browser&compat:2764
(anonymous) @ VM2387:5
(anonymous) @ VM2386:1

BatchJobRun.fetch() reveals several (52) existing instances.

How can I perform a SourceFile.syncAll() on my newly uploaded CSVs?

0 Likes

#2

I have no explanation. I simply went to the system and did SourceFile.syncAll() in the console and it created the batch jobs/runs with appropriate non-conflicting ids

0 Likes

#3

Garry Dmello is reporting that this might be an issue with mount names not handling . characters correctly.
cc @tony.li

0 Likes

#4

So SourceFile wasn’t being loaded correctly because file was not being curled to the correct location. Could not reproduce the BatchJobRun issue on the same environment yet.

0 Likes

#5

Apparently . in bucket name works well with listing files etc.

0 Likes