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

Axon upload/download HTTP APIs #1817

Merged
merged 16 commits into from
Jul 27, 2020
Merged

Axon upload/download HTTP APIs #1817

merged 16 commits into from
Jul 27, 2020

Conversation

mikemoritz
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 21, 2020

Codecov Report

Merging #1817 into master will increase coverage by 9.39%.
The diff coverage is 98.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1817      +/-   ##
==========================================
+ Coverage   86.81%   96.21%   +9.39%     
==========================================
  Files         139      139              
  Lines       27053    27107      +54     
==========================================
+ Hits        23487    26080    +2593     
+ Misses       3566     1027    -2539     
Flag Coverage Δ
#linux 96.21% <98.14%> (+9.39%) ⬆️
#linux_replay 66.50% <38.88%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
synapse/lib/httpapi.py 94.16% <80.00%> (+0.05%) ⬆️
synapse/axon.py 99.06% <100.00%> (+0.26%) ⬆️
synapse/cortex.py 95.55% <100.00%> (+1.66%) ⬆️
synapse/lib/agenda.py 94.11% <0.00%> (-0.23%) ⬇️
synapse/lib/ast.py 97.76% <0.00%> (+0.04%) ⬆️
synapse/lib/node.py 97.80% <0.00%> (+0.19%) ⬆️
synapse/lib/types.py 97.56% <0.00%> (+0.30%) ⬆️
synapse/lib/stormtypes.py 97.38% <0.00%> (+0.48%) ⬆️
synapse/cryotank.py 91.32% <0.00%> (+0.57%) ⬆️
... and 45 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4ea5a6...1cbdc1e. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 21, 2020

Codecov Report

Merging #1817 into master will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1817      +/-   ##
==========================================
- Coverage   96.23%   96.18%   -0.06%     
==========================================
  Files         139      139              
  Lines       27088    27140      +52     
==========================================
+ Hits        26068    26104      +36     
- Misses       1020     1036      +16     
Flag Coverage Δ
#linux 96.18% <100.00%> (-0.06%) ⬇️
#linux_replay 66.49% <36.53%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
synapse/axon.py 99.06% <100.00%> (+0.26%) ⬆️
synapse/lib/httpapi.py 94.36% <100.00%> (+0.05%) ⬆️
synapse/lib/spawn.py 95.48% <0.00%> (-1.94%) ⬇️
synapse/lib/base.py 91.96% <0.00%> (-0.90%) ⬇️
synapse/lib/lmdbslab.py 98.34% <0.00%> (-0.62%) ⬇️
synapse/lib/agenda.py 94.11% <0.00%> (-0.23%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 147d6c5...dee75f6. Read the comment docs.

@mikemoritz mikemoritz changed the title WIP: Axon upload/download HTTP APIs Axon upload/download HTTP APIs Jul 23, 2020
synapse/axon.py Outdated
@@ -169,6 +236,10 @@ async def _initBlobStor(self):
self.blobs = self.blobslab.initdb('blobs')
self.onfini(self.blobslab.fini)

def _initAxonHttpApi(self):
self.addHttpApi('/api/v1/axon/files', AxonFilesHttpV1, {'cell': self})
Copy link
Contributor

Choose a reason for hiding this comment

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

just to leave some wiggle room api/v1/axon/files/put

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the endpoint, and also allow calling with POST or PUT.

synapse/axon.py Outdated
@@ -169,6 +236,10 @@ async def _initBlobStor(self):
self.blobs = self.blobslab.initdb('blobs')
self.onfini(self.blobslab.fini)

def _initAxonHttpApi(self):
self.addHttpApi('/api/v1/axon/files', AxonFilesHttpV1, {'cell': self})
self.addHttpApi('/api/v1/axon/files/(.*)', AxonFileHttpV1, {'cell': self})
Copy link
Contributor

Choose a reason for hiding this comment

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

similarly api/axon/v1/files/by/sha256/ and we could tighten down the regex too :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@invisig0th invisig0th merged commit 16644a4 into master Jul 27, 2020
@invisig0th invisig0th deleted the feat-axon-http branch July 27, 2020 13:22
jnwatson pushed a commit that referenced this pull request Jul 27, 2020
@vEpiphyte vEpiphyte added this to the v2.5.0 milestone Jul 28, 2020
@vEpiphyte vEpiphyte mentioned this pull request Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants