Skip to content

Conversation

jorwoods
Copy link

Also correct the type hints to clarify that it accepts any Iterable.

jorwoods added 2 commits July 19, 2025 21:57
Also correct the type hints to clarify that it accepts any
Iterable.
password=password,
embed_password=embed_password,
)
response = self.put_request(url, request_body)
Copy link
Author

Choose a reason for hiding this comment

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

The response doesn't seem to get used. Can you give me an example response XML?

Copy link
Owner

Choose a reason for hiding this comment

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

The response is just a success message, so not necessarily needs to be used.

f"Updated connections for datasource {datasource_item.id}: {', '.join(connection_luids)}"
)
logger.info(f"Updated connections for datasource {datasource_item.id}: {', '.join(connection_luids)}")
return connection_luids
Copy link
Author

Choose a reason for hiding this comment

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

As outlined in this PR, the function works with any Iterable[str], not just a list. The only problem is if the user were to pass in an Iterator, the Iterator gets consumed by this function and returns an exhausted Iterator. If the connection ids are in the response, we can generate it from the response and have it work in the general case.

@vchavatapalli vchavatapalli merged commit 8ee48d1 into vchavatapalli:Adding-new-update-connections-api Jul 21, 2025
19 checks passed
@jorwoods jorwoods deleted the jorwoods/conns_req_fact branch July 21, 2025 20:11
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.

2 participants