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

docs: Fix broken link to 7.16 docs #2499

Merged
merged 1 commit into from
Dec 6, 2021

Conversation

bmorelli25
Copy link
Member

The docs PR to upgrade to 7.16 (elastic/docs#2299) is failing due to a broken link in the apm-agent-nodejs repo. This link exists in master, 3.x, and 2.x:

14:29:51 INFO:build_docs:Bad cross-document links:
14:29:51 INFO:build_docs:  /tmp/docsbuild/target_repo/html/en/apm/agent/nodejs/2.x/log-correlation.html contains broken links to:
14:29:51 INFO:build_docs:   - en/apm/guide/7.16/observability-integrations.html#_ingest_your_logs_into_elasticsearch
14:29:51 INFO:build_docs:  /tmp/docsbuild/target_repo/html/en/apm/agent/nodejs/3.x/log-correlation.html contains broken links to:
14:29:51 INFO:build_docs:   - en/apm/guide/7.16/observability-integrations.html#_ingest_your_logs_into_elasticsearch
14:29:51 INFO:build_docs:  /tmp/docsbuild/target_repo/html/en/apm/agent/nodejs/current/log-correlation.html contains broken links to:
14:29:51 INFO:build_docs:   - en/apm/guide/7.16/observability-integrations.html#_ingest_your_logs_into_elasticsearch
14:29:51 INFO:build_docs:  /tmp/docsbuild/target_repo/html/en/apm/agent/nodejs/master/log-correlation.html contains broken links to:
14:29:51 INFO:build_docs:   - en/apm/guide/7.16/observability-integrations.html#_ingest_your_logs_into_elasticsearch

This PR adds an asciidoctor ifeval that changes the documentation link based on the{branch} attribute specified in this file. After the 7.16 release, this ifeval can be removed as only the {apm-overview-ref-v}/log-correlation.html#_ingest_your_logs_into_elasticsearch link we be valid.

This PR needs to be backported to the 3.x and 2.x branches.

@bmorelli25 bmorelli25 added the Team:Docs Label for the Observability docs team label Dec 6, 2021
@bmorelli25 bmorelli25 requested a review from a team December 6, 2021 20:20
@bmorelli25 bmorelli25 self-assigned this Dec 6, 2021
@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label Dec 6, 2021
@apmmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-12-06T20:20:51.688+0000

  • Duration: 3 min 30 sec

  • Commit: a89e326

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run module tests for <modules> : Run TAV tests for one or more modules, where <modules> can be either a comma separated list of modules (e.g. memcached,redis) or the string literal ALL to test all modules

  • run benchmark tests : Run the benchmark test only.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@trentm
Copy link
Member

trentm commented Dec 6, 2021

This PR needs to be backported to the 3.x

The 3.x branch gets sync'd to the latest master when we do a release, so the most straightforward thing would be to do a release after this is in.

(Note that earlier today we were discussing perhaps being blocked on doing a release until #2498 is discussed. @bmorelli25 What is the urgency of this? I'm guessing pretty high if builds are broken.)

and 2.x branches.

The 2.x branch isn't maintained anymore. It hasn't had a commit in since 2020-05. It was EOL on 2021-03-19. We can certainly make this change there if that is easiest.

Is there something separate we can do to remove dependence on the "2.x" branch of this repo?

@bmorelli25
Copy link
Member Author

bmorelli25 commented Dec 6, 2021

The 3.x branch gets sync'd to the latest master when we do a release, so the most straightforward thing would be to do a release after this is in.

Do you mean that you force push to 3.x when a release is cut? We can certainly release if that's easiest for you. Typically (in the other agents) we'd just backport and then the commit is overwritten on the next release. The choice is yours.

Is there something separate we can do to remove dependence on the "2.x" branch of this repo?

The only other thing would be to remove the 2.x docs from the doc build since they're EOL, but that might produce its own set of problems.

For a bit more context: this kind of thing (fixing old agent links) is typical around release times. Every few releases there's an agent or two that requires us to go back in time and fix things. The problem occurs because of the versioning mismatch between agents and stack. We point to the moving target of "current" which can have negative consequences. Major releases are even worse — I'd expect us to play this game all over again when 8.0 releases.

@trentm
Copy link
Member

trentm commented Dec 6, 2021

Do you mean that you force push to 3.x when a release is cut?

We reset the "3.x" branch to master via git branch -f 3.x master && git push origin 3.x.

We can certainly release if that's easiest for you. Typically (in the other agents) we'd just backport and then the commit is overwritten on the next release.

Yah, we could do similar.

The only other thing would be to remove the 2.x docs from the doc build since they're EOL, but that might produce its own set of problems.

Understood. Can we create an issue to track doing that? I think eventually we want to get out of having to worry about the 2.x branch. For this issue, I'll backport the change to the 2.x branch.

@bmorelli25
Copy link
Member Author

Issue opened ⬆️ . I'll merge this PR now. Would you mind taking care of the backport to 3.x as well?

@bmorelli25 bmorelli25 merged commit 73ce1c6 into elastic:master Dec 6, 2021
@bmorelli25 bmorelli25 deleted the docs-fix-716-bug branch December 6, 2021 21:32
trentm pushed a commit that referenced this pull request Dec 6, 2021
@trentm
Copy link
Member

trentm commented Dec 6, 2021

Backported to 3.x: a458109

2.x was handled in #2501

@trentm trentm mentioned this pull request Dec 7, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning. Team:Docs Label for the Observability docs team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants