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

[Bug] Topology and Match Expressions cannot use target agent field #1320

Closed
andrewazores opened this issue Aug 9, 2024 · 0 comments · Fixed by cryostatio/cryostat#598
Closed
Assignees
Labels
bug Something isn't working

Comments

@andrewazores
Copy link
Member

Current Behavior

Target objects from the API have the following form:

                    "target": {
                        "agent": true,
                        "alias": "agent-test",
                        "annotations": {
                            "cryostat": [
                                {
                                    "key": "PID",
                                    "value": "1"
                                },
                                {
                                    "key": "HOST",
                                    "value": "quarkus-cryostat-agent-848c95489d-98kq4"
                                },
                                {
                                    "key": "PORT",
                                    "value": "9977"
                                },
                                {
                                    "key": "REALM",
                                    "value": "agent-test"
                                },
                                {
                                    "key": "JAVA_MAIN",
                                    "value": "/deployments/quarkus-run.jar"
                                },
                                {
                                    "key": "START_TIME",
                                    "value": "1723211328"
                                }
                            ],
                            "platform": [
                                {
                                    "key": "INSTANCE_ID",
                                    "value": "d57e346c-4624-4394-86e7-ef13233810de"
                                }
                            ]
                        },
                        "connectUrl": "http://10.217.1.165:9977",
                        "id": 14,
                        "jvmId": "b7r2b0iahFQrwV7HSSgPtw-Iyufb5bVQOuaJ9bnSO1E=",
                        "labels": []
                    }

The Match Expression evaluator provides a view of this object to the expression script engine:

https://github.com/cryostatio/cryostat/blob/67a09a50011f3079bf2f6e1382bf055a4cae84b6/src/main/java/io/cryostat/expressions/MatchExpressionEvaluator.java#L225

The isAgent()/agent accessor/field should be available here as well, so that the UI can use this for determining how to render the Topology node icons.

The server should also accept Match Expressions using this field.

Expected Behavior

No response

Steps To Reproduce

No response

Environment

No response

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant