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

[Fleet] Don't add extra quotes to YAML strings from manifest files #93585

Merged
merged 9 commits into from
Mar 5, 2021

Conversation

skh
Copy link
Contributor

@skh skh commented Mar 4, 2021

Summary

Fixes #93253

This reverts the changes made in #91418 , and adds extra validation to the Policy UI in Fleet to guard against invalid YAML string values.

With this change, string default values in YAML files in packages need to be enclosed in quotes like this when they start with the wildcard *:

  • '"*"', '"*foo"' or
  • "\"*\"", "\"*foo\""

When a user tries to enter such a string when creating a policy, it is caught by the form validation.

Background

Currently, the package registry reads in package metadata from YAML files in packages, and presents it to the Kibana Fleet plugin in JSON format. For an example, see the policy_templates section in https://epr.elastic.co/package/apache/0.3.4/ .

If the package contains default values for string properties, the information if these strings were quoted or not gets lost during the translation to JSON, so

- name: some_var
  type: text
  default: "*"

and

- name: some_var
  type: text
  default: *

would both result in the JSON output

{
  "name": "some_var",
  "default": "*"
}

in the registry output. When this JSON object is turned into YAML again later, the string in question is left unquoted, so it is now

default: *

in both cases. When that YAML is parsed again, it leads to a parser error because the string starts with a *, which for YAML means this should be parsed as an alias.

#91418 tried to amend this by cleverly adding quotes later in the process for strings which were deemed problematic. This led to other bugs (see #93253 ) and was clearly not a good solution.

This change now uses a different approach, and gives the responsibility to provide correctly quoted strings to the package author, and the user. Package authors now must take care to use escaped quotation marks in case they need to be preserved in the final YAML policy. Users are helped by additional form validation which points out when they need to enclose their strings in "".

How to test this

  • Add any integration to any policy. Try to enter a string like * or *foo in a text field, and verify that you can't save the integration. Play around with it and try to break it.
    image

  • Add quotes as requested by the form validation, save the integration, and verify that the operation is successful and the generated policy looks correct.

  • Craft a package with a string default value like '*' or "*foo" and try to add it to a policy. Verify that you see the same error in the form validation as above. (The current APM package in the snapshot registry has this problem.)

  • Fix the package so that the string default value now contains escaped quotes, like '"*"' or "\"*foo\"". Verify that you can add the integration to a policy correctly.

  • Verify that you can add the kafka integration to a policy, and that the policy contains these lines:
    image

Checklist

Delete any items that are not applicable to this PR.

@skh skh requested a review from a team as a code owner March 4, 2021 12:17
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Mar 4, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@skh skh self-assigned this Mar 4, 2021
@skh skh added release_note:skip Skip the PR/issue when compiling release notes v7.12.0 v7.13.0 v8.0.0 labels Mar 4, 2021
@skh
Copy link
Contributor Author

skh commented Mar 4, 2021

@simitt If we agree on this solution, the apm package needs to be fixed so the wildcard in the default value for rum_allow_origins is quoted correctly.

Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

LGTM! It will help the Kafka package behave correctly in prod.

@ph ph added the test-plan label Mar 4, 2021
Copy link
Contributor

@simitt simitt left a comment

Choose a reason for hiding this comment

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

LGTM from the description! (did not run a local test)

@simitt
Copy link
Contributor

simitt commented Mar 4, 2021

fix in APM Server: elastic/apm-server#4917

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

🚀
We should really push to have some package policy validation server side at some point

@skh
Copy link
Contributor Author

skh commented Mar 4, 2021

@EricDavisX When this is tested manually by the QA team, the steps starting with "Craft a package" and "Fix the package" should probably be skipped because they are too complex to set up.

@skh skh force-pushed the 93253-handle-wildcards-strings-better branch from a93c0a7 to e7c41f4 Compare March 4, 2021 15:06
@leehinman
Copy link

I have a use case where the substitution is part of a multi-line block

      value: |
        {{{ search }}} | streamstats

And the default definition for search is:

      - name: search
        type: text
        title: Search string
        show_user: true
        required: true
        default: "search sourcetype=\"access*\""

After substitution we want the result to be:

search sourcetype="access*" | streamstats

@skh skh force-pushed the 93253-handle-wildcards-strings-better branch from 9b75990 to 1c410ea Compare March 4, 2021 15:41
@skh
Copy link
Contributor Author

skh commented Mar 4, 2021

@elasticmachine merge upstream

@ph
Copy link
Contributor

ph commented Mar 4, 2021

We should really push to have some package policy validation server side at some point

@nchaulet for this do you mean at the package-spec level?

@nchaulet
Copy link
Member

nchaulet commented Mar 4, 2021

We should really push to have some package policy validation server side at some point

@ph I mean at the API level, currently all the package validation is happening client side, so an user that is using the API could bypass the validation

simitt added a commit to simitt/apm-server that referenced this pull request Mar 5, 2021
simitt added a commit to simitt/apm-server that referenced this pull request Mar 5, 2021
simitt added a commit to elastic/apm-server that referenced this pull request Mar 5, 2021
simitt added a commit to elastic/apm-server that referenced this pull request Mar 5, 2021
@skh
Copy link
Contributor Author

skh commented Mar 5, 2021

@elasticmachine merge upstream

@skh skh merged commit 3cd0d45 into elastic:master Mar 5, 2021
@skh skh deleted the 93253-handle-wildcards-strings-better branch March 5, 2021 14:00
skh added a commit to skh/kibana that referenced this pull request Mar 5, 2021
…lastic#93585)

* Add UI validation for string YAML values in policies.

* Do not quote YAML strings containing special characters.

* Add test case for wildcards in the middle of strings.

* Add multiline test case.

* Polish test case.

* Update API docs

Co-authored-by: Kibana Machine <[email protected]>
skh added a commit to skh/kibana that referenced this pull request Mar 5, 2021
…lastic#93585)

* Add UI validation for string YAML values in policies.

* Do not quote YAML strings containing special characters.

* Add test case for wildcards in the middle of strings.

* Add multiline test case.

* Polish test case.

* Update API docs

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	api_docs/fleet.json
skh added a commit that referenced this pull request Mar 5, 2021
…93585) (#93778)

* Add UI validation for string YAML values in policies.

* Do not quote YAML strings containing special characters.

* Add test case for wildcards in the middle of strings.

* Add multiline test case.

* Polish test case.

* Update API docs

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	api_docs/fleet.json
skh added a commit that referenced this pull request Mar 5, 2021
…93585) (#93773)

* Add UI validation for string YAML values in policies.

* Do not quote YAML strings containing special characters.

* Add test case for wildcards in the middle of strings.

* Add multiline test case.

* Polish test case.

* Update API docs

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
@skh
Copy link
Contributor Author

skh commented Mar 8, 2021

so an user that is using the API could bypass the validation

@nchaulet @ph When that happens, the endpoint will fail with an error from the YAML parser before a policy is created. So, in a way, we already have server-side validation, even if with a very unhelpful error message.

I've created #93926 to improve this.

@kibanamachine
Copy link
Contributor

kibanamachine commented Mar 8, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / general / X-Pack API Integration Tests.x-pack/test/api_integration/apis/uptime/rest/monitor_states_generated·ts.apis uptime uptime REST endpoints with generated data monitor state scoping test status filter should not return a monitor with mix state if check status filter is up

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://dryrun

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook in "apis"
[00:04:31]           └-: uptime
[00:04:31]             └-> "before all" hook in "uptime"
[00:04:31]             └-> "before all" hook in "uptime"
[00:04:31]               │ debg No indices to delete [pattern=heartbeat*]
[00:04:35]             └-: uptime REST endpoints
[00:04:35]               └-> "before all" hook in "uptime REST endpoints"
[00:04:35]               └-: with generated data
[00:04:35]                 └-> "before all" hook in "with generated data"
[00:04:44]                 └-: monitor state scoping
[00:04:44]                   └-> "before all" hook in "monitor state scoping"
[00:04:44]                   └-> "before all" hook: load heartbeat data in "monitor state scoping"
[00:04:44]                     │ info [uptime/blank] Loading "mappings.json"
[00:04:44]                     │ info [uptime/blank] Loading "data.json"
[00:04:44]                     │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1615208352527500658] [heartbeat-8-generated-test/-T_XqrX3SzunWxiAaDXkfg] deleting index
[00:04:44]                     │ info [uptime/blank] Deleted existing index "heartbeat-8-generated-test"
[00:04:44]                     │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1615208352527500658] [heartbeat-8-generated-test] creating index, cause [api], templates [], shards [1]/[1]
[00:04:44]                     │ info [uptime/blank] Created index "heartbeat-8-generated-test"
[00:04:44]                     │ debg [uptime/blank] "heartbeat-8-generated-test" settings undefined
[00:04:49]                   └-: test status filter
[00:04:49]                     └-> "before all" hook for "should return all monitor when no status filter"
[00:04:49]                     └-> "before all" hook: generate three monitors with up, down, mix state for "should return all monitor when no status filter"
[00:04:49]                       │ info [uptime/blank] Loading "mappings.json"
[00:04:49]                       │ info [uptime/blank] Loading "data.json"
[00:04:49]                       │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1615208352527500658] [heartbeat-8-generated-test/dF5y8PrYTMqPn46f2lAZTQ] deleting index
[00:04:49]                       │ info [uptime/blank] Deleted existing index "heartbeat-8-generated-test"
[00:04:49]                       │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1615208352527500658] [heartbeat-8-generated-test] creating index, cause [api], templates [], shards [1]/[1]
[00:04:49]                       │ info [uptime/blank] Created index "heartbeat-8-generated-test"
[00:04:49]                       │ debg [uptime/blank] "heartbeat-8-generated-test" settings undefined
[00:04:49]                     └-> should return all monitor when no status filter
[00:04:49]                       └-> "before each" hook: global before each for "should return all monitor when no status filter"
[00:04:49]                       └-> "before each" hook: clear settings for "should return all monitor when no status filter"
[00:04:49]                         │ debg Deleting saved object {
[00:04:49]                         │        type: 'uptime-dynamic-settings',
[00:04:49]                         │        id: 'uptime-dynamic-settings-singleton'
[00:04:49]                         │      }/%s
[00:04:50]                       └-> "before each" hook: load heartbeat data for "should return all monitor when no status filter"
[00:04:50]                         │ info [uptime/blank] Loading "mappings.json"
[00:04:50]                         │ info [uptime/blank] Loading "data.json"
[00:04:50]                         │ info [uptime/blank] Skipped restore for existing index "heartbeat-8-generated-test"
[00:04:50]                       └- ✓ pass  (108ms) "apis uptime uptime REST endpoints with generated data monitor state scoping test status filter should return all monitor when no status filter"
[00:04:50]                     └-> should return a monitor with mix state if check status filter is down
[00:04:50]                       └-> "before each" hook: global before each for "should return a monitor with mix state if check status filter is down"
[00:04:50]                       └-> "before each" hook: clear settings for "should return a monitor with mix state if check status filter is down"
[00:04:50]                         │ debg Deleting saved object {
[00:04:50]                         │        type: 'uptime-dynamic-settings',
[00:04:50]                         │        id: 'uptime-dynamic-settings-singleton'
[00:04:50]                         │      }/%s
[00:04:51]                       └-> "before each" hook: load heartbeat data for "should return a monitor with mix state if check status filter is down"
[00:04:51]                         │ info [uptime/blank] Loading "mappings.json"
[00:04:51]                         │ info [uptime/blank] Loading "data.json"
[00:04:51]                         │ info [uptime/blank] Skipped restore for existing index "heartbeat-8-generated-test"
[00:04:51]                       └- ✓ pass  (98ms) "apis uptime uptime REST endpoints with generated data monitor state scoping test status filter should return a monitor with mix state if check status filter is down"
[00:04:51]                     └-> should not return a monitor with mix state if check status filter is up
[00:04:51]                       └-> "before each" hook: global before each for "should not return a monitor with mix state if check status filter is up"
[00:04:51]                       └-> "before each" hook: clear settings for "should not return a monitor with mix state if check status filter is up"
[00:04:51]                         │ debg Deleting saved object {
[00:04:51]                         │        type: 'uptime-dynamic-settings',
[00:04:51]                         │        id: 'uptime-dynamic-settings-singleton'
[00:04:51]                         │      }/%s
[00:04:52]                       └-> "before each" hook: load heartbeat data for "should not return a monitor with mix state if check status filter is up"
[00:04:52]                         │ info [uptime/blank] Loading "mappings.json"
[00:04:52]                         │ info [uptime/blank] Loading "data.json"
[00:04:52]                         │ info [uptime/blank] Skipped restore for existing index "heartbeat-8-generated-test"
[00:04:52]                       └- ✖ fail: apis uptime uptime REST endpoints with generated data monitor state scoping test status filter should not return a monitor with mix state if check status filter is up
[00:04:52]                       │       Error: expected 0 to sort of equal 1
[00:04:52]                       │       + expected - actual
[00:04:52]                       │ 
[00:04:52]                       │       -0
[00:04:52]                       │       +1
[00:04:52]                       │       
[00:04:52]                       │       at Assertion.assert (/dev/shm/workspace/parallel/3/kibana/packages/kbn-expect/expect.js:100:11)
[00:04:52]                       │       at Assertion.eql (/dev/shm/workspace/parallel/3/kibana/packages/kbn-expect/expect.js:244:8)
[00:04:52]                       │       at Context.<anonymous> (test/api_integration/apis/uptime/rest/monitor_states_generated.ts:201:37)
[00:04:52]                       │       at Object.apply (/dev/shm/workspace/parallel/3/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)
[00:04:52]                       │ 
[00:04:52]                       │ 

Stack Trace

Error: expected 0 to sort of equal 1
    at Assertion.assert (/dev/shm/workspace/parallel/3/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/parallel/3/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.<anonymous> (test/api_integration/apis/uptime/rest/monitor_states_generated.ts:201:37)
    at Object.apply (/dev/shm/workspace/parallel/3/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16) {
  actual: '0',
  expected: '1',
  showDiff: true
}

Kibana Pipeline / general / X-Pack API Integration Tests.x-pack/test/api_integration/apis/uptime/rest/monitor_states_generated·ts.apis uptime uptime REST endpoints with generated data monitor state scoping test status filter should not return a monitor with mix state if check status filter is up

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook in "apis"
[00:04:37]           └-: uptime
[00:04:37]             └-> "before all" hook in "uptime"
[00:04:37]             └-> "before all" hook in "uptime"
[00:04:37]               │ debg No indices to delete [pattern=heartbeat*]
[00:04:41]             └-: uptime REST endpoints
[00:04:41]               └-> "before all" hook in "uptime REST endpoints"
[00:04:41]               └-: with generated data
[00:04:41]                 └-> "before all" hook in "with generated data"
[00:04:50]                 └-: monitor state scoping
[00:04:50]                   └-> "before all" hook in "monitor state scoping"
[00:04:50]                   └-> "before all" hook: load heartbeat data in "monitor state scoping"
[00:04:50]                     │ info [uptime/blank] Loading "mappings.json"
[00:04:50]                     │ info [uptime/blank] Loading "data.json"
[00:04:50]                     │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1615208352527500658] [heartbeat-8-generated-test/EwviAJrQRxyY4_-wgtXbMQ] deleting index
[00:04:50]                     │ info [uptime/blank] Deleted existing index "heartbeat-8-generated-test"
[00:04:50]                     │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1615208352527500658] [heartbeat-8-generated-test] creating index, cause [api], templates [], shards [1]/[1]
[00:04:50]                     │ info [uptime/blank] Created index "heartbeat-8-generated-test"
[00:04:50]                     │ debg [uptime/blank] "heartbeat-8-generated-test" settings undefined
[00:04:55]                   └-: test status filter
[00:04:55]                     └-> "before all" hook for "should return all monitor when no status filter"
[00:04:55]                     └-> "before all" hook: generate three monitors with up, down, mix state for "should return all monitor when no status filter"
[00:04:55]                       │ info [uptime/blank] Loading "mappings.json"
[00:04:55]                       │ info [uptime/blank] Loading "data.json"
[00:04:55]                       │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1615208352527500658] [heartbeat-8-generated-test/NeGueudyQy-zZDAWC0G8NA] deleting index
[00:04:55]                       │ info [uptime/blank] Deleted existing index "heartbeat-8-generated-test"
[00:04:55]                       │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1615208352527500658] [heartbeat-8-generated-test] creating index, cause [api], templates [], shards [1]/[1]
[00:04:55]                       │ info [uptime/blank] Created index "heartbeat-8-generated-test"
[00:04:55]                       │ debg [uptime/blank] "heartbeat-8-generated-test" settings undefined
[00:04:55]                     └-> should return all monitor when no status filter
[00:04:55]                       └-> "before each" hook: global before each for "should return all monitor when no status filter"
[00:04:55]                       └-> "before each" hook: clear settings for "should return all monitor when no status filter"
[00:04:55]                         │ debg Deleting saved object {
[00:04:55]                         │        type: 'uptime-dynamic-settings',
[00:04:55]                         │        id: 'uptime-dynamic-settings-singleton'
[00:04:55]                         │      }/%s
[00:04:56]                       └-> "before each" hook: load heartbeat data for "should return all monitor when no status filter"
[00:04:56]                         │ info [uptime/blank] Loading "mappings.json"
[00:04:56]                         │ info [uptime/blank] Loading "data.json"
[00:04:56]                         │ info [uptime/blank] Skipped restore for existing index "heartbeat-8-generated-test"
[00:04:56]                       └- ✓ pass  (93ms) "apis uptime uptime REST endpoints with generated data monitor state scoping test status filter should return all monitor when no status filter"
[00:04:56]                     └-> should return a monitor with mix state if check status filter is down
[00:04:56]                       └-> "before each" hook: global before each for "should return a monitor with mix state if check status filter is down"
[00:04:56]                       └-> "before each" hook: clear settings for "should return a monitor with mix state if check status filter is down"
[00:04:56]                         │ debg Deleting saved object {
[00:04:56]                         │        type: 'uptime-dynamic-settings',
[00:04:56]                         │        id: 'uptime-dynamic-settings-singleton'
[00:04:56]                         │      }/%s
[00:04:57]                       └-> "before each" hook: load heartbeat data for "should return a monitor with mix state if check status filter is down"
[00:04:57]                         │ info [uptime/blank] Loading "mappings.json"
[00:04:57]                         │ info [uptime/blank] Loading "data.json"
[00:04:57]                         │ info [uptime/blank] Skipped restore for existing index "heartbeat-8-generated-test"
[00:04:57]                       └- ✓ pass  (96ms) "apis uptime uptime REST endpoints with generated data monitor state scoping test status filter should return a monitor with mix state if check status filter is down"
[00:04:57]                     └-> should not return a monitor with mix state if check status filter is up
[00:04:57]                       └-> "before each" hook: global before each for "should not return a monitor with mix state if check status filter is up"
[00:04:57]                       └-> "before each" hook: clear settings for "should not return a monitor with mix state if check status filter is up"
[00:04:57]                         │ debg Deleting saved object {
[00:04:57]                         │        type: 'uptime-dynamic-settings',
[00:04:57]                         │        id: 'uptime-dynamic-settings-singleton'
[00:04:57]                         │      }/%s
[00:04:58]                       └-> "before each" hook: load heartbeat data for "should not return a monitor with mix state if check status filter is up"
[00:04:58]                         │ info [uptime/blank] Loading "mappings.json"
[00:04:58]                         │ info [uptime/blank] Loading "data.json"
[00:04:58]                         │ info [uptime/blank] Skipped restore for existing index "heartbeat-8-generated-test"
[00:04:58]                       └- ✖ fail: apis uptime uptime REST endpoints with generated data monitor state scoping test status filter should not return a monitor with mix state if check status filter is up
[00:04:58]                       │       Error: expected 0 to sort of equal 1
[00:04:58]                       │       + expected - actual
[00:04:58]                       │ 
[00:04:58]                       │       -0
[00:04:58]                       │       +1
[00:04:58]                       │       
[00:04:58]                       │       at Assertion.assert (/dev/shm/workspace/parallel/3/kibana/packages/kbn-expect/expect.js:100:11)
[00:04:58]                       │       at Assertion.eql (/dev/shm/workspace/parallel/3/kibana/packages/kbn-expect/expect.js:244:8)
[00:04:58]                       │       at Context.<anonymous> (test/api_integration/apis/uptime/rest/monitor_states_generated.ts:201:37)
[00:04:58]                       │       at Object.apply (/dev/shm/workspace/parallel/3/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)
[00:04:58]                       │ 
[00:04:58]                       │ 

Stack Trace

Error: expected 0 to sort of equal 1
    at Assertion.assert (/dev/shm/workspace/parallel/3/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/parallel/3/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.<anonymous> (test/api_integration/apis/uptime/rest/monitor_states_generated.ts:201:37)
    at Object.apply (/dev/shm/workspace/parallel/3/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16) {
  actual: '0',
  expected: '1',
  showDiff: true
}

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 754.9KB 755.6KB +793.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @skh

@@ -231,7 +231,7 @@ export interface RegistryElasticsearch {
'index_template.mappings'?: object;
}

export type RegistryVarType = 'integer' | 'bool' | 'password' | 'text' | 'yaml';
export type RegistryVarType = 'integer' | 'bool' | 'password' | 'text' | 'yaml' | 'string';
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry I am late to the official review, but I am surprised at this change. AFAIK there is no var type called string on package spec side, only text? https://github.com/elastic/package-spec/blob/master/versions/1/data_stream/manifest.spec.yml#L50-L55

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. Right now packages use both, e.g. apm here has a lot of strings: https://github.com/elastic/package-storage/blob/snapshot/packages/apm/0.1.0-dev.7/manifest.yml#L44-L136

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, that seems inconsistent with the package spec, I also see type: int which is also inconsistent. I'll file an issue elsewhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dikshachauhan-qasource
Copy link

Hi @EricDavisX

We have validated above fixes in 7.12 BC3 build and found issue as not fixed. We are still not able to add kafka integration to policy using quotes as well to value under 'Kafka home directory'. Please refer below sceenshot:

image

Kafka package version: 3.6

We will revalidate above fixes in 7.12 BC4 and provide our observation if fixes will be available there.

Thanks
QAS

@EricDavisX
Copy link
Contributor

It would be available in recent Agent snapshots, but as you note - will not be in BC until BC4. Thanks.

@dikshachauhan-qasource
Copy link

Hi @EricDavisX

We have validated above fixes in 7.12 BC4 build and found issue as fixed.

  • We are able to add kafka and apm integration to policy using quotes to required.

Sceenshot:
image

Build details are as follows:

BUILD 39242
COMMIT 99ac38d70e426f589bb61a034c96e602d759cfab

Thanks
QAS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team test-plan v7.12.0 v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error message shown up while adding Kafka integration (v0.3.6 on 7.12 BC2)