The URL data source is deprecated but many of them still exist in the wild. If you visit settings for the data source, the front-end crashes.
type: url data source via the API:curl --request POST \
--url https://app.redash.io/default/api/data_sources \
--header 'authorization: Key <your api key>' \
--header 'content-type: application/json' \
--data '{
"name": "Bug Proof",
"type": "url",
"syntax": "sql",
"paused": 0,
"pause_reason": null,
"options": {
"password": "pass",
"url": "example.com",
"username": "user"
},
"queue_name": "queries",
"scheduled_queue_name": "scheduled_queries"
}'
dynamicForm errors
@gabrieldutra maybe because the options schema isn't available?
@gabrieldutra maybe because the options schema isn't available?
I think that's the exact reason, but I'm also not sure about how we can handle this (at least frontend side)... Since there's no configuration schema, we technically don't "know" how to handle the form.
On the frontend what we can do is not render the form (render a message instead) and allow actions to be performed (e.g: delete the DS). Other options include somehow migrate existing deprecated data sources, or keeping them in the settings with a flag (not that good, as we keep some "unnecessary" code).
One option is to have the API return the configuration schemas for all data source types, but mark the deprecated ones so they are excluded from the create UI.
One option is to have the API return the configuration schemas for all data source types, but mark the deprecated ones so they are excluded from the create UI.
Oh, I see, I thought the deprecated ones had their code deleted :sweat_smile:. That's feasible, basically move the filtering logic from #3972 to the frontend, I'll push a PR with that :+1:.
Does the URL data source have a configuration schema? I don't see one in url.py.
Does the URL data source have a configuration schema? I don't see one in
url.py.
Yes, it's totally based on BaseHTTPQueryRunner