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

Add archive page for older LTS changelogs and update recent changelog page #7746

Merged

Conversation

biru-codeastromer
Copy link
Contributor

@biru-codeastromer biru-codeastromer commented Dec 11, 2024

Fixes #7502

The changelog-stable page for LTS changelogs displayed all changelogs in a single list, without any filtering or separation for older entries. This caused a cluttered user experience, especially when trying to view recent updates. To address this, a feature was requested to separate recent and older changelogs.

Changes Implemented

  1. Filtering Changelogs:

    a. Updated index.html.haml to display only recent changelogs (from the past 2 years).
    b. Added filtering logic using Ruby to select recent entries (release.date > 2.years.ago).

  2. Created Archive Page:

a)Added a new archive.html.haml file under content/changelog-stable/ to display older changelogs (older than 2 years).
b)Implemented filtering logic to show only archived entries (release.date <= 2.years.ago).

Impacts

  1. The main changelog page now displays only recent updates, reducing clutter and improving readability.
  2. Older changelogs are moved to a dedicated archive page, ensuring that all changelogs remain accessible.

Hope this solves the issue @timja

@kmartens27 @gounthar Hello Sir's, could you please review these changes and let me know if everything looks good? Also, if there are any further improvements or adjustments I should consider, I'd appreciate your suggestions!..thanks

@biru-codeastromer biru-codeastromer requested a review from a team as a code owner December 11, 2024 08:20
Copy link
Contributor

@gounthar gounthar 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 your contribution.
The CI fails, though, with two errors, one of them being:

 An error during rendering /changelog-stable/archive.html.haml occurred.
While processing file /home/jenkins/agent/workspace/Websites_jenkins.io_PR-7746/content/changelog-stable/archive.html.haml
An error occurred: undefined method `years' for an instance of Integer

@krisstern
Copy link
Member

Hi @biru-codeastromer please test locally first to make sure the build can be generated successfully. Now I am seeing the below in the logs:

[2024-12-11T08:25:59.332Z] Please see .awestruct/error.log for more information
[2024-12-11T08:25:59.332Z] An error during rendering /changelog-stable/index.html.haml occurred.
[2024-12-11T08:25:59.332Z] While processing file /home/jenkins/agent/workspace/Websites_jenkins.io_PR-7746/content/changelog-stable/index.html.haml
[2024-12-11T08:25:59.332Z] An error occurred: undefined method `years' for an instance of Integer

@biru-codeastromer
Copy link
Contributor Author

biru-codeastromer commented Dec 11, 2024

@kmartens27 @gounthar Hi Sir, I'm seeing the following errors in the CI checks:

1.PR merge build failed
2.Website job failed to build
3.Shell step error during site build

Could you please review the logs and help me identify the cause of these issues? Any guidance or suggestions for fixing them would be greatly appreciated!

Also i want to know if this is happening from my end or it is issue with the build system itself!

okay @gounthar looking into it now to resolve

@biru-codeastromer
Copy link
Contributor Author

@krisstern Okay Sir looking into it now,thanks!

@kmartens27
Copy link
Contributor

Hi @biru-codeastromer, it appears that there are two errors in the logs from GitHub:

Screenshot 2024-12-11 at 8 49 31 AM and Screenshot 2024-12-11 at 8 49 40 AM and the logs end with this: Screenshot 2024-12-11 at 8 51 17 AM

The top two errors appear to be regarding the Years integer that has been utilized. Unfortunately the error does not provide further clarification in the logs here, but the run details do have the full log for further information: https://github.com/jenkins-infra/jenkins.io/pull/7746/checks?check_run_id=34240978449

As @krisstern shared, please be sure to test your build locally to make sure that the site builds properly before submitting a PR. This would also allow you to edit and change things as needed in a safe environment without having to make several more commits.

@biru-codeastromer
Copy link
Contributor Author

@kmartens27 sure Sir,I am working on it

@MarkEWaite
Copy link
Contributor

MarkEWaite commented Dec 11, 2024

@biru-codeastromer thanks very much for working on it. Much appreciated.

You might consider using the same technique for the LTS changelog as is already used for the weekly changelog. There is a content/changelog/ directory and a content/changelog-stable/ directory. The index.html.haml directory in the content/changelog/ directory includes an app banner and a section with changelogs of historical releases, like this:

.app-banner
  Changelogs of historical releases can be found
  %a{:href => '/changelog-old/'}
    in the changelog archive.

You might do something similar with:

.app-banner
  Changelogs of historical LTS releases can be found
  %a{:href => '/changelog-stable-old/'}
    in the LTS changelog archive.

The page generation limitation logic that already exists in changelog/index.html.haml would need to be included in the changelog-stable/index.html.haml file and a new directory changelog-stable-old would need to be created with content similar to the content from the weekly-old changelog page definition.

@biru-codeastromer
Copy link
Contributor Author

Okay, Sir will try to do your suggestion @MarkEWaite !

Also , @kmartens27 @krisstern @gounthar . Thank you for the detailed guidance earlier. I wanted to give an update and ask for some clarification regarding an issue I'm facing.

I’ve been working on fixing the filtering logic for recent and archived LTS changelogs based on release.date in lts.yml. The logic works correctly in terms of the code changes I’ve made, but I’m encountering an issue when running make generate locally on my machine. The release.date parsing seems to be causing errors or unexpected behavior during the generation step.

I’m trying to debug and correct the issue but wanted to check if there are any specific constraints or known issues with release.date formatting in lts.yml that I might have missed. Also, could there be local environment dependencies affecting how make generate processes these dates?

Any pointers or guidance would be much appreciated. Thanks in advance for your help!

@MarkEWaite
Copy link
Contributor

I’ve been working on fixing the filtering logic for recent and archived LTS changelogs based on release.date in lts.yml.

The weekly changelog archive (changelog/ and changelog-old/) avoid date computations by using a count of releases instead of a date. If you use a count of 24 or 25 releases, that is approximately two years of LTS releases (a release every 4 weeks with a two week break at the end of each calendar year).

@biru-codeastromer
Copy link
Contributor Author

thank you Sir @MarkEWaite for letting me know that switching to a release count aligns with the expectations for the LTS changelog. now will update the codes accordingly

@biru-codeastromer
Copy link
Contributor Author

Hi @MarkEWaite Sir,

I’ve completed the changes as discussed and raised the PR. The implementation includes using the same technique for the LTS changelog as for the weekly changelog, with a new changelog-stable-old directory created to archive older LTS releases. Additionally, the logic for generating the pages has been implemented in the respective index.html.haml files, and I’ve ensured proper navigation between changelog-stable and changelog-stable-old.

Also @kmartens27 @gounthar Sir,All checks have now passed successfully. Could you please review the PR and let me know if there are any further changes or improvements needed? Looking forward to your feedback.

Thank you!

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

@biru-codeastromer
Copy link
Contributor Author

Hi @MarkEWaite Sir,

Thank you for pointing out the issue! I’ve successfully applied the necessary corrections to the changelog files. The changelog-stable now displays the most recent changelogs, and the changelog-stable-old handles the archived ones.

I’ve also updated the app-banner links to reflect these changes. Also added the app-banner links in changelog-stable-old to get back to the recent one.

The recent changelogs now use drop(25) and the archived ones use take(25) for proper segmentation, previously it was the other way around.

Please review the latest changes at your convenience and let me know if there’s anything else to address. Looking forward to your feedback!

Thank you for your guidance!

Copy link
Contributor

@zbynek zbynek left a comment

Choose a reason for hiding this comment

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

@biru-codeastromer

The recent changelogs now use drop(25) and the archived ones use take(25)

That means the "old" changelog will always have 25 releases and the current one will keep growing. It would make sense to keep the number of items in the stable changelog fixed instead and let the "old" changelog grow. Also

= partial('changelog-stable.html')

is responsible for including the really old versions, but it's part of the stable changelog rather than old, meaning that "old" changelog now contains the middle 25 releases and stable has everything else.

…older ones and also moved the = partial('changelog-stable.html') to changelog-stable-old
@biru-codeastromer
Copy link
Contributor Author

Hi @zbynek ,

Thank you for the feedback! I’ve made the necessary changes as per your suggestion. The "stable" changelog now has a fixed number of items, while the "old" changelog will continue to grow with additional releases.I have reversed it .

I’ve also corrected the usage of partial('changelog-stable.html') by moving it to the old changelog, so that it now correctly includes the older versions within the stable changelog rather than the "old" changelog.

Please take a look at the updated changes and let me know if there’s anything else that needs adjustment.

Thanks again for your help!

@biru-codeastromer
Copy link
Contributor Author

If we are going to be consistent, might as well change the titles of the two files as well to use the plural instead of the singular?

Hi Sir @krisstern I have changed the files name and also updated the links in the index.html.haml files to match the file names .

@zbynek
Copy link
Contributor

zbynek commented Dec 13, 2024

Please don't change the filenames -- /changelog and /changelog-stable are both linked from many places on the website as well as from Jenkins itself and potentially many external websites.

@biru-codeastromer
Copy link
Contributor Author

Please don't change the filenames -- /changelog and /changelog-stable are both linked from many places on the website as well as from Jenkins itself and potentially many external websites.

@zbynek Done it Sir

@biru-codeastromer
Copy link
Contributor Author

@krisstern I have done every suggestions Sir . Hope it is good now !
If any more refining needed , I am ready for suggestions. Thanks .

@krisstern
Copy link
Member

Just don't change filenames unless you know for sure it is okay to do so... The filenames normally follow a particular pattern so if you change them you would be breaking something, like what you just witnessed.

@biru-codeastromer
Copy link
Contributor Author

Just don't change filenames unless you know for sure it is okay to do so... The filenames normally follow a particular pattern so if you change them you would be breaking something, like what you just witnessed.

Hi Sir @krisstern i have back it again and fix it ! Thanks for telling it , I will always keep that in mind .

Copy link
Member

@krisstern krisstern left a comment

Choose a reason for hiding this comment

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

Thanks so much for the hard work @biru-codeastromer!

@krisstern krisstern changed the title Add archive page for older LTS changelogs and update recent changelog… Add archive page for older LTS changelogs and update recent changelog Dec 13, 2024
@krisstern krisstern changed the title Add archive page for older LTS changelogs and update recent changelog Add archive page for older LTS changelogs and update recent changelog page Dec 13, 2024
@biru-codeastromer
Copy link
Contributor Author

Hi Sir's @krisstern @kmartens27 @MarkEWaite @zbynek @gounthar ,

I want to take a moment to thank all the maintainers for your constant support and guidance throughout my contributions. Your detailed reviews, suggestions, and timely responses have made this experience incredibly enriching and enjoyable.
Contributing to Jenkins has been a fantastic journey, and I’ve learned so much from all of you . It inspires me to keep improving and contributing.

I am hopeful that this PR is now completed and completes the issue #7502 , and I’m hopeful it will be merged soon. Regardless, if more suggestions I am ready.

Looking forward to contributing more to Jenkins and learning from this amazing team!
Thank you again !

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks

@MarkEWaite MarkEWaite requested a review from gounthar December 13, 2024 22:37
@biru-codeastromer
Copy link
Contributor Author

Looks great. Thanks

Welcome Sir @MarkEWaite !

@biru-codeastromer
Copy link
Contributor Author

Hi @gounthar Sir ,
I hope you're doing well. I hope your required changes are met .Please let me know if there’s anything I can clarify or improve further!

Thanks !

@biru-codeastromer
Copy link
Contributor Author

Screenshot 2024-12-14 at 8 57 59 PM Screenshot 2024-12-14 at 8 58 21 PM

Hi Sir @MarkEWaite @zbynek ,
I hope you're doing well. I wanted to check something regarding my pull request. I noticed that a "Request Changes" comment was added, referring to a file/section that I had already deleted or replaced in the latest commits.

Could you kindly help me understand why this is happening? Do I need to address these changes again, or can they be dismissed since the file no longer exists in the current state?
Thank you for your guidance and time! Please let me know if there's anything specific I need to do to proceed.

@MarkEWaite
Copy link
Contributor

I hope you're doing well. I wanted to check something regarding my pull request. I noticed that a "Request Changes" comment was added, referring to a file/section that I had already deleted or replaced in the latest commits.

Could you kindly help me understand why this is happening? Do I need to address these changes again, or can they be dismissed since the file no longer exists in the current stat

That entry indicates that @gounthar had requested changes in one or more previous changes. That request for changes is not cleared until @gounthar reviews it or one of the other maintainers dismisses the request for changes. There is nothing that you need to do at this time.

@MarkEWaite MarkEWaite merged commit b8a67e9 into jenkins-infra:master Dec 14, 2024
6 checks passed
@biru-codeastromer
Copy link
Contributor Author

That entry indicates that @gounthar had requested changes in one or more previous changes. That request for changes is not cleared until @gounthar reviews it or one of the other maintainers dismisses the request for changes. There is nothing that you need to do at this time.

@MarkEWaite thank you Sir for the confirmation .

Thank You Sir for the review too @gounthar !

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.

Archive old LTS changelogs
6 participants