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

New 'timeseries' resource #897

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

New 'timeseries' resource #897

wants to merge 28 commits into from

Conversation

alebellu
Copy link
Contributor

Closes SixSq/tasklist#3059

Copy link
Contributor

github-actions bot commented Apr 11, 2024

Test Results

659 tests  +4   659 ✅ +4   3m 9s ⏱️ +4s
279 suites +2     0 💤 ±0 
279 files   +2     0 ❌ ±0 

Results for commit 79cf9ec. ± Comparison against base commit e4c934b.

♻️ This comment has been updated with latest results.



(def collection-acl {:query ["group/nuvla-admin"]
:add ["group/nuvla-admin"]})
Copy link
Contributor

Choose a reason for hiding this comment

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

Only admin can add and query a timeserie? Why not opening it to all authenticated users

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, thanks.

@@ -0,0 +1,145 @@
(ns sixsq.nuvla.server.resources.timeseries
Copy link
Contributor

Choose a reason for hiding this comment

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

resource name is always singular

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking the same, but I was not sure and I google for it: https://www.merriam-webster.com/grammar/series-singular-plural-grammar-usage#:~:text=It%20is%20usually%20seen%20in,series%20is%20a%20zero%20plural.

Apparently 'series' is both singular and plural in english, there is no 'serie' :-)

[request]
(let [{{:keys [resource-id]} :body :as response} (add-impl request)]
(create-timeseries resource-id)
response))
Copy link
Contributor

Choose a reason for hiding this comment

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

missing storing the timeserie document as a doc inside nuvla-timeserie index

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it is done inside add-impl


(defmethod crud/query resource-type
[request]
(query-impl request))
Copy link
Contributor

Choose a reason for hiding this comment

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

query not working since docs are note stored

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it should work, but I need to add a test for it, there is only one for the retrieve.

Copy link

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