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

ci: add markdown-link-check #8771

Merged
merged 16 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions docs-website/markdown-link-check-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"ignorePatterns": [
{
"pattern": "^http://demo\\.datahubproject\\.io"
},
{
"pattern": "^http://localhost"
},
{
"pattern": "^http://www.famfamfam.com"
},
{
"pattern": "^http://www.linkedin.com"
},
{
"pattern": "\\.md$"
},
{
"pattern": "\\.pdl$"
yoonhyejin marked this conversation as resolved.
Show resolved Hide resolved
},
{
"pattern": "\\.pdl#.*$"
},
{
"pattern":"\\.json$"
},
{
"pattern":"\\.txt$"
},
{
"pattern":"\\.js$"
},
{
"pattern": "\\.svg$"
yoonhyejin marked this conversation as resolved.
Show resolved Hide resolved
},
{
"pattern": "\\.java$"
},
{
"pattern": "\\.md#.*$"
},
{
"pattern": "^https://oauth2.googleapis.com/token"
},
{
"pattern": "^https://login.microsoftonline.com/common/oauth2/na$"
}
],
"aliveStatusCodes": [200, 206, 0, 999, 400, 401, 403]
}
2 changes: 1 addition & 1 deletion docs-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"generate": "rm -rf genDocs genStatic && mkdir genDocs genStatic && yarn _generate-docs && mv docs/* genDocs/ && rmdir docs",
"generate-rsync": "mkdir -p genDocs genStatic && yarn _generate-docs && rsync -v --checksum -r -h -i --delete docs/ genDocs && rm -rf docs",
"lint": "prettier -w generateDocsDir.ts sidebars.js src/pages/index.js",
"lint-check": "prettier -l generateDocsDir.ts sidebars.js src/pages/index.js",
"lint-check": "prettier -l generateDocsDir.ts sidebars.js src/pages/index.js && find ./genDocs -name '*.md' -exec markdown-link-check -q {} -c markdown-link-check-config.json \\;",
"lint-fix": "prettier --write generateDocsDir.ts sidebars.js src/pages/index.js"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion docs-website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10357,4 +10357,4 @@ zwitch@^1.0.0:
zwitch@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7"
integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==
integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==
2 changes: 1 addition & 1 deletion docs/api/graphql/how-to-set-up-graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ In the request body, select the `GraphQL` option and enter your GraphQL query in
</p>


Please refer to [Querying with GraphQL](https://learning.postman.com/docs/sending-requests/graphql/graphql/) in the Postman documentation for more information.
Please refer to [Querying with GraphQL](https://learning.postman.com/docs/sending-requests/graphql/graphql-overview/) in the Postman documentation for more information.

### Authentication + Authorization

Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The figures below describe the high-level architecture of DataHub.


<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/DataHub-Architecture.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/saas/DataHub-Architecture.png"/>
</p>


Expand Down
8 changes: 4 additions & 4 deletions docs/authentication/guides/add-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ To do so, navigate to the **Users & Groups** section inside of Settings page. He
do not have the correct privileges to invite users, this button will be disabled.

<p align="center">
<img width="100%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/invite-users-button.png"/>
<img width="100%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master/imgs/invite-users-button.png"/>
</p>

To invite new users, simply share the link with others inside your organization.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/invite-users-popup.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master/imgs/invite-users-popup.png"/>
</p>

When a new user visits the link, they will be directed to a sign up screen where they can create their DataHub account.
Expand All @@ -37,13 +37,13 @@ and click **Reset user password** inside the menu dropdown on the right hand sid
`Manage User Credentials` [Platform Privilege](../../authorization/access-policies-guide.md) in order to reset passwords.

<p align="center">
<img width="100%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/reset-user-password-button.png"/>
<img width="100%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master/imgs/reset-user-password-button.png"/>
</p>

To reset the password, simply share the password reset link with the user who needs to change their password. Password reset links expire after 24 hours.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/reset-user-password-popup.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master/imgs/reset-user-password-popup.png"/>
</p>

# Configuring Single Sign-On with OpenID Connect
Expand Down
2 changes: 1 addition & 1 deletion docs/authentication/guides/sso/configure-oidc-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ please see [this guide](../jaas.md) to mount a custom user.props file for a JAAS
To configure OIDC in React, you will most often need to register yourself as a client with your identity provider (Google, Okta, etc). Each provider may
have their own instructions. Provided below are links to examples for Okta, Google, Azure AD, & Keycloak.

- [Registering an App in Okta](https://developer.okta.com/docs/guides/add-an-external-idp/apple/register-app-in-okta/)
- [Registering an App in Okta](https://developer.okta.com/docs/guides/add-an-external-idp/openidconnect/main/)
- [OpenID Connect in Google Identity](https://developers.google.com/identity/protocols/oauth2/openid-connect)
- [OpenID Connect authentication with Azure Active Directory](https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/auth-oidc)
- [Keycloak - Securing Applications and Services Guide](https://www.keycloak.org/docs/latest/securing_apps/)
Expand Down
19 changes: 9 additions & 10 deletions docs/domains.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ You can create this privileges by creating a new [Metadata Policy](./authorizati
To create a Domain, first navigate to the **Domains** tab in the top-right menu of DataHub.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/domains-tab.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master//imgs/domains-tab.png"/>
</p>

Once you're on the Domains page, you'll see a list of all the Domains that have been created on DataHub. Additionally, you can
view the number of entities inside each Domain.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/list-domains.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master/imgs/list-domains.png"/>
</p>

To create a new Domain, click '+ New Domain'.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/create-domain.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master//imgs/create-domain.png"/>
</p>

Inside the form, you can choose a name for your Domain. Most often, this will align with your business units or groups, for example
Expand All @@ -48,7 +48,7 @@ for the Domain. This option is useful if you intend to refer to Domains by a com
key to be human-readable. Proceed with caution: once you select a custom id, it cannot be easily changed.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/set-domain-id.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master//imgs/set-domain-id.png"/>
</p>

By default, you don't need to worry about this. DataHub will auto-generate a unique Domain id for you.
Expand All @@ -64,7 +64,7 @@ To assign an asset to a Domain, simply navigate to the asset's profile page. At
see a 'Domain' section. Click 'Set Domain', and then search for the Domain you'd like to add to. When you're done, click 'Add'.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/set-domain.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master//imgs/set-domain.png"/>
</p>

To remove an asset from a Domain, click the 'x' icon on the Domain tag.
Expand Down Expand Up @@ -149,27 +149,27 @@ source:
Once you've created a Domain, you can use the search bar to find it.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/search-domain.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master//imgs/search-domain.png"/>
</p>

Clicking on the search result will take you to the Domain's profile, where you
can edit its description, add / remove owners, and view the assets inside the Domain.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/domain-entities.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master//imgs/domain-entities.png"/>
</p>

Once you've added assets to a Domain, you can filter search results to limit to those Assets
within a particular Domain using the left-side search filters.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/search-by-domain.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master//imgs/search-by-domain.png"/>
</p>

On the homepage, you'll also find a list of the most popular Domains in your organization.

<p align="center">
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/datahub/master/docs/imgs/browse-domains.png"/>
<img width="70%" src="https://raw.githubusercontent.com/datahub-project/static-assets/master//imgs/browse-domains.png"/>
</p>

## Additional Resources
Expand Down Expand Up @@ -242,7 +242,6 @@ DataHub supports Tags, Glossary Terms, & Domains as distinct types of Metadata t
- **Tags**: Informal, loosely controlled labels that serve as a tool for search & discovery. Assets may have multiple tags. No formal, central management.
- **Glossary Terms**: A controlled vocabulary, with optional hierarchy. Terms are typically used to standardize types of leaf-level attributes (i.e. schema fields) for governance. E.g. (EMAIL_PLAINTEXT)
- **Domains**: A set of top-level categories. Usually aligned to business units / disciplines to which the assets are most relevant. Central or distributed management. Single Domain assignment per data asset.

*Need more help? Join the conversation in [Slack](http://slack.datahubproject.io)!*

### Related Features
Expand Down
6 changes: 3 additions & 3 deletions docs/how/add-new-aspect.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# How to add a new metadata aspect?

Adding a new metadata [aspect](../what/aspect.md) is one of the most common ways to extend an existing [entity](../what/entity.md).
We'll use the [CorpUserEditableInfo](https://github.com/datahub-project/datahub/blob/master/metadata-models/src/main/pegasus/com/linkedin/identity/CorpUserEditableInfo.pdl) as an example here.
We'll use the CorpUserEditableInfo as an example here.

1. Add the aspect model to the corresponding namespace (e.g. [`com.linkedin.identity`](https://github.com/datahub-project/datahub/tree/master/metadata-models/src/main/pegasus/com/linkedin/identity))

Expand All @@ -14,7 +14,7 @@ We'll use the [CorpUserEditableInfo](https://github.com/datahub-project/datahub/

4. To surface the new aspect at the top-level [resource endpoint](https://linkedin.github.io/rest.li/user_guide/restli_server#writing-resources), extend the resource data model (e.g. [`CorpUser`](https://github.com/datahub-project/datahub/blob/master/gms/api/src/main/pegasus/com/linkedin/identity/CorpUser.pdl)) with an optional field (e.g. [`editableInfo`](https://github.com/datahub-project/datahub/blob/master/gms/api/src/main/pegasus/com/linkedin/identity/CorpUser.pdl#L21)). You'll also need to extend the `toValue` & `toSnapshot` methods of the top-level resource (e.g. [`CorpUsers`](https://github.com/datahub-project/datahub/blob/master/gms/impl/src/main/java/com/linkedin/metadata/resources/identity/CorpUsers.java)) to convert between the snapshot & value models.

5. (Optional) If there's need to update the aspect via API (instead of/in addition to MCE), add a [sub-resource](https://linkedin.github.io/rest.li/user_guide/restli_server#sub-resources) endpoint for the new aspect (e.g. [`CorpUsersEditableInfoResource`](https://github.com/datahub-project/datahub/blob/master/gms/impl/src/main/java/com/linkedin/metadata/resources/identity/CorpUsersEditableInfoResource.java)). The sub-resource endpiont also allows you to retrieve previous versions of the aspect as well as additional metadata such as the audit stamp.
5. (Optional) If there's need to update the aspect via API (instead of/in addition to MCE), add a [sub-resource](https://linkedin.github.io/rest.li/user_guide/restli_server#sub-resources) endpoint for the new aspect (e.g. `CorpUsersEditableInfoResource`). The sub-resource endpiont also allows you to retrieve previous versions of the aspect as well as additional metadata such as the audit stamp.

6. After rebuilding & restarting [gms](https://github.com/datahub-project/datahub/tree/master/gms), [mce-consumer-job](https://github.com/datahub-project/datahub/tree/master/metadata-jobs/mce-consumer-job) & [mae-consumer-job](https://github.com/datahub-project/datahub/tree/master/metadata-jobs/mae-consumer-job),
6. After rebuilding & restarting gms, [mce-consumer-job](https://github.com/datahub-project/datahub/tree/master/metadata-jobs/mce-consumer-job) & [mae-consumer-job](https://github.com/datahub-project/datahub/tree/master/metadata-jobs/mae-consumer-job),z
you should be able to start emitting [MCE](../what/mxe.md) with the new aspect and have it automatically ingested & stored in DB.
10 changes: 5 additions & 5 deletions docs/modeling/extending-the-metadata-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ We will refer to the two options as the **open-source fork** and **custom reposi
## This Guide

This guide will outline what the experience of adding a new Entity should look like through a real example of adding the
Dashboard Entity. If you want to extend an existing Entity, you can skip directly to [Step 3](#step_3).
Dashboard Entity. If you want to extend an existing Entity, you can skip directly to [Step 3](#step-3-define-custom-aspects-or-attach-existing-aspects-to-your-entity).

At a high level, an entity is made up of:

Expand Down Expand Up @@ -82,14 +82,14 @@ Because they are aspects, keys need to be annotated with an @Aspect annotation,
can be a part of.

The key can also be annotated with the two index annotations: @Relationship and @Searchable. This instructs DataHub
infra to use the fields in the key to create relationships and index fields for search. See [Step 3](#step_3) for more details on
infra to use the fields in the key to create relationships and index fields for search. See [Step 3](#step-3-define-custom-aspects-or-attach-existing-aspects-to-your-entity) for more details on
the annotation model.

**Constraints**: Note that each field in a Key Aspect MUST be of String or Enum type.

### <a name="step_2"></a>Step 2: Create the new entity with its key aspect

Define the entity within an `entity-registry.yml` file. Depending on your approach, the location of this file may vary. More on that in steps [4](#step_4) and [5](#step_5).
Define the entity within an `entity-registry.yml` file. Depending on your approach, the location of this file may vary. More on that in steps [4](#step-4-choose-a-place-to-store-your-model-extension) and [5](#step-5-attaching-your-non-key-aspects-to-the-entity).

Example:
```yaml
Expand Down Expand Up @@ -212,11 +212,11 @@ After you create your Aspect, you need to attach to all the entities that it app

**Constraints**: Note that all aspects MUST be of type Record.

### <a name="step_4"></a> Step 4: Choose a place to store your model extension
### <a name="step_4"></a>Step 4: Choose a place to store your model extension

At the beginning of this document, we walked you through a flow-chart that should help you decide whether you need to maintain a fork of the open source DataHub repo for your model extensions, or whether you can just use a model extension repository that can stay independent of the DataHub repo. Depending on what path you took, the place you store your aspect model files (the .pdl files) and the entity-registry files (the yaml file called `entity-registry.yaml` or `entity-registry.yml`) will vary.

- Open source Fork: Aspect files go under [`metadata-models`](../../metadata-models) module in the main repo, entity registry goes into [`metadata-models/src/main/resources/entity-registry.yml`](../../metadata-models/src/main/resources/entity-registry.yml). Read on for more details in [Step 5](#step_5).
- Open source Fork: Aspect files go under [`metadata-models`](../../metadata-models) module in the main repo, entity registry goes into [`metadata-models/src/main/resources/entity-registry.yml`](../../metadata-models/src/main/resources/entity-registry.yml). Read on for more details in [Step 5](#step-5-attaching-your-non-key-aspects-to-the-entity).
- Custom repository: Read the [metadata-models-custom](../../metadata-models-custom/README.md) documentation to learn how to store and version your aspect models and registry.

### <a name="step_5"></a>Step 5: Attaching your non-key Aspect(s) to the Entity
Expand Down
4 changes: 2 additions & 2 deletions docs/modeling/metadata-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ aggregation query against a timeseries aspect.
The *@TimeseriesField* and the *@TimeseriesFieldCollection* are two new annotations that can be attached to a field of
a *Timeseries aspect* that allows it to be part of an aggregatable query. The kinds of aggregations allowed on these
annotated fields depends on the type of the field, as well as the kind of aggregation, as
described [here](#Performing-an-aggregation-on-a-Timeseries-aspect).
described [here](#performing-an-aggregation-on-a-timeseries-aspect).

* `@TimeseriesField = {}` - this annotation can be used with any type of non-collection type field of the aspect such as
primitive types and records (see the fields *stat*, *strStat* and *strArray* fields
Expand Down Expand Up @@ -515,7 +515,7 @@ my_emitter = DatahubRestEmitter("http://localhost:8080")
my_emitter.emit(mcpw)
```

###### Performing an aggregation on a Timeseries aspect.
###### Performing an aggregation on a Timeseries aspect

Aggreations on timeseries aspects can be performed by the GMS REST API for `/analytics?action=getTimeseriesStats` which
accepts the following params.
Expand Down
Loading
Loading