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

fix(recording): backwards compatibility for restart parameter #1672

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

tthvo
Copy link
Member

@tthvo tthvo commented Sep 18, 2023

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Fixes: #1670

Description of the change:

Added back the restart parameter for backwards compatibility. Future major releases can remove it if needed but should highlight this.

Motivation for the change:

See #1670

I recall we had some discussion around this change before but I can't remember exactly what we landed on. Since this is changing in a minor release version the API "shouldn't" change in incompatible ways, but I'm okay with changing a query parameter like this. Or we could have the endpoint handler handle both forms and prefer the newer one if both are supplied.

How to manually test:

The old legacy graphQL query with restart parameter should work fine:

query {
    environmentNodes(filter: { name: "JDP" }) {
        descendantTargets {
            doStartRecording(recording: {
                name: "foo",
                template: "Profiling",
                templateType: "TARGET",
                duration: 30,
                restart: true
                }) {
                    name
                    state
            }
        }
    }
}

Also, operations on web client also succeeds.

@tthvo tthvo added the fix label Sep 18, 2023
@github-actions
Copy link
Contributor

Hi @tthvo! Add at least one of the required labels to this PR

Required labels are : chore,ci,cleanup,docs,feat,fix,perf,refactor,style,test

@tthvo
Copy link
Member Author

tthvo commented Sep 18, 2023

/build_test

@tthvo tthvo requested a review from mwangggg September 18, 2023 08:05
@tthvo
Copy link
Member Author

tthvo commented Sep 18, 2023

@github-actions
Copy link
Contributor

ARCH IMAGE
amd64 ghcr.io/cryostatio/cryostat:pr-1672-5b505813a11384658f61e0d2d9dad07b6f19f49a-linux-amd64
arm64 ghcr.io/cryostatio/cryostat:pr-1672-5b505813a11384658f61e0d2d9dad07b6f19f49a-linux-arm64

To run smoketest:

# amd64          
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1672-5b505813a11384658f61e0d2d9dad07b6f19f49a-linux-amd64 sh smoketest.sh

# or arm64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1672-5b505813a11384658f61e0d2d9dad07b6f19f49a-linux-arm64 sh smoketest.sh

Copy link
Member

@andrewazores andrewazores left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tthvo !

@andrewazores andrewazores merged commit d2fb0a0 into cryostatio:main Sep 18, 2023
7 checks passed
@tthvo tthvo deleted the restart-param branch September 18, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug] "Restart if recording already exists" checkbox doesn't work
2 participants