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

[APM] Link preview breaks when editing a custom link #61053

Merged
merged 7 commits into from Mar 26, 2020

Conversation

@cauemarcondes
Copy link
Contributor

cauemarcondes commented Mar 24, 2020

closes #61038

filters: Filter[];
}

export function convertTo(customLinkES: CustomLinkES[]): CustomLink[] {

This comment has been minimized.

Copy link
@sqren

sqren Mar 24, 2020

Member

I think this function should be co-located with the other convertTo function. And they should probably be called something like convertTo / convertFrom. Or toESFormat / fromESFormat. Or whatever you think makes sense

@@ -25,6 +32,29 @@ export const createApmCustomLinkIndex = async ({
return createOrUpdateIndex({ index, esClient, logger, mappings });
};

export interface CustomLinkES {

This comment has been minimized.

Copy link
@sqren

sqren Mar 24, 2020

Member

Shouldn't this be moved to custom_link_types.d.ts?

}
})
// removes filters without value
.filter(value => value);

This comment has been minimized.

Copy link
@sqren

sqren Mar 24, 2020

Member

Shouldn't this happen as part of the convertTo phase?

This comment has been minimized.

Copy link
@cauemarcondes

cauemarcondes Mar 24, 2020

Author Contributor

the convertTo, now called toESFormat, will receive a CustomLink, but get get_transaction receives filters, the toESFormat, will also have the same logic, I can place it inside the same file and call it here too.

[SERVICE_ENVIRONMENT]: t.string,
[TRANSACTION_NAME]: t.string,
[TRANSACTION_TYPE]: t.string
});

This comment has been minimized.

Copy link
@sqren

sqren Mar 24, 2020

Member

What about keeping this in custom_link_types.d.ts with the other types?

This comment has been minimized.

Copy link
@cauemarcondes

cauemarcondes Mar 24, 2020

Author Contributor

I don't think is a good idea since I moved the custom_link_types.d.ts to common directory

This comment has been minimized.

Copy link
@cauemarcondes

cauemarcondes Mar 24, 2020

Author Contributor

But I think it makes sense to have custom_link_types.d.ts in the server as well, to store types that are not shared.

@cauemarcondes cauemarcondes marked this pull request as ready for review Mar 24, 2020
@cauemarcondes cauemarcondes requested a review from elastic/apm-ui as a code owner Mar 24, 2020
return acc;
},
{}
);

This comment has been minimized.

Copy link
@sqren

sqren Mar 24, 2020

Member

Do you need to do this? Can't you send the array as a query param? In get_transaction you convert this back to an array, so would be good if we didn't have to change the format just for transportation.

This comment has been minimized.

Copy link
@cauemarcondes

cauemarcondes Mar 24, 2020

Author Contributor

I tried, but this is the request when sending an array: http://localhost:5601/api/apm/settings/custom_links/transaction?0=&1=

@cauemarcondes cauemarcondes requested a review from elastic/apm-ui Mar 25, 2020
@smith
smith approved these changes Mar 25, 2020
@cauemarcondes

This comment has been minimized.

Copy link
Contributor Author

cauemarcondes commented Mar 26, 2020

@elasticmachine merge upstream

@kibanamachine

This comment has been minimized.

Copy link

kibanamachine commented Mar 26, 2020

💚 Build Succeeded

History

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

@cauemarcondes cauemarcondes merged commit a16d446 into elastic:master Mar 26, 2020
55 checks passed
55 checks passed
API integration tests node scripts/functional_tests --config test/api_integration/config.js --bail --debug
Details
Browser tests yarn run grunt test:karma-ci
Details
Build kbn_tp_sample_panel_action yarn build
Details
CLA All commits passed the check
Details
Check core API changes node scripts/check_published_api_changes
Details
Check file casing node scripts/check_file_casing --quiet
Details
Check licenses node scripts/check_licenses --dev
Details
Check lockfile symlinks node scripts/check_lockfile_symlinks --quiet
Details
Example functional tests node scripts/functional_tests --config test/examples/config.js --bail --debug
Details
Functional tests / Group 1 yarn run grunt run:functionalTests_ciGroup1
Details
Functional tests / Group 10 yarn run grunt run:functionalTests_ciGroup10
Details
Functional tests / Group 11 yarn run grunt run:functionalTests_ciGroup11
Details
Functional tests / Group 12 yarn run grunt run:functionalTests_ciGroup12
Details
Functional tests / Group 2 yarn run grunt run:functionalTests_ciGroup2
Details
Functional tests / Group 3 yarn run grunt run:functionalTests_ciGroup3
Details
Functional tests / Group 4 yarn run grunt run:functionalTests_ciGroup4
Details
Functional tests / Group 5 yarn run grunt run:functionalTests_ciGroup5
Details
Functional tests / Group 6 yarn run grunt run:functionalTests_ciGroup6
Details
Functional tests / Group 7 yarn run grunt run:functionalTests_ciGroup7
Details
Functional tests / Group 8 yarn run grunt run:functionalTests_ciGroup8
Details
Functional tests / Group 9 yarn run grunt run:functionalTests_ciGroup9
Details
Internationalization check node scripts/i18n_check --ignore-missing
Details
Interpreter functional tests node scripts/functional_tests --config test/interpreter_functional/config.ts --bail --debug --kibana-install-dir /dev/shm/workspace/kibana/build/oss/kibana-8.0.0-SNAPSHOT-linux-x86_64-1
Details
Jest integration tests yarn run grunt test:jest_integration
Details
Jest tests yarn run grunt test:jest
Details
Kibana accessibility tests node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/kibana/build/oss/kibana-8.0.0-SNAPSHOT-linux-x86_64 --config test/accessibility/config.ts
Details
Mocha tests node scripts/mocha
Details
Node.js hardening tests node scripts/test_hardening.js
Details
Plugin functional tests node scripts/functional_tests --config test/plugin_functional/config.js --bail --debug
Details
Project tests yarn run grunt test:projects
Details
Type check node scripts/type_check
Details
TypeScript - all files belong to a TypeScript project node scripts/check_ts_projects
Details
Verify NOTICE.txt node scripts/notice --validate
Details
Verify dependency versions yarn run grunt verifyDependencyVersions
Details
X-Pack Chrome Functional tests / Group 1 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-1 --include-tag ciGroup1
Details
X-Pack Chrome Functional tests / Group 10 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-10 --include-tag ciGroup10
Details
X-Pack Chrome Functional tests / Group 2 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-2 --include-tag ciGroup2
Details
X-Pack Chrome Functional tests / Group 3 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-3 --include-tag ciGroup3
Details
X-Pack Chrome Functional tests / Group 4 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-4 --include-tag ciGroup4
Details
X-Pack Chrome Functional tests / Group 5 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-5 --include-tag ciGroup5
Details
X-Pack Chrome Functional tests / Group 6 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-6 --include-tag ciGroup6
Details
X-Pack Chrome Functional tests / Group 7 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-7 --include-tag ciGroup7
Details
X-Pack Chrome Functional tests / Group 8 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-8 --include-tag ciGroup8
Details
X-Pack Chrome Functional tests / Group 9 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-9 --include-tag ciGroup9
Details
X-Pack Jest node --max-old-space-size=6144 scripts/jest --ci --verbose --detectOpenHandles
Details
X-Pack Karma Tests yarn test:karma
Details
X-Pack SIEM cyclic dependency test node legacy/plugins/siem/scripts/check_circular_deps
Details
X-Pack accessibility tests node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana --config test/accessibility/config.ts
Details
elasticsearch-ci/docs Build finished.
Details
eslint node scripts/eslint --no-cache
Details
kibana-ci Build finished.
Details
prbot:outdated
prbot:release note labels
prbot:release version labels
sasslint node scripts/sasslint
Details
@cauemarcondes cauemarcondes deleted the cauemarcondes:custom-link-preview branch Mar 26, 2020
cauemarcondes added a commit to cauemarcondes/kibana that referenced this pull request Mar 26, 2020
* refactoring custom link server side

* refactoring custom link server side

* fixing pr comments

* fixing unit test

* fixing unit tests

* renaming server directory

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
cauemarcondes added a commit to cauemarcondes/kibana that referenced this pull request Mar 26, 2020
* refactoring custom link server side

* refactoring custom link server side

* fixing pr comments

* fixing unit test

* fixing unit tests

* renaming server directory

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
cauemarcondes added a commit that referenced this pull request Mar 26, 2020
* refactoring custom link server side

* refactoring custom link server side

* fixing pr comments

* fixing unit test

* fixing unit tests

* renaming server directory

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
cauemarcondes added a commit that referenced this pull request Mar 26, 2020
* refactoring custom link server side

* refactoring custom link server side

* fixing pr comments

* fixing unit test

* fixing unit tests

* renaming server directory

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@sqren

This comment has been minimized.

Copy link
Member

sqren commented Mar 26, 2020

@cauemarcondes This should not be in the release notes since it's a bug fix to a not-yet-released feature

Will you add the skip label instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.