Skip to content

[ENH] Handle partial nodes success#55

Merged
alyssadai merged 21 commits intomainfrom
handle-partial-nodes-success
Jan 14, 2024
Merged

[ENH] Handle partial nodes success#55
alyssadai merged 21 commits intomainfrom
handle-partial-nodes-success

Conversation

@alyssadai
Copy link
Copy Markdown
Contributor

@alyssadai alyssadai commented Jan 11, 2024

Changes proposed in this pull request:

  • New response model for federated response that includes node-specific errors and successful query results, as well as an overall nodes response status
  • When >=1 nodes fail, use a custom 207 HTTP success code for overall response from API
  • Print any encountered node errors to the console, as well as summary statement about # nodes successfully queried
  • When querying individual nodes, gracefully handle any network/node connection errors related to the request (i.e., if node API is unreachable)
  • Switch to async process for sending out individual node requests

Checklist

  • PR has an interpretable title with a prefix ([ENH], [FIX], [REF], [TST], [CI], [MNT], [INF], [MODEL], [DOC]) (see https://neurobagel.org/contributing/pull_requests for more info)
  • PR links to GitHub issue with mention Closes #XXXX
  • Tests pass
  • Checks pass

For new features:

  • Tests have been added

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Jan 11, 2024

Pull Request Test Coverage Report for Build 7521932835

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.6%) to 99.314%

Totals Coverage Status
Change from base Build 7266039620: 0.6%
Covered Lines: 579
Relevant Lines: 583

💛 - Coveralls

@surchs surchs self-requested a review January 11, 2024 16:40
Copy link
Copy Markdown
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

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

Thank you very much @alyssadai for this great PR 🎉 ! I left some comments but otherwise 🧑‍🍳

alyssadai and others added 2 commits January 14, 2024 16:34
Co-authored-by: Sebastian Urchs <surchs@users.noreply.github.com>
@alyssadai alyssadai merged commit 3e76fd0 into main Jan 14, 2024
@alyssadai alyssadai deleted the handle-partial-nodes-success branch January 14, 2024 22:59
@surchs
Copy link
Copy Markdown
Contributor

surchs commented Apr 11, 2024

🚀 PR was released in v0.1.0 🚀

@surchs surchs added the released This issue/pull request has been released. label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released This issue/pull request has been released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle cases where requests to some nodes fail

3 participants