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 SavedObjectsUtils.getConvertedObjectId function #107767

Merged

Conversation

jportner
Copy link
Contributor

@jportner jportner commented Aug 5, 2021

Also change document migrator code to use this function instead of using uuidv5 directly.

Resolves #107744

Also change document migrator code to use this function instead of using
uuidv5 directly.
@jportner jportner added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.15.0 labels Aug 5, 2021
@jportner jportner requested a review from a team as a code owner August 5, 2021 15:30
Comment on lines +11 to +24
```typescript
static getConvertedObjectId(namespace: string | undefined, type: string, id: string): string;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| namespace | <code>string &#124; undefined</code> | |
| type | <code>string</code> | |
| id | <code>string</code> | |

<b>Returns:</b>

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 wonder why the doc generator didn't pick up the parameter descriptions or the return description 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

A couple ideas:

  • The script doesn't regen the docs if the signature didn't change, so if you add the comments on the params after generating this the first time it may not be populated. You can add the --docs CLI arg to force this
  • I wonder if the {string} type descriptors are a problem? I usually don't use these since that info is already in the TS signature itself. Not sure how our doc generator handles these.
  • It may not matter much, we're about to remove this tooling.

Comment on lines +11 to +24
```typescript
static getConvertedObjectId(namespace: string | undefined, type: string, id: string): string;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| namespace | <code>string &#124; undefined</code> | |
| type | <code>string</code> | |
| id | <code>string</code> | |

<b>Returns:</b>

Copy link
Contributor

Choose a reason for hiding this comment

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

A couple ideas:

  • The script doesn't regen the docs if the signature didn't change, so if you add the comments on the params after generating this the first time it may not be populated. You can add the --docs CLI arg to force this
  • I wonder if the {string} type descriptors are a problem? I usually don't use these since that info is already in the TS signature itself. Not sure how our doc generator handles these.
  • It may not matter much, we're about to remove this tooling.

@jportner jportner added the auto-backport Deprecated - use backport:version if exact versions are needed label Aug 5, 2021
@jportner jportner enabled auto-merge (squash) August 5, 2021 16:18
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

API count

id before after diff
core 2450 2454 +4

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

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 5, 2021
kibanamachine added a commit that referenced this pull request Aug 5, 2021
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
streamich pushed a commit to vadimkibana/kibana that referenced this pull request Aug 8, 2021
@jportner jportner deleted the issue-107744-core-api-transform-object-id branch January 19, 2022 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Core API to transform a legacy object ID to a new ID
3 participants