Skip to content

[hotfix] [docs] Fix broken flink-training links in hands-on section#27746

Open
kylerballiet wants to merge 1 commit intoapache:masterfrom
kylerballiet:fix-docs-broken-links
Open

[hotfix] [docs] Fix broken flink-training links in hands-on section#27746
kylerballiet wants to merge 1 commit intoapache:masterfrom
kylerballiet:fix-docs-broken-links

Conversation

@kylerballiet
Copy link

@kylerballiet kylerballiet commented Mar 6, 2026

What is the purpose of the change

Fix broken flink-training links in the Learn Flink docs. Several pages have a "Hands-on" section that use the training_repo and training_link shortcodes (e.g. Intro to the DataStream API, Data Pipelines & ETL, Streaming Analytics, Event-driven Applications). Two issues affected all of these: (1) the repo link pointed to a branch (e.g. release-2.2) that does not exist in apache/flink-training; (2) the exercise links used blob for paths that are directories in the repo, so the URLs were wrong. Both shortcodes are now updated to fallback to master branch if TrainingBranch is not specified in docs/config.toml, and the exercise shortcode uses tree instead of blob, so the links work on every page that uses them.

Brief change log

  • training_repo.html: fallback to master branch for the repo if .Site.Params.TrainingBranch is not able to be resolved
  • training_link.html: use tree instead of blob for exercise paths, fallback to master branch

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

I built the docs locally using the project's pinned Hugo version (0.124.1 via setup_hugo.sh and build_docs.sh) and verified the flink-training and exercise links on all affected Learn Flink pages (DataStream API, Data Pipelines & ETL, Streaming Analytics, Event-driven Applications); the links resolve correctly on each page. Note: building with a newer Hugo (e.g. 0.157 from Homebrew) produced several unrelated template errors, so I used the pinned version for verification.

Does this pull request potentially affect one of the following parts:

  • Dependencies: no
  • The public API: no
  • The serializers: no
  • The runtime per-record code paths: no
  • Anything that affects deployment or recovery: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@flinkbot
Copy link
Collaborator

flinkbot commented Mar 6, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Copy link
Member

@featzhang featzhang left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the broken links 👍

Since the original implementation used .Site.Params.Branch, it might be better to keep the parameterization instead of hardcoding master.

For example:

{{ .Site.Params.TrainingBranch | default "master" }}

This would allow the training repository branch to be configurable in the future.

@github-actions github-actions bot added the community-reviewed PR has been reviewed by the community. label Mar 7, 2026
@kylerballiet kylerballiet force-pushed the fix-docs-broken-links branch from ea99c02 to ba3eeb9 Compare March 8, 2026 21:18
@kylerballiet kylerballiet requested a review from featzhang March 8, 2026 21:34
@rionmonster
Copy link
Contributor

I was able to pull down the proposed fixes from the branch and verify that the links look good on this end:

docs-verification.mov

Looks good to me!

@github-actions github-actions bot added community-reviewed-LGTM Applied if there are 2 non-committer approves on a PR. (The submitter cannot approve their own PR.) and removed community-reviewed PR has been reviewed by the community. community-reviewed-LGTM Applied if there are 2 non-committer approves on a PR. (The submitter cannot approve their own PR.) labels Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed-LGTM Applied if there are 2 non-committer approves on a PR. (The submitter cannot approve their own PR.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants