-
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
Short URLs #107859
Short URLs #107859
Conversation
4b58fdc
to
df4c4f0
Compare
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.
ML edit LGTM
Pinging @elastic/apm-ui (Team:apm) |
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.
Stack Management changes LGTM - one-line change to ingest node pipelines locator test.
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.
DataDiscovery team owned code LGTM, just mocks and tests were modified. So I didn't test locally. Would just suggest to add a bit more context to this PR's description.
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.
APM changes look good.
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.
Kibana vis editors code changes LGTM! It is just a change in a test file so I just did a code review :)
src/plugins/share/common/url_service/locators/legacy_short_url_locator.ts
Show resolved
Hide resolved
|
||
/** | ||
* Common URL Service client interface for server-side and client-side. | ||
*/ | ||
export class UrlService { | ||
export class UrlService<D = unknown> { |
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.
why do we need generic here ? seems we know deps.shortUrls needs to be there and we also know all deps for LocatorClient ? also having D being unknown by default is a bit weird and not fully type safe.
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.
why do we need generic here ? seems we know deps.shortUrls needs to be there and we also know all deps for LocatorClient ?
It is generic because Short URL service has different dependencies on the server vs on the browser.
also having D being unknown by default is a bit weird and not fully type safe.
Why do you think it is weird and not safe?
Pinging @elastic/kibana-app-services (Team:AppServices) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Metrics [docs]Module Count
Public APIs missing comments
Public APIs missing exports
Page load bundle
Saved Objects .kibana field count
History
To update your PR or re-run it, just comment with: |
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.
LGTM
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Summary
Closes #98110
Closes #93047
Implements new Short URL service.
Rest API
Create new short URL
POST
/api/short_url
locatorId
- ID of the locator which to use to generate resolved URL.params
- an object of locator params.slug
- (optional) human readable URL slug, used to identify the short URL.humanReadableSlug
- (optional) if true, a human readable slug will be generated on the server.Delete a short URL
Deletes an existing short URL.
DELETE
/api/short_url/{id}
{id}
- ID of the short URL.Get a short URL
Fetches a short URL by its ID.
Get
/api/short_url/{id}
{id}
- ID of the short URL.Resolve a short URL
Fetches a short URL by its slug.
Get
/api/short_url/_slug/{slug}
{slug}
- a human-readable slug of the short URL.Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers
Release note
Short URL service was updated to support short URL creation from locators. Short URL service now supports human readable slugs for short URLs.