Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept api_key and send pebblo-server's response to daxa cloud. #12

Closed

Conversation

rahul-trip
Copy link

@rahul-trip rahul-trip commented Mar 21, 2024

  • Added support for api_key for daxa cloud
  • response of pebblo-server's loader/doc api call is now sent to daxa-cloud loader/doc api call as a payload.docs
  • timeout for loader/doc post call to pebblo-server is now increased to 300 seconds

@rahul-trip rahul-trip force-pushed the rahul_pebblo_daxa_Api_key branch 2 times, most recently from 4cdfd74 to 1b31682 Compare March 21, 2024 16:16
@srics srics changed the base branch from master to pebblo_identity_saferetriever March 21, 2024 22:48
@srics srics changed the title accept daxa api_key in PebbloSafeLoader. Add pebblo cloud_api_key in PebbloSafeLoader Mar 21, 2024
@srics srics changed the base branch from pebblo_identity_saferetriever to master March 21, 2024 22:49
@rahul-trip rahul-trip marked this pull request as draft March 22, 2024 04:18
@rahul-trip rahul-trip force-pushed the rahul_pebblo_daxa_Api_key branch from c2ebcfe to ce8a77a Compare March 26, 2024 20:44
@rahul-trip rahul-trip changed the title Add pebblo cloud_api_key in PebbloSafeLoader Accept api_key and send pebblo-server's response to daxa cloud. Mar 26, 2024
@rahul-trip rahul-trip force-pushed the rahul_pebblo_daxa_Api_key branch from ce8a77a to d45a985 Compare March 26, 2024 21:06
@rahul-trip rahul-trip self-assigned this Mar 26, 2024
@rahul-trip rahul-trip marked this pull request as ready for review March 26, 2024 21:06
@rahul-trip rahul-trip changed the base branch from master to googledrive_identity_loader March 27, 2024 10:06
@Raj725 Raj725 force-pushed the googledrive_identity_loader branch from 5405879 to 55234be Compare March 28, 2024 10:23
daxa_response.json(),
)
except requests.exceptions.RequestException:
logger.warning("Unable to reach Daxa cloud server.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use of "Daxa" and "Pebblo" interchangeably is confusing.

  • Url(202) => pebblo_cloud_url
  • Response(203) => daxa_response
  • Warn log(218) => Daxa cloud server

len {len(resp.request.body if resp.request.body else [])} \
response status{resp.status_code} body {resp.json()}"
)
"send_loader_doc: request url %s, body %s len %s response status %s\
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a specific reason for switching from f-string formatting to %-formatting?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, when logging it is recommended to use lazy strings, meaning the string formatting will only get evaluated if the logging string will get put out. E.g. a message with logging level debug won't get evaluated when the logging level is set to information or higher.
refer: https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/logging-not-lazy.html

@Raj725
Copy link
Collaborator

Raj725 commented Mar 29, 2024

please fix lint errors

@rahul-trip rahul-trip force-pushed the googledrive_identity_loader branch from 55234be to f30bc52 Compare March 29, 2024 11:32
@rahul-trip rahul-trip force-pushed the rahul_pebblo_daxa_Api_key branch 2 times, most recently from bc759f8 to 121d31f Compare March 29, 2024 12:50
@rahul-trip rahul-trip force-pushed the googledrive_identity_loader branch from f30bc52 to 39e2a7d Compare April 1, 2024 13:09
@rahul-trip rahul-trip closed this Apr 2, 2024
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