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

Add getServerInfo API to http setup contract #56636

Merged
merged 2 commits into from
Feb 4, 2020

Conversation

pgayvallet
Copy link
Contributor

@pgayvallet pgayvallet commented Feb 3, 2020

Summary

Fix #56231

Adds a getServerInfo API to httpServer's setup contract returning basic server infos such as port, hostname and protocol.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

Comment on lines +126 to 132
getServerInfo: () => ({
name: config.name,
host: config.host,
port: config.port,
protocol: this.server!.info.protocol,
}),
isTlsEnabled: config.ssl.enabled,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that we got this getServerInfo API, should I move the isTlsEnabled info in the HttpServerInfo type and remove the direct access from the setup contract?

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'll do it in a separate PR later this week

@pgayvallet pgayvallet added release_note:skip Skip the PR/issue when compiling release notes v7.7.0 Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Feb 3, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@pgayvallet pgayvallet marked this pull request as ready for review February 3, 2020 15:51
@pgayvallet pgayvallet requested a review from a team as a code owner February 3, 2020 15:51
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

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


expect(getServerInfo().protocol).toEqual('https');
});
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Test for when protocol is socket?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will be honest, I have no idea how to configure the server to get a socket protocol (only copied the possible values from the HAPI's config.protocol)

@pgayvallet pgayvallet merged commit 4bb56c8 into elastic:master Feb 4, 2020
pgayvallet added a commit to pgayvallet/kibana that referenced this pull request Feb 4, 2020
* add getServerInfo http setup api

* update generated doc
pgayvallet added a commit that referenced this pull request Feb 4, 2020
* add getServerInfo http setup api

* update generated doc
gmmorris added a commit to gmmorris/kibana that referenced this pull request Feb 4, 2020
* master: (42 commits)
  Move kuery_autocomplete ⇒ NP (elastic#56607)
  [ML] Functional tests - stabilize job row and analytics result view assertions (elastic#56595)
  [Discover] Inline angular directives only used in this plugin (elastic#56119)
  [Discover] Migrate get_sort.js test from mocha to TypeScript (elastic#56011)
  [SIEM] Enable flow_target_select_connected unit tests (elastic#55618)
  Start consuming np logging config (elastic#56480)
  [SIEM] Add eslint-plugin-react-perf (elastic#55960)
  Mention changed SAML ACS endpoint URL in breaking changes doc. (elastic#56613)
  Add `getServerInfo` API to http setup contract (elastic#56636)
  Updates Monitoring alert Jest snapshots
  Kibana property config migrations (elastic#55937)
  Vislib replacement toggle (elastic#56439)
  [Uptime] Add unit tests for QueryContext time calculation (elastic#56671)
  [SIEM][Detection Engine] Critical blocker, fixes pre-packaged rule miscounts
  Upgrade EUI to v18.3.0 (elastic#56228)
  [Maps] Fix server log (elastic#56679)
  [SIEM] Fixes FTUE when APM node is present (elastic#56574)
  [Reporting/FieldFormats] expose `setFieldFormats` and call from ReportingPlugin.start (elastic#56563)
  Update EMS API urls for production (elastic#56657)
  Ability to delete alerts even when AAD is out of sync (elastic#56543)
  ...
cauemarcondes pushed a commit to cauemarcondes/kibana that referenced this pull request Feb 5, 2020
* add getServerInfo http setup api

* update generated doc
majagrubic pushed a commit to majagrubic/kibana that referenced this pull request Feb 10, 2020
* add getServerInfo http setup api

* update generated doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New Platform] APIs needed for opening a connection to the Kibana server
5 participants