-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Add proxy support for plugin installation #7967
Conversation
Can one of the admins verify this patch? |
@barryib What's the value of the additional HEAD request before the GET request? By the very nature of HEAD, it should return exactly the same headers as the corresponding GET request, so if you know that you want to do the GET request, you might as well just try it. |
@epixa Good point. It was the simplest way I found to do minimum changes within the code base, without going through callback hell and furthermore without decreasing performances. But I'm opened to any suggestions. |
5f95398
to
cbd66c2
Compare
@epixa I've removed the extra request and try to download directly. |
Awesome, thanks @barryib. I marked this for review so people can jump on it when they have a chance, otherwise I'll try to get to it myself in the next few days. |
jenkins, test this |
@barryib We were having some issues with our tests last week. Can you rebase or merge master into this to make sure it's running on the latest? |
cbd66c2
to
8627e95
Compare
@epixa done. Is it ok for you? |
jenkins, test this |
What about proxy authentication? |
@xkrt It should works. I didn't test it in our infrastructure because we don't have proxy auth, but in request documentation, it says:
So you only need to pass auth like this |
|
||
req.on('response', (resp) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resp can be used without () as its a single argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ppisljar good to know. But I think it's better this way for coding style consistency, as it's write like that in the rest of code base.
i added a few small style comments |
thanks @ppisljar I fixed some coding style you pointed out. |
jenkins, test this |
@barryib Can you move |
@barryib Also, you probably need to rebase or merge master into this branch in order to get CI passing. |
I'm not sure if this is because the branch needs to be updated with master or something, but I cannot get a standard (no-proxy) install to work properly. If I try to install timelion, for example:
|
- Use request module instead of Wreck - Add proxy support
9381413
to
5a6d680
Compare
@epixa I tried to remove wreck entirely from dependences. Can you test it please? |
jenkins, test this |
@epixa any news or ETA for this PR? |
@barryib Nothing to report :-/ We've been pretty caught up with trying to get 5.0 out the door, so feature PRs like this have unfortunately taken a back seat temporarily. We'll get a review on this asap though. |
Just a heads up, but the full conversion from wreck doesn't necessarily need to be done to add proxy support. example usage. const Wreck = require('wreck');
const HttpProxyAgent = require('http-proxy-agent');
const proxy = process.env.http_proxy || 'http://127.0.0.1:3128'; // this is placeholder logic
const agent = new HttpProxyAgent(proxy);
const wreck = Wreck.defaults({
agent
}); Just an idea. |
could we upgrade the PR to merge? would love to have it working, same as elastic/logstash#6044 |
patching /usr/share/elasticsearch/bin/elasticsearch-plugin works, too (and is easy) |
Is there a workaround for this? I am behind a proxy. I can get x-pack installed into elasticsearch using the offline file method
however
Tried JAVA_OPTS to no avail. This is on Win10 RS2. Can't load data into it if I can't secure it :( |
You can try to use my PR code |
I am seeing a call into node.exe from the plugin installer. Does that really use java? I am not being successful despite setting a global JAVA proxy or setting the appropriate env variables. |
kind of. node.js = JAVAscript ;) try this one (http://superuser.com/questions/347476/how-to-install-npm-behind-authentication-proxy-on-windows) |
@epixa @mrlannigan Juste came back from holidays. How should we handle the plugin installation through proxy? |
Closing this PR. Refaire to #10946 for Plugin install through proxy. |
`v95.7.0` ⏩ `v95.9.0` > [!CAUTION] > This PR contains the final set of Emotion conversions for all EuiForm components. > If your plugin contains any custom CSS/styling to **EuiFormRow, EuiFormControlLayout, EuiCheckbox, EuiRadio, or EuiSwitch**,⚠️ make sure to QA your UI to ensure no visual regressions have occurred!⚠️ --- ## [`v95.9.0`](https://github.com/elastic/eui/releases/v95.9.0) - Updated `EuiSearchBar`'s optional `box.schema` prop with a new `recognizedFields` configuration. This allows specifying the phrases that will be parsed as field clauses ([#7960](elastic/eui#7960)) - Updated `EuiIcon` with a new `tokenSemanticText` glyph ([#7971](elastic/eui#7971)) - Added support for TypeScript 5 ([#7980](elastic/eui#7980)) **Bug fixes** - Fixed `EuiSelectableTemplateSitewide` styles when used within a dark-themed `EuiHeader` ([#7977](elastic/eui#7977)) ## [`v95.8.0`](https://github.com/elastic/eui/releases/v95.8.0) - Updated `EuiHeaderLinks`'s mobile menu to set a slight popover padding by default ([#7961](elastic/eui#7961)) - This can be overridden via `popoverProps.panelPaddingSize` if needed. - Updated `EuiHeaderLink` to default to a size of `s` (down from `m`) ([#7961](elastic/eui#7961)) **Accessibility** - Updated the `aria-label` attribute for the `EuiFieldSearch` clear button ([#7970](elastic/eui#7970)) **Bug fixes** - Fixed a visual bug with `<EuiDualRange showInput="inputWithPopover" />` form controls ([#7957](elastic/eui#7957)) **Deprecations** - Deprecated `EuiFormRow`'s `columnCompressedSwitch` display prop. Use `columnCompressed` instead, which will automatically account for child `EuiSwitch`es ([#7968](elastic/eui#7968)) - Deprecated `EuiFormRow`'s `rowCompressed` display prop. Use `row` instead for vertical forms, or `centerCompressed` for inline forms ([#7968](elastic/eui#7968)) - (Styling) Updated `EuiFormRow`'s `hasEmptySpaceLabel` prop to no longer attempt to automatically align its content to a vertical center. Use the `display="center"` prop for that instead ([#7968](elastic/eui#7968)) **CSS-in-JS conversions** - Converted `EuiFormControlLayout` to Emotion ([#7954](elastic/eui#7954)) - Removed `.euiFormControlLayout--*icons` classNames and `--eui-form-control-layout-icons-padding` CSS var. Use `--euiFormControlRightIconsCount` or `--euiFormControlLeftIconsCount` instead - Converted `EuiFormLayoutDelimited` to Emotion ([#7957](elastic/eui#7957)) - Fixed `cloneElementWithCss` throwing an error when used multiple times without a `key` prop ([#7957](elastic/eui#7957)) - Updated `cloneElementWithCss` utility to support a third argument that allows prepending vs. appending the cloned Emotion css className ([#7957](elastic/eui#7957)) - Removed `@euiFormControlLayoutClearIcon` Sass mixin ([#7959](elastic/eui#7959)) - Converted `EuiDescribedFormGroup` to Emotion ([#7964](elastic/eui#7964)) - Converted `EuiForm`, `EuiFormHelpText`, and `EuiFormErrorText` to Emotion ([#7966](elastic/eui#7966)) - Converted `EuiFormLabel` and `EuiFormLegend` to Emotion; Removed `@euiFormLabel` mixin ([#7967](elastic/eui#7967)) - Converted `EuiFormRow` to Emotion ([#7968](elastic/eui#7968)) - Converted `EuiCheckbox` to Emotion ([#7969](elastic/eui#7969)) - Converted `EuiRadio` to Emotion ([#7969](elastic/eui#7969)) - Converted `EuiSwitch` to Emotion ([#7969](elastic/eui#7969)) - Removed the following Sass variables: ([#7969](elastic/eui#7969)) - `$euiFormCustomControlDisabledIconColor` - `$euiFormCustomControlBorderColor` - `$euiRadioSize` - `$euiCheckBoxSize` - `$euiCheckboxBorderRadius` - `$euiSwitchHeight` (and compressed/mini variants) - `$euiSwitchWidth` (and compressed/mini variants) - `$euiSwitchThumbSize` (and compressed/mini variants) - `$euiSwitchIconHeight` - `$euiSwitchOffColor` - Removed the following Sass mixins: ([#7969](elastic/eui#7969)) - `euiIconBackground` - `euiCustomControl` - `euiCustomControlSelected` - `euiCustomControlDisabled` - `euiCustomControlFocused` --------- Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
This introduce an extra http (HEAD method) request to get only headers (content length by exemple) and ensure that plugin exist before trying to donwload it.--proxy=http://proxy.exemple.com:8080/
option