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

Update links to changelogs after moving them #209

Closed
2 of 3 tasks
huonw opened this issue May 20, 2024 · 0 comments · Fixed by #223
Closed
2 of 3 tasks

Update links to changelogs after moving them #209

huonw opened this issue May 20, 2024 · 0 comments · Fixed by #223
Assignees
Labels
bug Something isn't working

Comments

@huonw
Copy link
Contributor

huonw commented May 20, 2024

The changelogs/release notes have moved from src/python/pants/notes to docs/notes, in pantsbuild/pants#20847. This repo has various references to the old location: git grep src/python/pants/notes finds 385 matches!

We should:

Occurrences in this repo, as computed by: git grep src/python/pants/notes | cut -f-2 -d/ | sort --version-sort | uniq -c | awk '{ print("|", $2, "|", $1, "|") }'

directory count
blog/2021-05-20-introducing-pants-2-5 1
blog/2021-08-02-introducing-pants-2-6 1
blog/2021-09-27-introducing-pants-2-7 2
blog/2021-11-17-introducing-pants-2-8 1
blog/2022-03-23-introducing-pants-2-10 1
blog/2022-05-02-introducing-pants-2-11 1
blog/2022-06-29-pants-2-12 1
blog/2022-09-01-introducing-pants-2-13 2
blog/2022-10-26-pants-2-14 1
blog/2023-02-24-pants-2-15 1
blog/2023-06-16-pants-2-16-0 2
blog/2023-08-30-pants-2-17-0-is-released 1
blog/2023-11-14-pants-2.18.0-is-released 2
blog/2024-01-24-pants-2-19 2
blog/2024-03-27-pants-2-20 1
docs/docs 15
src/pages 21
versioned_docs/version-2.0 11
versioned_docs/version-2.1 13
versioned_docs/version-2.2 14
versioned_docs/version-2.3 15
versioned_docs/version-2.4 16
versioned_docs/version-2.5 8
versioned_docs/version-2.6 8
versioned_docs/version-2.7 8
versioned_docs/version-2.8 15
versioned_docs/version-2.9 16
versioned_docs/version-2.10 17
versioned_docs/version-2.11 15
versioned_docs/version-2.12 16
versioned_docs/version-2.13 17
versioned_docs/version-2.14 18
versioned_docs/version-2.15 18
versioned_docs/version-2.16 18
versioned_docs/version-2.17 18
versioned_docs/version-2.18 17
versioned_docs/version-2.19 17
versioned_docs/version-2.20 17
versioned_docs/version-2.21 17
total 385
@huonw huonw added the bug Something isn't working label May 20, 2024
huonw added a commit to pantsbuild/pants that referenced this issue May 21, 2024
This is a fix to paper over the move of release notes in
#20847 from
`src/python/pants/notes` to `docs/notes`. This is to ensure that links
to the old `src/python/pants/notes` locations are not dead, so people
land on them and get directed to the right place.

These links appear in various blog posts and old doc snapshots
(pantsbuild/pantsbuild.org#209) and
potentially places that cannot be updated too (e.g. slack, and other
people linking them privately).

We should still update the ones we can, do the new location, but these
stubs provide a fallback for ones that we miss.

These were generated by running this script in the
`src/python/pants/notes` location:

```shell
#!/bin/bash

for p in ../../../../docs/notes/*; do
    filename=$(basename $p)
    release=$(echo $filename | sed 's/.md//; s/.rst//')
    if [[ $filename == *.md ]]; then
        # Markdown:
        echo -e "# $release Stable releases\n\nThese notes have moved to [\`docs/notes/$filename\`]($p)"
    else
        # Restructured text:
        echo -e "$release Stable releases\n=====================\n\nThese notes have moved to \`docs/notes/$filename <$p>\`_"
    fi > $filename
done

# there's a few links to 2.{0,1}.x.rst, but they're now .md
echo -e "2.0.x Stable releases\n=====================\n\nThese notes have moved to \`docs/notes/2.0.x.md <../../../../docs/notes/2.0.x.md>\`_" > 2.0.x.rst
echo -e "2.1.x Stable releases\n=====================\n\nThese notes have moved to \`docs/notes/2.1.x.md <../../../../docs/notes/2.1.x.md>\`_" > 2.1.x.rst
```

We don't need to adding new ones in future, since future releases won't
ever have files in the old place.
@huonw huonw self-assigned this Jun 9, 2024
huonw added a commit that referenced this issue Jun 10, 2024
This makes a few changes to the "all versions" page
(https://www.pantsbuild.org/versions):

- add 2.21 now that we've released it
- fix the broken links to documentation: both the extraneous `.x` and
pointing to a page that isn't the welcome page (and doesn't exist for
some versions). (Fixes #147)
- rewrite the changelog links (part of #209)
huonw added a commit that referenced this issue Jun 10, 2024
This rewrites the old `src/python/pants/notes` path for changelogs to
`docs/notes` in three blog posts.

Fixes #209  (together with #222)

There's still some references to the ``src/python/pants/notes`` path in
this repo, but I don't think they need updating. They either:

- have a branch or tag reference that has the notes in the old location,
e.g.
https://github.com/pantsbuild/pantsbuild.org/blob/67038eb6956fe4c8fc956884897efebac6e8fd8d/blog/2023-11-14-pants-2.18.0-is-released/index.mdx#L99
- are in old reference docs, and seems like it can be adequately handled
via the redirects we now have:
pantsbuild/pants#20937 (alternatively, we
_could_ rewrite them)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant