Skip to content

Teach Kibana link checking about PR features #898

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

Merged
merged 3 commits into from
May 28, 2019

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented May 24, 2019

The docs build has three features when building all books:

  1. If you specify --keep_hash we reuse the hash of the source repos
    for every book that we've built before. This is useful for rebuilding
    only the books that we converted to asciidoctor. Or in combination with
    --sub_dir
  2. If you specify --sub_dir we use a directory instead of a commit
    hash from some source repo. This is mostly useful in combination with
    --keep_hash because when you use those together your can rebuild the
    docs as though you committed the directory that you are subsituting. It
    makes for perfect pull request tests.
  3. We automatically check all of the links, including links from some
    typescript files in the kibana repo.

The trouble is that the kibana repo link checking process didn't
understand --keep_hash and --sub_dir. This commit changes that. The
bulk of it the change is testing the link checking, which we didn't
really have any of up until now.

Closes #892

The docs build has three features when building all books:
1. If you specify `--keep_hash` we reuse the hash of the source repos
for every book that we've built before. This is useful for rebuilding
only the books that we converted to asciidoctor. Or in combination with
`--sub_dir`
2. If you specify `--sub_dir` we use a directory instead of a commit
hash from some source repo. This is mostly useful in combination with
`--keep_hash` because when you use those together your can rebuild the
docs as though you committed the directory that you are subsituting. It
makes for perfect pull request tests.
3. We automatically check all of the links, including links from some
typescript files in the kibana repo.

The trouble is that the kibana repo link checking process didn't
understand `--keep_hash` and `--sub_dir`. This commit changes that. The
bulk of it the change is testing the link checking, which we didn't
really have any of up until now.

Closes elastic#892
@nik9000 nik9000 requested review from estolfo and olksdr May 24, 2019 20:18
kibana_repo.write KIBANA_LINKS_FILE, <<~JS
export const documentationLinks = {
foo: `${ELASTIC_WEBSITE_URL}guide/foo`,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I almost called out this semicolon but then realized this was javascript = )

Copy link
Contributor

@olksdr olksdr left a comment

Choose a reason for hiding this comment

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

LGTM

@nik9000 nik9000 merged commit 8b33ee2 into elastic:master May 28, 2019
@nik9000
Copy link
Member Author

nik9000 commented May 28, 2019

Thanks @estolfo and @olksdr !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Unified" PR checking fails on link problems from other projects
3 participants