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

cdash_analyze_and_report.py: HTML special characters in (e.g.,) build names are not escaped when generating the report #577

Closed
skyreflectedinmirrors opened this issue May 8, 2023 · 8 comments

Comments

@skyreflectedinmirrors
Copy link

I have been experimenting with cdash_analyze_and_report.py to provide better reporting of my CDash project, and have got things mostly working. One thing I have noticed however, is that certain links in the generated HTML file are not escaped properly, for example:

image

Because I named my build "Linux--with-", I often have a "++" as a part of the build name. When CDAR generates the links for such a build, you land on a filter page like e.g.:

image

I.e., the offending special characters ('++' in this case, but could be any HTML protected characters generally) are not displayed, and you get a filter that displays no builds.

I think solving this would be as simple as using something like urllib.parse to escape the user provided strings (i.e., filterFields, and friends) in the various QueryUrl constructors.

This is my first contribution to TriBITS, so please let me know if I've missed any of the guidelines. If I'm on the right track here, I'm happy to work on a fix / tests, and submit a PR.

@bartlettroscoe
Copy link
Member

Hello @arghdos, yes, that is a problem in general. If you can post a PR that fixes this using standard Python 3.x, then that would be great!

And if you have other suggestions for this tool, let me know. (I have a long list of features that would make this tool more useful for various use cases that I should post to a GitHub issue.)

@skyreflectedinmirrors
Copy link
Author

Will do! If you write up your list of features, send me a link. I had a few thoughts myself, mainly around generating summary statistics (e.g., for issue trackers on different JIRA instances, for different library components, etc.) but would be good to see your list as it's not yet clear to me where the role(s) of the CDash dashboard ends and the report generation begin.

@bartlettroscoe
Copy link
Member

Will do! If you write up your list of features, send me a link.

@arghdos, I did a dump into the new epic:

Also note there are a number of existing Issues shown in this query.

The tool cdash_analyze_and_report.py is really not at a point where just anyone can pick it up and use it as it is lacking a good bit of documentation and it needs more basic error checking of input (both from the input options and files and from data downloaded from CDash).

The majority of that will likely never get done but some of that would be very useful for some customers and use cases. But I may get some funding to do some of that next FY to work on this for some new customers.

I had a few thoughts myself, mainly around generating summary statistics (e.g., for issue trackers on different JIRA instances, for different library components, etc.)

Go ahead and post issues for any ideas you have that might be useful for your use cases (and you might be willing to work on).

Also note that we can consider breaking the code and tests for cdash_analyze_and_report.py (and related tools like CreateIssueTrackerFromCDashQuery.py and cdash_build_testing_date.py) out into its own GitHub repo. (But there are some Python utility modules that are used by other TriBITS Python tools that would need to be addressed in some way.)

@skyreflectedinmirrors
Copy link
Author

The tool cdash_analyze_and_report.py is really not at a point where just anyone can pick it up and use it as it is lacking a good bit of documentation and it needs more basic error checking of input (both from the input options and files and from data downloaded from CDash).

It definitely could use some love, but FWIW the conference publication from a few years back was enough to get me up and running (more or less). Most useful to me would be some information on the general architecture, though perhaps I'll start writing things as I tinker.

Also note that we can consider breaking the code and tests for cdash_analyze_and_report.py (and related tools like CreateIssueTrackerFromCDashQuery.py and cdash_build_testing_date.py) out into its own GitHub repo.

This would be useful, as it's the only component of TriBITS I'm using right now (though, it makes me wonder how much more of the infrastructure I could re-use).

@bartlettroscoe
Copy link
Member

Also note that we can consider breaking the code and tests for cdash_analyze_and_report.py (and related tools like CreateIssueTrackerFromCDashQuery.py and cdash_build_testing_date.py) out into its own GitHub repo.

This would be useful, as it's the only component of TriBITS I'm using right now (though, it makes me wonder how much more of the infrastructure I could re-use).

If there is a good bit more work to be done, then we can make this happen. The only reason this code exists in the TriBITS at all is because it uses some of the Python utilities in TriBITS used by other tools in TriBITS. (So we may need to break this into a few different GitHub repos to resolve the dependency issues.)

@skyreflectedinmirrors
Copy link
Author

Sure, and for the moment I'm happy enough with a copy of TriBITS in my repo.

@bartlettroscoe
Copy link
Member

@arghdos, with the merge of #579, please confirm that this issue is resolved for you.

@skyreflectedinmirrors
Copy link
Author

skyreflectedinmirrors commented May 9, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants