-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(5236): Update base docs url #15703
Open
zeeklop
wants to merge
4
commits into
master
Choose a base branch
from
fix/5236-update-docs-base-url
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f834cd5
fix(5236): Update base docs url
zeeklop 7f0b08e
fix(5236): Adds the rest of the URLs
zeeklop 689efc8
Merge branch 'master' of github.com:Graylog2/graylog2-server into fix…
zeeklop bd3fc67
Merge branch 'master' of github.com:Graylog2/graylog2-server into fix…
zeeklop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't plan on changing the base
https://go2docs.graylog.org/
would it be possible to turn this into a function that doesn't have to be updated before every release?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Zack. I'm asking the docs team how do they handle the docs version. I'll update this depending on how all that works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! This approach works, it just adds another step someone has to remember to do before an official release goes out the door.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking on that @zeeklop. I am also wondering: would it work to parse the major and minor version numbers from the supplied
appVersion
and programmatically concatenate themajor-minor
string from that?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danotorrey @kingzacko1 Yes, that was my first thought. I've been talking with the docs team trying to figure it out what is the cadence of the docs. Do we get a new URL on each Graylog release, or is there a period of time when the docs are behind?
So far haven't got a straight answer. The Docs team is trying to create a URL with an alias for the latest something like
go2docs.graylog.org/latest | current/
If you look at the latest modification on this file, you'll see that what is doing is getting the mayor and minor release number and matching it with the list of docs URLs using RegEx. If it doesn't find a match, it uses the latest as base.
My concerns are
In conclusion, If the Docs URL gets updated on each release, then we can use concatenation for prod with the caveat that in dev we will have to use the previous version.
Another solution would be to always send the user to the latest version, since the docs page has a dropdown to select after what version you want to see.
Trying to send the user the latest version of the docs could be a little tricky if the URL doesn't get updated during the release of a new minor or mayor version of Graylog. We would have to somehow check first that there is a version of the docs for the app version otherwise, drop a version until we find one that works (no 404)
I thought it would be an easy fix, but looks like the docs team has been at it for quite some time trying to figure it out the best solution for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zeeklop Thanks for the details. Ahh, I see. the older versions use a different scheme. Given the those different schemes, I don't see a better way than the current implementation. I think this change should be helpful, since we probably have a decent portion of users on
5.0
still.This is only applicable in cases where devs explicitly specify the
appVersion
, right? In that case, then the version -> docs path mapping only needs to be updated when a dev needs to reference a new specific version. The correct mapping could be added at that time, since there is a chance the scheme may change by then.