Skip to content

Conversation

@srinathnarayanan
Copy link
Collaborator

This MR

  • Adds a run_udf method similar to run_dashboard() and run_cloud_function()
  • constructs the base url for udfs based on whether it is run in an interactive vs published manner + dev vs prod environment

Copy link
Collaborator

@kesmit13 kesmit13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few requested changes. I'm not clear on what the ConnectionInfo class is for and what makes the PythonUdfConnectionInfo different.

valid_values=['managed', 'remote', 'collocated'],
),
'remote',
'managed',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave the default as remote and set it explicitly to that in the application code. This app needs to run on-prem as well and the typical way is done using remote.

url: Optional[str] = None,
data_format: str = 'rowdat_1',
app_mode: str = 'remote',
app_mode: str = 'managed',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

'external_function.url', 'string', check_str, 'http://localhost:8000/invoke',
'Specifies the URL of the external function application.',
environ=['SINGLESTOREDB_EXT_FUNC_URL'],
environ=['SINGLESTOREDB_EXT_FUNC_URL' ],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray space



@dataclass
class PythonUdfAppConfig:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think naming this UDFAppConfig would be better. Since there is no other option than Python. Udf is a bit too Java-esque. I prefer UDF .

token: Optional[str]

@dataclass
class PythonUdfConnectionInfo:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove Python prefix

@srinathnarayanan
Copy link
Collaborator Author

Closing this Pull request, created this one instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants