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

77133 check if transform exist before stopping and deleting #77640

Conversation

nnamdifrankie
Copy link
Contributor

Summary

  • check for transform in ES before stopping or deleting.

Checklist

Delete any items that are not applicable to this PR.features that require explanation or tutorials

@nnamdifrankie nnamdifrankie requested a review from a team September 16, 2020 16:50
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Sep 16, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@nnamdifrankie nnamdifrankie added v7.10.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Sep 16, 2020
Copy link
Contributor

@jfsiii jfsiii left a comment

Choose a reason for hiding this comment

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

Approval so you can ship if you need to.

I left some notes, but since time is a factor and they're not difficult to change later, I'm fine with shipping this as-is if you want.

I have not checked this out and run locally yet. I'm doing that now.

@@ -33,89 +33,100 @@ export const installTransformForDataset = async (
registryPackage: RegistryPackage,
paths: string[],
callCluster: CallESAsCurrentUser,
savedObjectsClient: SavedObjectsClientContract
savedObjectsClient: SavedObjectsClientContract,
logger: Logger
Copy link
Contributor

Choose a reason for hiding this comment

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

Our current pattern is to have functions use the logger like const logger = appContextService.getLogger(); vs adding them to every function signature.

e.g.

@jfsiii
Copy link
Contributor

jfsiii commented Sep 16, 2020

@nnamdifrankie are the changes from 52a972c alone enough to prevent the 400's we saw?

Not a big deal, but I'm curious about the effect the bad(?) paths have now

@jfsiii
Copy link
Contributor

jfsiii commented Sep 16, 2020

I just checked this out locally and ran it against two different Cloud ES hosts that were failing. Both /setup calls returned {"isInitialized":true} 🎉

@nnamdifrankie
Copy link
Contributor Author

nnamdifrankie commented Sep 16, 2020

@jfsiii

Not a big deal, but I'm curious about the effect the bad(?) paths have now

There is no negative effect. I test both locally, integration test and against the cloud. It only make a difference I believe for remote host from what I can see. Where it is required because a fullpath may be given.

@jfsiii
Copy link
Contributor

jfsiii commented Sep 16, 2020

@nnamdifrankie it's more than "no negative effect" it's the fix. At least in my tests.

It's also consistent with the path format in the other elasticsearch/*/install.ts files

👍 to ship as soon as you're comfortable. I can deal with the logging & try/catch later

Thanks again!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@nnamdifrankie nnamdifrankie merged commit 3e3f9c7 into elastic:master Sep 17, 2020
@nnamdifrankie nnamdifrankie deleted the 77133-add-more-logging-for-transform-install branch September 17, 2020 01:25
nnamdifrankie added a commit to nnamdifrankie/kibana that referenced this pull request Sep 18, 2020
…7640)

[Ingest] fix transform path to work with external ES/cloud
jfsiii pushed a commit that referenced this pull request Sep 18, 2020
* Doing a try/catch and re-throwing doesn't gain us anything. We already catching the error in the route handler
 * We have logging for the issue in the existing handler. We also don't pass a logging context to functions
nnamdifrankie added a commit that referenced this pull request Sep 18, 2020
…77892)

[Ingest] fix transform path to work with external ES/cloud
jfsiii pushed a commit that referenced this pull request Sep 23, 2020
…78197)

* Rollback the logger & try/catch changes from #77640 (#77806)

* Doing a try/catch and re-throwing doesn't gain us anything. We already catching the error in the route handler
 * We have logging for the issue in the existing handler. We also don't pass a logging context to functions

* Add missing import
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 v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants