Giacomo Vercesi
046612f11c
revng.graphql: enforce index consistency
...
Force clients to provide the current index to run `produce` or
`runAnalysis`. Requests that do not provide the correct index return an
IndexError object.
2023-11-03 14:51:31 +01:00
Giacomo Vercesi
c83932003b
revng.daemon: also send index in invalidations
...
When sending invalidations via websocket, also send the new context
global index.
2023-11-03 12:13:58 +01:00
Giacomo Vercesi
94aa2b51d2
Add Context Global Index
2023-11-03 12:13:58 +01:00
Giacomo Vercesi
56af9c1f9d
Propagate errors from Analysis/Pipes to daemon
...
Leverage the `rp_error` mechanism to propagate errors from analyses and
pipes to the GraphQL schema.
2023-11-03 12:13:58 +01:00
Giacomo Vercesi
3b0d708a2f
Drop custom globals mutator from PipelineC
...
Remove globals mutator from PipelineC api, as there are analyses present
that allow changing them.
2023-11-03 12:13:58 +01:00
Giacomo Vercesi
8dd0b64030
revng.daemon: add missing emit_event
...
The `runAnalysesList` resolve did not emit a `CONTEXT` event when run.
2023-11-03 12:13:57 +01:00
Giacomo Vercesi
e2504dd6f2
Implement storage credentials update
...
Add the functionality to rev.ng's infrastructure to allow to dynamically
update the credentials of the underlying storage provider at runtime.
2023-09-14 17:32:08 +02:00
Giacomo Vercesi
f710af9f2f
Cleanup revng.daemon graphql API
...
Drop autogenerated queries from the GraphQL API and switch `revng.api`
to use `PipelineDescriptor`.
2023-09-14 15:44:33 +02:00
Giacomo Vercesi
e43e720a35
revng daemon: allow setting exposed CORS headers
...
Add the enviroment variable `REVNG_EXPOSE_HEADERS` for `revng daemon` to
allow customizing the headers exposed via CORS.
2023-09-06 16:12:43 +02:00
Giacomo Vercesi
93d3a6238d
revng: introduce S3 support
...
Add the capability for all revng tooling to run with an S3-backed
workdir.
2023-09-06 15:23:43 +02:00
Giacomo Vercesi
a84ebd0e51
revng.daemon: trim Eventmanager's functionality
...
Drop most of the functionality provided by EventManager. Add the
functionality that allows saving the working directory after a period of
inactivity.
2023-09-06 15:23:43 +02:00
Giacomo Vercesi
e719b3b7e5
Add components to revng cli driver
...
This commit introduces the concept of `Component` to a pipeline step.
This, in turn, can be used by clients to figure out which artifacts are
produced by which revng component.
Additionally, this commit overhauls the `revng daemon-self-test`
command, renaming it to `revng graphql` and adding extra flexibility.
2023-08-23 17:45:36 +02:00
Giacomo Vercesi
13ba286a9a
Drop hard-coded analyses list
...
Remove any use of hard-coded analyses lists, relying on user interaction
(e.g. command-line arguments) to have it instead.
2023-08-23 17:45:36 +02:00
Giacomo Vercesi
0ec2fdd175
revng.daemon: prevent shutdown crash
...
Change the behavior of `revng daemon` to avoid a crash at shutdown
caused by `rp_shutdown` not being called due to the pointer of
`rp_manager` not being freed.
2023-07-21 09:34:00 +02:00
Ivan Krysak
378f6e76f7
daemon: fix uploading binaries from html
...
The html view daemon sends when connected directly was not correctly
migrated to support analysis lists.
2023-05-25 06:25:07 +00:00
Giacomo Vercesi
7f73e2bfde
revng.daemon: drop REVNG_PROJECT_ID
...
Remove the logic for computing a manager's workdir using the
REVNG_PROJECT_ID environment variable, as it was unused. The
REVNG_DATA_DIR remains to allow persistence across restarts.
2023-05-24 14:59:16 +02:00
Giacomo Vercesi
31cd2b53f9
rcc: add codespell
...
Add codespell to the list of checks performed by
revng-check-conventions. This should reduce the amount of typos present
in the revng codebase.
2023-05-11 10:05:32 +02:00
Giacomo Vercesi
2e96e09f63
Drop analyze-all
...
Drop all the uses of analyzeAll and swap its use with the invocation of
the appropriate analysesList
2023-03-22 17:50:02 +01:00
Giacomo Vercesi
af237074f3
Implement AnalysesList in Python API & GraphQL
...
Implement the new functionality of AnalysesList on the python's side of
rev.ng and the GraphQL schema both in static and autogenerated form
2023-03-22 17:31:46 +01:00
Giacomo Vercesi
23286dc58f
GraphQL: expose analysis options
...
Add an additional parameter that allows specifying options for analyses
as a serialized json string
2023-03-22 17:31:46 +01:00
Giacomo Vercesi
1f097bb46a
revng.api: Fix leftover snake_case in as_dict
...
This commit fixes the name of the fields returned by the `as_dict`
function that were left in snake_case when the field in the schema was
camelCase
2023-03-22 17:31:46 +01:00
Giacomo Vercesi
15da250710
api/daemon: fix single analysis handling
...
* Let GraphQL accept zero or more parameters for analyses
* Handle the general case of analyses using zero or more containers with
a variable ammount of targets
2023-03-15 10:19:01 +01:00
Giacomo Vercesi
6f3dc255cf
revng.api: adopt rp_error
...
Change Python's API to handle the new `rp_error` and its two variations:
`DocumentError` and `SimpleError`.
2023-02-09 13:43:33 +01:00
Giacomo Vercesi
275e3943f7
daemon: rework starlette startup code
...
Rework the startup code used to boot starlette, this allows removing the
use of all globals, moreover it allow dropping the ManagerMiddleware
class as it is no longer needed.
2023-02-07 16:54:35 +01:00
Giacomo Vercesi
8a780a58aa
GraphQL: return binaries in b64
...
This change fixes the pipeline behavior when producing targets:
* produce and extract now return rp_buffer, which has a start pointer
and size
* the python api `revng.api` will return on produce/extract either str
or bytes depending on the mime type of the container
* the GraphQL api will encode bytes in base64
2023-02-07 16:54:35 +01:00
Giacomo Vercesi
82c3962a3c
Add GZip Middleware
...
Add the GZip Middleware to rev.ng daemon, allowing it to handle the
`Content-Encoding: gzip` header
2023-02-07 16:54:35 +01:00
Giacomo Vercesi
23b8ed8dbe
revng.daemon: allow extra middlewares
...
Introduce the environment variable `STARLETTE_MIDDLEWARES` that
allows adding additional middlewares at startup to the startlette
server.
2023-02-07 16:54:35 +01:00
Giacomo Vercesi
88e972c57c
revng fifo events: move handling to daemon
...
Move all the event handling logic to the `revng.daemon` logic, since
now fifo notifications also include the JWT token (if present) of the
request.
2023-02-07 16:54:35 +01:00
Giacomo Vercesi
fc93198e25
revng daemon: Fix resolve_step_artifacts
...
Fixes the GraphQL handler for step's artifacts as it was creating the
wrong object for the 'container' property
2023-02-07 16:54:35 +01:00
Giacomo Vercesi
52ff853d00
revng daemon: Fix CORS allowed headers
...
Add an option to CORSMiddleware to allow any header to be provided when
checking for CORS
2023-02-07 16:54:35 +01:00
Giacomo Vercesi
23cd7f871a
revng daemon: fix project-id checking
...
Fixes the regex that's used to check if the project ID is valid
2023-02-07 16:54:35 +01:00
Antonio Frighetto
ea0a06a876
revng.daemon: accept no arguments for analysis
...
Let GraphQL accept zero or more parameters for analyses.
2023-02-06 09:37:23 +01:00
Giacomo Vercesi
b4c1cd94e1
revng-daemon: preserve more signals
...
Add more signals to be handled from python rather than LLVM.
2023-02-01 17:46:19 +01:00
Giacomo Vercesi
7526d72492
Kinds: exposed locations produced
...
Expose the locations that can be found in each kind
2022-11-11 13:43:55 +01:00
Giacomo Vercesi
2c4f5d1381
GraphQL: introduce target endpoint
2022-10-30 09:13:34 +01:00
Giacomo Vercesi
81d25f9805
PipelineC: expose invalidation logic
2022-10-30 09:13:14 +01:00
Giacomo Vercesi
d7265ff160
PipelineC: allow signal masking
...
Some users of PipelineC might be interested in preserving
pre-existing signals, this commits adds this functionality.
2022-10-04 14:13:56 +02:00
Giacomo Vercesi
159fa8558d
revng.api: Count owned pointers and shutdown
...
rp_shutdown must be called after all the owning pointers given by
PipelineC are freed, in order to guarantee this easily, the python
ApiWrapper will use an atomic counter, which when shutdown has been
signaled and counter reaches zero will automatically call rp_shutdown
2022-10-04 14:13:55 +02:00
Giacomo Vercesi
4f5e9c5986
revng.daemon.util: Remove dead code
2022-10-04 14:13:55 +02:00
Alessandro Di Federico
3307fb4a46
api.Manager: use TemporaryDirectory if no workdir
2022-09-26 18:09:01 +02:00
Alessandro Di Federico
f6d5cd24dd
Give pretty names to temporary files
2022-09-26 18:09:01 +02:00
Giacomo Vercesi
7c900d45ca
revng.daemon: fix for ariadne>=0.16
2022-09-21 14:07:24 +02:00
Giacomo Vercesi
2ce7b216e8
GraphQL: drop step name conversion
2022-08-26 09:50:42 +02:00
Giacomo Vercesi
f281b5930b
revng.daemon: rework schema_generator.py
...
Rework both classes in schema_generator.py, main changes:
* Drop manager.pipeline_artifact_structure as it was used exclusively
by SchemaGenerator and is no longer needed
* Rename SchemaGen and BindableGen to SchemaGenerator and
DynamicBindableGenerator to better express their role, add
docstrings that explain what they do
* Decouple Artifacts and Analyses discovery, since a step can have
analyses and no artifacts (and vice-versa)
2022-08-26 09:50:37 +02:00
Giacomo Vercesi
09009836a1
PipelineC: expose globals verification
2022-07-28 08:47:46 +02:00
Giacomo Vercesi
80afd71721
Add singleTargetFilename to pipelines
...
A step's artifacts now include singleTargetFilename, which gives a
suggested filename to use when a single element is extracted from the
underlying container.
2022-06-29 14:50:58 +02:00
Giacomo Vercesi
f02aecfccb
Python API: produce now returns a dict
...
When requesting a produce for multiple targets the result will be a
dictionary mapping "<target>:<result>". This also changes the GraphQL
API where a json-serialized string is returned.
2022-06-29 14:50:58 +02:00
Giacomo Vercesi
30ef77e6fa
GraphQL: introduce queries to retrieve globals
...
Change the schema to allow introspection of context globals.
2022-06-29 14:50:58 +02:00
Giacomo Vercesi
636299785d
GraphQL: introduce artifacts introspection
...
Allow artifacts information (container and kind) to be retrieved from
the Step type.
2022-06-29 14:50:58 +02:00
Giacomo Vercesi
62e9baeddb
GraphQL: rework schema to be camelCase
...
GraphQL conventions, encourage the use of camelCase for query fields
and PascalCase for types, as detailed here:
https://graphql-rules.com/rules/naming-fields-args
2022-06-29 14:50:58 +02:00