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

replace stack driver log engine in Lucy with a log engine based on graphql polling #13333

Merged
merged 40 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4aab880
writing the log engine, stubbing out the actual graphql querry
Jun 1, 2023
7ece45f
Add stub GraphQL endpoints for polling from Lucy
mrmr1993 Jun 6, 2023
4db19d9
WIP ran out of time
mrmr1993 Jun 6, 2023
c6d9066
Store log messages for integration test executive in Mina_lib
mrmr1993 Jun 6, 2023
ceb896d
Filter by structured_event_id
mrmr1993 Jun 6, 2023
00f35e9
well it compiles
Jun 7, 2023
eed4a7e
check if start filtered log is ok
Jun 7, 2023
130b3e4
switch out the log engine
Jun 8, 2023
63436bb
fix mistake with reversed if statement
Jun 8, 2023
6cc55d2
add debuging logs
Jun 8, 2023
75cc118
iter in parallel
Jun 8, 2023
8951656
insert an after statement
Jun 8, 2023
150b9d2
downgrade the annoying log message
Jun 8, 2023
6faba51
let it fail safely if it fails during poll_start_filtered_log
Jun 8, 2023
3ffd42a
Silence logs from GraphQL polling
mrmr1993 Jun 9, 2023
4b6e848
Poll each node in its own loop for structured logs, reformat the filter
mrmr1993 Jun 9, 2023
3409831
Doc strings, why not
mrmr1993 Jun 9, 2023
8ceb4f9
Update parsing
mrmr1993 Jun 9, 2023
287982f
Remove unused network parameters
mrmr1993 Jun 9, 2023
0d2a9b2
Pause between filtered log entry poll events
mrmr1993 Jun 9, 2023
8718247
Remove some noisy debugging logs
mrmr1993 Jun 9, 2023
e0a2452
Use arrays, we only ever iterate and take the length anyway
mrmr1993 Jun 9, 2023
fc0da2a
Remove noisy log
mrmr1993 Jun 9, 2023
445164a
There's no good reason to wait for the GraphQL to return, so don't
mrmr1993 Jun 9, 2023
c77e296
Reduce delay in GraphQL filtered log request retries
mrmr1993 Jun 9, 2023
dce4682
DO NOT MERGE: Include debug logs in output
mrmr1993 Jun 9, 2023
f23c4b4
Handle nodes going offline
mrmr1993 Jun 9, 2023
6970ebe
Emit the Node_offline event if we fail to poll or events aren't setup
mrmr1993 Jun 9, 2023
901cece
try to hook up the archive node to graphql
Jun 9, 2023
066fd90
Revert "try to hook up the archive node to graphql"
mrmr1993 Jun 9, 2023
a72aef2
Actually initialize the 'started' flag
mrmr1993 Jun 9, 2023
3f1626c
Fixup inverted conditional
mrmr1993 Jun 9, 2023
56bbc4f
Back out accidental changes
mrmr1993 Jun 9, 2023
8b13456
Revert "DO NOT MERGE: Include debug logs in output"
mrmr1993 Jun 9, 2023
9289d6f
Use local archive node variable for GraphQL ingress
mrmr1993 Jun 9, 2023
cb1a93e
Oops, wrong one
mrmr1993 Jun 9, 2023
772cdd9
use more standard daemon configs for the archive node
Jun 10, 2023
79b478e
add graphql exposure to archive.yaml
Jun 11, 2023
379ec0e
remove the duplicate archive service
Jun 11, 2023
d2b9a98
delay in payments test as workaround
Jun 12, 2023
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
9 changes: 1 addition & 8 deletions automation/terraform/modules/kubernetes/testnet/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,7 @@ locals {

archive_vars = [for item in var.archive_configs : {
testnetName = var.testnet_name
mina = {
image = var.mina_image
useCustomEntrypoint = var.use_custom_entrypoint
customEntrypoint = var.custom_entrypoint
seedPeers = var.additional_peers
runtimeConfig = var.runtime_config
# seedPeersURL = var.seed_peers_url
}
mina = local.daemon
healthcheck = local.healthcheck_vars
archive = item
postgresql = {
Expand Down
4 changes: 4 additions & 0 deletions automation/terraform/modules/kubernetes/testnet/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ output "seeds_release" {
value = helm_release.seeds
}

output "archive_nodes_release" {
value = helm_release.archive_node
}

output "block_producers_release" {
value = helm_release.block_producers
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ resource "kubernetes_ingress_v1" "testnet_graphql_ingress" {
module.kubernetes_testnet.testnet_namespace,
module.kubernetes_testnet.seeds_release,
module.kubernetes_testnet.block_producers_release,
module.kubernetes_testnet.archive_nodes_release,
module.kubernetes_testnet.snark_workers_release
]

Expand All @@ -26,6 +27,7 @@ resource "kubernetes_ingress_v1" "testnet_graphql_ingress" {
for_each = concat(
[local.seed_config.name],
[for config in var.block_producer_configs : config.name],
[for config in local.archive_node_configs : config.name],
var.snark_coordinator_config != null ? [var.snark_coordinator_config.name] : []
)

Expand Down
144 changes: 134 additions & 10 deletions graphql_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,46 @@
"isDeprecated": true,
"deprecationReason": "use createAccount instead"
},
{
"name": "startFilteredLog",
"description":
"TESTING ONLY: Start filtering and recording all structured events in memory",
"args": [
{
"name": "filter",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
}
},
"defaultValue": null
}
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "createAccount",
"description":
Expand Down Expand Up @@ -7407,16 +7447,6 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "Boolean",
"description": null,
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "AnnotatedBalance",
Expand Down Expand Up @@ -7840,6 +7870,68 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "SCALAR",
"name": "Boolean",
"description": null,
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "GetFilteredLogEntries",
"description": null,
"fields": [
{
"name": "logMessages",
"description": "Structured log messages since the given offset",
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "isCapturing",
"description":
"Whether we are capturing structured log messages",
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "Metrics",
Expand Down Expand Up @@ -9201,6 +9293,38 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "getFilteredLogEntries",
"description":
"TESTING ONLY: Retrieve all new structured events in memory",
"args": [
{
"name": "offset",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
},
"defaultValue": null
}
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "GetFilteredLogEntries",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "ownedWallets",
"description":
Expand Down
17 changes: 17 additions & 0 deletions helm/archive-node/templates/archive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,20 @@ spec:
{{- end }}
- name: actual-libp2p
emptyDir: {}
---
{{- if $.Values.mina.exposeGraphql }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "archive-node.fullname" . }}-graphql
spec:
type: ClusterIP
publishNotReadyAddresses: true
selector:
app: {{ template "archive-node.fullname" . }}
ports:
- name: http-graphql
protocol: TCP
port: 80
targetPort: {{ $.Values.mina.ports.graphql }}
{{- end }}
12 changes: 8 additions & 4 deletions src/app/test_executive/payments_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,14 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct
let%bind () =
section_hard
"change snark worker key from snark-node-key1 to snark-node-key2"
(Network.Node.must_set_snark_worker ~logger snark_coordinator
~new_snark_pub_key:
( snark_node_key2.keypair.public_key
|> Signature_lib.Public_key.compress ) )
(let%bind () =
Network.Node.must_set_snark_worker ~logger snark_coordinator
~new_snark_pub_key:
( snark_node_key2.keypair.public_key
|> Signature_lib.Public_key.compress )
in
(* adding a wait for 3 minutes so that the new snark worker can start. this is a temporary solution to what's essentially a race condition causing lots of flakiness/non-determinism for this test *)
Malleable_error.lift (Async.after (Time.Span.of_int_sec 180)) )
in
let%bind () =
section_hard
Expand Down
1 change: 1 addition & 0 deletions src/lib/integration_test_cloud_engine/dune
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@
data_hash_lib
unsigned_extended
mina_graphql
error_json
)
)
Loading