Closed sodle-splunk closed 5 months ago
Hi @sodle-splunk, thanks for raising the issue, it seems to be coming due to backend error and most likely not something due to sdk. Can you please let me know if this persists? Generally these type of issues are transient. I have raised this with internal team.
Also, can you try making this request through databricks cli for example? If there is the same error response then we can confirm if this isn't local to the sdk.
Hi @tanmay-db. I'm still getting the error today through SDK, and have been since at least Friday.
The following CLI command also fails with an Internal Server Error
:
databricks alerts create --json '{
"name": "test",
"query_id": "redacted",
"options": {"column": "average_fare", "op": ">", "value": 10},
"parent": "folders/HOME/testfolder"
}'
Again, omitting the parent
parameter allows it to succeed.
POSTing that same JSON payload to https://dbc-redacted.cloud.databricks.com/api/2.0/preview/sql/alerts
via Curl or Hoppscotch gives the same results.
So I'm definitely suspecting something wrong server-side.
Creating an alert in a folder via the UI is working for me, though the network tab in the browser shows that to be using a different API route (/sql/api/alerts
) and slightly different payload.
Correct me if I'm wrong, but the folder I'm looking at in Databricks seem to be addressable in three different ways:
folders/HOME/testfolder
, which is what I'm seeing in docs./Workspace/Users/<my_name>/testfolder
, which is what I get when I click Copy->Full Path
in the UI.folders/2561867671938994
, which is what appears in the browser URL bar when I'm looking at the folder in the UI.This third ID is what the browser specifies as the parent
when creating the alert. I've just confirmed that passing this value to the SDK also works, where the other two trigger the internal server error.
It seems to me like the API should be able to resolve a path into this ID, but is failing to do so.
Hi @tanmay-db - Has there been any progress in investigating this? Thanks.
Hi @sodle-splunk, thanks for the detailed response, let me sync with the internal team (there is a holiday in US today so it might take tomorrow for them to reply).
I'm still getting the error today through SDK, and have been since at least Friday. As you mentioned this doesn't seem to be transient and most likely something on the server side.
Just to check, are you blocked on this issue at the moment or is there a workaround available?
Thanks for the response @tanmay-db
We are still blocked on this, as there is no workaround. We were also out yesterday due to the holiday, but we're back today.
Hi @sodle-splunk, the parent field takes a node id, so specifying "folders/HOME/testfolder
" will fail, you would have to specify the node id of the testfolder which you can get using this API: https://docs.databricks.com/api/workspace/workspace/getstatus.
Thanks to @xiangzhu-databricks for the clarification.
Ok. Thanks for clarifying. We will work around this.
Perhaps the requirement for a "node id" instead of a "folder path" should be more clearly documented?
Description
When attempting to create an alert (
client.alerts.create
), specifying theparent
argument always raises anInternal Server Error
.Reproduction
testfolder
exists under my home directory. This same script works when omitting theparent
parameter, but creates the alert in the default location (home) instead.Expected behavior Alert should be created in
testfolder
under my home directory.Is it a regression? I believe this used to work on the current SDK version, when I tried it a few days ago, but seems not to work know.
Debug Logs
Other Information