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

Provide API to inspect FTR state #98311

Open
mshustov opened this issue Apr 26, 2021 · 6 comments
Open

Provide API to inspect FTR state #98311

mshustov opened this issue Apr 26, 2021 · 6 comments
Labels
impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. Team:Operations Team label for Operations Team

Comments

@mshustov
Copy link
Contributor

FTR config

It's hard to understand the final state of the FTR config due to its dynamic nature. Since it's not possible to determine the config shape with static analysis tools, we could provide API to show the FTR config value by request (it might be a CLI flag, an HTTP endpoint).
Input:

  return {
    testFiles: ...,
    services,
    servers: commonConfig.get('servers'),
    junit: ...,
    esTestCluster: {
      ...functionalConfig.get('esTestCluster'),
      serverArgs: ['xpack.security.enabled=false'],
    },
    kbnTestServer: {
      ...functionalConfig.get('kbnTestServer'),
      serverArgs: [
        ...functionalConfig.get('kbnTestServer.serverArgs'),
        '--server.xsrf.disableProtection=true',
      ],
    },
  };
}

Output:

{
    testFiles: ...,
    services: ...,
    servers: ...,
    junit: ...,
    esTestCluster: {
      license: ...,
      from: ....,
      serverArgs: ['xpack.security.enabled=false'],
      ...
    },
    kbnTestServer: {
      buildArgs:...,
      serverArgs: [
        '--no-base-path',
        '--server.xsrf.disableProtection=true',
        ...
      ],
      ...
    },
  };
}

FTR state

UiSettings

UiSettings are shared across the tests, it might be hard to enforce the proper state isolation, which can lead to barely debuggable problems. Like this #97222 (comment)
A developer can hit UiSettings HTTP endpoint to fetch the actual configuration when debugging a test, but it requires manual intervention to stop execution. Would it be possible to log the UiSetting state in debug logs?

Saved Object

Probably unnecessary. Large SO might add needless noise.

@mshustov mshustov added the Team:Operations Team label for Operations Team label Apr 26, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@rashmivkulkarni
Copy link
Contributor

cc @elastic/kibana-qa

@spalger
Copy link
Contributor

spalger commented Apr 28, 2021

I think something similar to the --print-config flag from ESLint would be nice here.

@wayneseymour
Copy link
Member

Perhaps both are useful, a cli flag and an http endpoint.

@spalger
Copy link
Contributor

spalger commented Apr 28, 2021

I was confused about the HTTP endpoint suggestion, what would the server be in this case? FTR config being consumed by code that might use an HTTP endpoint seems like it would only be relevant to the FTR code, which is running in the same process and has access to the config service, where these values can be read without HTTP. Can you expound a bit on how an HTTP endpoint would be used?

@wayneseymour
Copy link
Member

wayneseymour commented Apr 28, 2021 via email

@tylersmalley tylersmalley added 1 and removed 1 labels Oct 11, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Nov 5, 2021
@tylersmalley tylersmalley removed loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. EnableJiraSync labels Mar 16, 2022
@exalate-issue-sync exalate-issue-sync bot added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:small Small Level of Effort and removed loe:small Small Level of Effort labels Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. Team:Operations Team label for Operations Team
Projects
None yet
Development

No branches or pull requests

6 participants