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

MTA 7.0: Rules development guide -- Broken link fix #893

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RichardHoch
Copy link
Collaborator

@RichardHoch RichardHoch commented Jun 5, 2024

Resolves https://issues.redhat.com/browse/MTA-2919 by fixing broken links in MTA 7.0 Rules development guide.

Previews:

@RichardHoch RichardHoch marked this pull request as draft June 5, 2024 14:59
@RichardHoch RichardHoch marked this pull request as ready for review June 6, 2024 14:44
@RichardHoch RichardHoch changed the title WIP: Draft of link fix MTA 7.0: Rules development guide -- Broken link fix Jun 6, 2024
@RichardHoch RichardHoch force-pushed the links_rule_guide branch 3 times, most recently from d63297c to d537814 Compare June 10, 2024 10:18
@@ -99,7 +99,7 @@ The `<not>` element has no unique attributes or child elements.
[discrete]
===== Summary

The `<iterable-filter>` element counts the number of times a condition is verified. For additional information, see the link:{LinkAPI}org/jboss/windup/rules/general/IterableFilter.html[IterableFilter] class.
The `<iterable-filter>` element counts the number of times a condition is verified. For additional information, see the link:https://github.com/windup/windup/blob/master/rules-base/api/src/main/java/org/jboss/windup/rules/general/IterableFilter.java[IterableFilter] class.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why have you not used the LinkAPI attribute for consistency?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Link API = https://github.com/windup/windup/blob/master/reporting/api/src/main/java/
This link begins https://github.com/windup/windup/blob/master/rules-base ... you can see that they diverge after the master sub-directory.

This was the last link I found, so I thought it would be safer to leave LinkAPI for the 2 xrefs I had verified as is and copy-paste the complete path directory for this one, rather than truncate LinkAPI and rewrite the other links from master.

I've now truncated LinkAPI, used it for all three links, and adjusted the other two links as needed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes you have failed to address the question

You should have shortened the {LINKAPI} attribute or created a second attribute

What happens if the repo is moved again? Then we only have to update one or two attributes

Copy link
Collaborator Author

@RichardHoch RichardHoch Jun 13, 2024

Choose a reason for hiding this comment

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

@anarnold97 On Tuesday, I truncated {LinkAPI} as you suggested, so that it now can be used with all of the links to the files in the repo. I have squashed my commits, so the changes between versions of the PR aren't visible.

You are 100% correct that we should use the attribute in all locations and I have changed the PR accordingly.

@@ -105,7 +105,7 @@ endif::[]
:ProductDocVscGuideURL: https://access.redhat.com/documentation/en-us/{DocInfoProductNameURL}/{DocInfoProductNumber}/html-single/visual_studio_code_extension_guide
:ProductDocIntelliJGuideURL: https://access.redhat.com/documentation/en-us/{DocInfoProductNameURL}/{DocInfoProductNumber}/html-single/intellij_idea_plugin_guide
:OpenShiftDocsURL: https://docs.openshift.com/container-platform/{OpenShiftProductNumber}
:LinkAPI: http://windup.github.io/windup/docs/latest/javadoc/
:LinkAPI: https://github.com/windup/windup/blob/master/reporting/api/src/main/java/
Copy link
Collaborator Author

@RichardHoch RichardHoch Jun 11, 2024

Choose a reason for hiding this comment

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

The link https://github.com/windup/windup/blob/master/reporting/api/src/main/java/org/jboss/windup/reporting/config/HintExists.java and the other links don't include the subdirectory javadoc I changed the entire attribute.

:LinkAPI: now ends in ends in /java/, not /javadoc/.

The line I commented out refers to "Javadocs" here:

image

Clicking Javadocs there leads to a 404.

@@ -6,6 +6,6 @@
[id="rules-important-links_{context}"]
= Additional resources

* {ProductShortName} Javadoc: http://windup.github.io/windup/docs/latest/javadoc
// * {ProductShortName} Javadoc: http://windup.github.io/windup/docs/latest/javadoc
Copy link
Collaborator

Choose a reason for hiding this comment

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

As this is used in line 108, lets use it here as well

Suggested change
// * {ProductShortName} Javadoc: http://windup.github.io/windup/docs/latest/javadoc
* {ProductShortName} Javadoc: https://github.com/windup/windup/blob/master/reporting/api/src/main/java

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@anarnold97 The link to Javadocs (the current display text) is broken, so I think we should comment this out for now. I've alerted the windup team about the problem. Once they give us the correct link, we can add it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In which case why did you add line 108?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please address this comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't understand the question. Line 108 of document-attributes.adoc previously (MTA 6.0 and earlier) contained an attribute named :LinkAPI: that was defined as : http://windup.github.io/windup/docs/latest/javadoc/ . That definition is no longer correct and led to all the broken links. You found the correct path for two of the links (ClassificationExists and HintExists) and we defined LinkAPI based on that.

When I tried to use that attribute with IterableFilter, I saw it did not work, because IterableFilter was in a different subdirectory than the other two. I chickened out and used the full directory path, instead of truncating :LinkAPI;

You corrected me on that , so I changed :LinkAPI: and adjusted the links for those 3 items. I checked the links and they work.

You told me previously to comment out line 8 of rules-important-links after I told you the link on the website is broken.

image

I've searched the repo we cloned and don't see an entry for any spelling or capitalization of Javadocs/Javadox.

I've let the windup team know the link on the site is broken.

The change to line 108 of document-attributes.adoc fixes all the links except for the link in the Appendix, line 8 of rules-important-links.adoc. I can't find anything that replaces the link in the Appendix for sure, so I suggest commenting out line 8 of rules-important-links.adoc. I did change the line to include :LinkAPI: .

@RichardHoch
Copy link
Collaborator Author

@anarnold97 Please review this PR again. Thank you.

@anarnold97
Copy link
Collaborator

@anarnold97 Please review this PR again. Thank you.

@anarnold97 Please review this PR again. Thank you.

Still not close to being merged.

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.

2 participants