Unable to add new note to my locally running grafeas

96 views
Skip to first unread message

Pavan Tej Mln

unread,
Mar 6, 2020, 6:40:31 PM3/6/20
to Grafeas Users
Hello,

I setup the grafeas api locally. I was able to add a new project but unable to create a new note. 

I am getting the error - 

{
 
"error": "a noteId must be specified",
 
"message": "a noteId must be specified",
 
"code": 3,
 
"details": []
}

Can I get some help here so that I can explore grafeas faster. Also, does anyone have an example of using the clients? go or java does not matter. Running into the blockers with them as well. 

Pavan Tej Mln

unread,
Mar 6, 2020, 6:42:12 PM3/6/20
to Grafeas Users
Not sure how to specify the noteId here. I tried a couple of things but still blocked.

Aysylu Greenberg

unread,
Mar 6, 2020, 7:21:19 PM3/6/20
to Grafeas Users
Hi Pavan,

Thanks for reaching out, Grafeas Eng Lead here. How are you sending the request to create a note? Note ID is the name of the note, which is a required field: proto definition. Please take a look at documentation on how to create notes and occurrences: link.

Cheers,
Aysylu

Pavan Tej Mln

unread,
Mar 9, 2020, 3:34:23 PM3/9/20
to Grafeas Users
That immediately unblocked me, thank you. I was not looking at all other .md files in that repo. I will make an attempt to look carefully at the repo, from next time. 

I am now trying to find an example of api request thats using the filter expression . And looking further, I see this! Are filters implemented? and if yes, is there an example before I spend the next few mins trying different ways to use it.

My use-case is simple - trying to use Grafeas to store artifacts metadata and the environment its deployed to. I would want to query Environment (I ll have this as a type of Note) to get the version vector of the artifacts that have passed the deployment checks. Any input/resources/examples would be appreciated.

Pavan

Pavan Tej Mln

unread,
Mar 9, 2020, 6:06:22 PM3/9/20
to Grafeas Users
I am looking at this - https://github.com/grafeas/grafeas/tree/master/go/filtering and I am not familiar with this query language. Any example would speed things up.

pavan

Juan David Gómez

unread,
Mar 10, 2020, 5:15:28 AM3/10/20
to Grafeas Users
I think filtering is not implemented. Almost not in the Postgresql and Oracle implementation. If you check the input parameters filter here for example, is not being used https://github.com/grafeas/grafeas/blob/master/go/v1beta1/storage/pgsqlstore.go

--
You received this message because you are subscribed to the Google Groups "Grafeas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grafeas-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grafeas-users/b854003b-27fd-45f6-91fa-da7e05edbf43%40googlegroups.com.


--
Enviado desde mi reloj Casio

Pavan Tej Mln

unread,
Mar 10, 2020, 5:29:27 PM3/10/20
to Grafeas Users
I see. Thank you for your response Juan. 

I also see that filtering is not implemented in other storage types as well. If thats the case, how do you retrieve notes/occurrences based on a certain property? I would be happy to look at any examples of retrieving an occurrences of a Note based on an attribute like packageVersion etc..

Pavan 
To unsubscribe from this group and stop receiving emails from it, send an email to grafea...@googlegroups.com.

Aysylu Greenberg

unread,
Mar 18, 2020, 9:39:57 AM3/18/20
to Pavan Tej Mln, Grafeas Users, Wiktor Kozlik
Hi Pavan,

Juan is correct that filtering isn't implemented. For each storage backend used by the reference server implementation, we'll need to implement the filtering, to be able to run the queries based on specific properties of occurrences like you described. Contributions are welcome!

For examples of using the filter in a request, please see how Kritis utilizes the ContainerAnalysis implementation of Grafeas: link.

Best regards,
Aysylu

You received this message because you are subscribed to a topic in the Google Groups "Grafeas Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grafeas-users/ca2c7nfcX98/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grafeas-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grafeas-users/0a82dccb-8bb8-4933-8a94-a6d0a0b775b4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages