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

feat(graphql): reimplement GraphQL API #294

Merged
merged 25 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
35adb2a
add graphql extension
andrewazores Feb 21, 2024
43e7130
add basic rootNode query
andrewazores Feb 21, 2024
16bcbd4
handle GET request query params in redirect
andrewazores Feb 21, 2024
7b0c037
retrieve node from database async
andrewazores Feb 21, 2024
f653c27
Revert "retrieve node from database async"
andrewazores Feb 21, 2024
3fb89c7
partial reimplement filter input
andrewazores Feb 21, 2024
126eb2c
enable more logging for troubleshooting
andrewazores Feb 21, 2024
381496b
port label/annotations selector matcher from 2.4
andrewazores Feb 22, 2024
d6e7e35
port GraphQL itest, not yet workable
andrewazores Feb 22, 2024
ff91822
add subquery description
andrewazores Feb 22, 2024
0aa75d8
spotbugs
andrewazores Feb 22, 2024
6fc255c
refactor
andrewazores Feb 29, 2024
2cba893
feat(graphql): add top-level query for targetNodes (#307)
andrewazores Feb 29, 2024
be0e4ed
added environmentNode
aali309 Feb 28, 2024
b3c7b65
proper naming for consistency
aali309 Feb 28, 2024
1fa0074
remove inner EnvironmentNode
aali309 Feb 28, 2024
72597ef
use LabelSelectorMatcher for label filtering
aali309 Feb 29, 2024
539cd65
feat(graphql): implement features to support dashboard automated anal…
andrewazores Mar 4, 2024
82319cf
fix(topology): correct GraphQL schema for Topology actions, implement…
andrewazores Mar 15, 2024
4c50721
feat(graphQL): add missing labels/archives subqueries/mutations (#319)
aali309 Apr 13, 2024
af04262
add dropped rebase changes - see #335
andrewazores Apr 15, 2024
36922a2
fix(grafana): add redirecting endpoint for archived recordings (#324)
andrewazores Apr 15, 2024
3b0732c
Merge branch 'main' into graphql
andrewazores Apr 18, 2024
17740e3
fixup! Merge branch 'main' into graphql
andrewazores Apr 18, 2024
30ba4df
update schema
andrewazores Apr 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions .github/workflows/pr-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,28 +270,28 @@ jobs:
body: commentBody
});

# compare-graphql-schema:
# needs: [update-schemas]
# runs-on: ubuntu-latest
# permissions:
# pull-requests: write
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: graphql-diff
# - name: Comment schema check result
# uses: actions/github-script@v6
# with:
# script: |
# const diffFmt = s => {
# return "```diff\n" + s + "\n```";
# };
# const commentBody = ${{ needs.update-schemas.outputs.GRAPHQL_STATUS }} == '0'
# ? `No GraphQL schema changes detected.`
# : `GraphQL schema change detected:\n\n${diffFmt(require('fs').readFileSync('${{ needs.update-schemas.outputs.GRAPHQL_DIFF_FILE }}'))}`;
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: commentBody
# });
compare-graphql-schema:
needs: [update-schemas]
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/download-artifact@v3
with:
name: graphql-diff
- name: Comment schema check result
uses: actions/github-script@v6
with:
script: |
const diffFmt = s => {
return "```diff\n" + s + "\n```";
};
const commentBody = ${{ needs.update-schemas.outputs.GRAPHQL_STATUS }} == '0'
? `No GraphQL schema changes detected.`
: `GraphQL schema change detected:\n\n${diffFmt(require('fs').readFileSync('${{ needs.update-schemas.outputs.GRAPHQL_DIFF_FILE }}'))}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: commentBody
});
6 changes: 3 additions & 3 deletions compose/cryostat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ services:
QUARKUS_HTTP_HOST: "cryostat"
QUARKUS_HTTP_PORT: ${CRYOSTAT_HTTP_PORT}
QUARKUS_HIBERNATE_ORM_LOG_SQL: "true"
CRYOSTAT_DISCOVERY_JDP_ENABLED: "true"
CRYOSTAT_DISCOVERY_PODMAN_ENABLED: "true"
CRYOSTAT_DISCOVERY_DOCKER_ENABLED: "true"
CRYOSTAT_DISCOVERY_JDP_ENABLED: ${CRYOSTAT_DISCOVERY_JDP_ENABLED:-true}
CRYOSTAT_DISCOVERY_PODMAN_ENABLED: ${CRYOSTAT_DISCOVERY_PODMAN_ENABLED:-true}
CRYOSTAT_DISCOVERY_DOCKER_ENABLED: ${CRYOSTAT_DISCOVERY_DOCKER_ENABLED:-true}
JAVA_OPTS_APPEND: "-XX:+FlightRecorder -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m -XX:StartFlightRecording=name=startup,settings=profile,disk=true,duration=30s -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false"
restart: unless-stopped
healthcheck:
Expand Down
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-graphql</artifactId>
</dependency>
<dependency>
<groupId>io.smallrye.reactive</groupId>
<artifactId>smallrye-mutiny-vertx-web-client</artifactId>
Expand Down
76 changes: 76 additions & 0 deletions schema/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ components:
type: integer
downloadUrl:
type: string
jvmId:
type: string
metadata:
$ref: '#/components/schemas/Metadata'
name:
Expand Down Expand Up @@ -382,6 +384,31 @@ paths:
- SecurityScheme: []
tags:
- Recordings
/api/beta/fs/recordings/{jvmId}:
get:
parameters:
- in: path
name: jvmId
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
items:
$ref: '#/components/schemas/ArchivedRecordingDirectory'
type: array
description: OK
"401":
description: Not Authorized
"403":
description: Not Allowed
security:
- SecurityScheme: []
tags:
- Recordings
/api/beta/fs/recordings/{jvmId}/{filename}:
delete:
parameters:
Expand Down Expand Up @@ -519,6 +546,30 @@ paths:
- SecurityScheme: []
tags:
- Recordings
/api/beta/recordings/{connectUrl}/{filename}/upload:
post:
parameters:
- in: path
name: connectUrl
required: true
schema:
type: string
- in: path
name: filename
required: true
schema:
type: string
responses:
"200":
description: OK
"401":
description: Not Authorized
"403":
description: Not Allowed
security:
- SecurityScheme: []
tags:
- Recordings
/api/beta/recordings/{jvmId}:
get:
parameters:
Expand Down Expand Up @@ -1242,6 +1293,31 @@ paths:
description: OK
tags:
- Discovery
/api/v2.2/graphql:
get:
responses:
"200":
description: OK
"401":
description: Not Authorized
"403":
description: Not Allowed
security:
- SecurityScheme: []
tags:
- Graph QL
post:
responses:
"200":
description: OK
"401":
description: Not Authorized
"403":
description: Not Allowed
security:
- SecurityScheme: []
tags:
- Graph QL
/api/v2/rules:
get:
responses:
Expand Down
Loading
Loading