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

chore(docs): Migrate link formats #2687

Merged
merged 5 commits into from
Mar 6, 2023
Merged

Conversation

ashleemboyer
Copy link
Contributor

@ashleemboyer ashleemboyer commented Mar 2, 2023

What

  • Migrates the formats of links in Markdown content as part of the Docs Content Link Rewrites project
  • Adds two new GitHub workflow files:
    • .github/workflows/check-legacy-links-format.yml - This is a workflow that checks if links in markdown content are in the new format. It does this by running the link rewrite script from dev-portal, and then asserting that no "rewriteable" links were found. This workflow will be used on subsequent PRs to maintain the new link format.
    • .github/workflows/test-link-rewrites.yml - This is a workflow that executes e2e tests of this PR's changes against the main branch's deploy preview. The tests only run for branches named docs/amb.migrate-link-formats, so future PRs will not have the tests run against them. This is a temporary workflow.

Reviewing

With the two new workflows in place, this PR should only need a spot-check.

Testing

  • The latest run of the "Legacy Link Format Checker" workflow for this branch should pass (check here)
  • The latest run of the "Test Link Rewrites" workflow for this branch should pass (check here), excluding:
    • There is 1 test failing for the /terraform/cdktf/api-reference/java page. This is happening because the page is very large and failed to load in the test run. We know this because the contentHrefs being compared in the test are opposite: one is totally empty and the other has more than 10,000 links. Since this page's MDX file is not changed by this PR, we can ignore this failing test.

@ashleemboyer ashleemboyer marked this pull request as ready for review March 3, 2023 15:08
@ashleemboyer ashleemboyer requested review from a team and robin-norwood as code owners March 3, 2023 15:08
@ashleemboyer ashleemboyer requested review from ansgarm and DanielMSchmidt and removed request for a team March 3, 2023 15:08
@DanielMSchmidt
Copy link
Contributor

We also need to adjust the links in our link shortener right?

@ashleemboyer
Copy link
Contributor Author

We also need to adjust the links in our link shortener right?

@DanielMSchmidt I'm not sure what you're referring to! Might be something I haven't seen yet 😊

@ansgarm
Copy link
Member

ansgarm commented Mar 3, 2023

We link to some of these pages here: https://github.com/hashicorp/terraform-cdk/blob/main/cdk.tf/vercel.json

(edit: They all redirect from cdk.tf to various destinations)

Copy link
Member

@ansgarm ansgarm left a comment

Choose a reason for hiding this comment

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

Looks good to be merged by the way 🎉
(besides the three broken links that are already broken currently and which we will fix after this 👍)

@ashleemboyer
Copy link
Contributor Author

We link to some of these pages here: https://github.com/hashicorp/terraform-cdk/blob/main/cdk.tf/vercel.json

(edit: They all redirect from cdk.tf to various destinations)

@ansgarm ah okay, I see! @BRKalow or @thiskevinwang can probably provide stronger feedback on this since they have more familiarity with it.

@ansgarm
Copy link
Member

ansgarm commented Mar 3, 2023

That is something that is managed by us, I think updating the links that point to developer.hashicorp.com would be enough, but could also be done in a follow-up PR 😇

@ashleemboyer
Copy link
Contributor Author

@ansgarm my account doesn't have the permissions to merge this PR, so feel free to do it when you're ready!

@ansgarm
Copy link
Member

ansgarm commented Mar 6, 2023

@ashleemboyer 👋 Happy to merge this, however the "Test Link Rewrites" is still failing (but as I read in Slack, that is okay?) – it also appears that this workflow is only intended to run on this PR to check this change.
Given that we don't really need it. Can we maybe remove it as part of this PR already? Saves us the extra PR 😄

@ashleemboyer
Copy link
Contributor Author

@ashleemboyer 👋 Happy to merge this, however the "Test Link Rewrites" is still failing (but as I read in Slack, that is okay?) – it also appears that this workflow is only intended to run on this PR to check this change. Given that we don't really need it. Can we maybe remove it as part of this PR already? Saves us the extra PR 😄

@ansgarm yep it's OK the test is failing! I've noted it in the PR description as well. I'll go ahead and remove the file as you suggested! Be right back. 😊

@ashleemboyer
Copy link
Contributor Author

@ashleemboyer 👋 Happy to merge this, however the "Test Link Rewrites" is still failing (but as I read in Slack, that is okay?) – it also appears that this workflow is only intended to run on this PR to check this change. Given that we don't really need it. Can we maybe remove it as part of this PR already? Saves us the extra PR 😄

@ansgarm yep it's OK the test is failing! I've noted it in the PR description as well. I'll go ahead and remove the file as you suggested! Be right back. 😊

@ansgarm file removed! This should be ready to go on my end. 😎

@ansgarm ansgarm merged commit 8da3c35 into main Mar 6, 2023
@ansgarm ansgarm deleted the docs/amb.migrate-link-formats branch March 6, 2023 15:57
@ansgarm
Copy link
Member

ansgarm commented Mar 6, 2023

Mergeddddd 💯

I kept the discussion items open for a follow-up PR to fix the broken links

ansgarm added a commit that referenced this pull request Mar 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2023

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants