-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Replace ansiconv with ansi2html #15328
Conversation
The ansiconv package is archived so I'm replacing it with a similar package that's still actively being worked on.
The version minimum was used to get the latest version while running the upgrader
The question I'm asking myself is: do we have tests for this view? awx/awx/main/tests/functional/api/test_unified_jobs_view.py Lines 77 to 87 in ea23231
awx/awx/main/tests/functional/api/test_unified_jobs_stdout.py Lines 50 to 68 in ea23231
So yes, we are generally hitting that view. And it does seem to hit the format types that would be seen. But the assertion on the content produced is very light. I would like to see a little bit better of a confirmation. Could we just compare screens of the demo job template manually, like http://localhost:8013/api/v2/jobs/2/stdout/ does it still show the green text in the html format, for example. Does the txt format not have coloring markings at http://localhost:8013/api/v2/jobs/2/stdout/?format=txt? |
@AlanCoding confirming the HTML is displaying the correct colors |
requirements/requirements.in
Outdated
@@ -1,5 +1,5 @@ | |||
aiohttp>=3.9.4 # CVE-2024-30251 | |||
ansiconv==1.0.0 # UPGRADE BLOCKER: from 2013, consider replacing instead of upgrading | |||
ansi2html>=1.9.1 # minimum version for 3.11+ Python |
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 that's the only reason, it probably doesn't need to be stated here. It's usually good to set a minimum version to the release that introduced a feature being used. The compatibility with the target environment is computed by the dependency resolver when pip install
is doing its thing automatically. So tracking the same information manually doesn't typically make sense unless something is really broken and needs to be excluded somehow.
Instead, it might be useful to state what uses this and how.
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.
I checked the source code, and it seems that the released and inspectable versions of the library for the past 12 years had the same API (class+method name) so the lower boundary is indeed not necessary: https://github.com/pycontribs/ansi2html/blob/0.9.3/ansi2html/converter.py#L211. The usage info would still be nice, though.
Quality Gate passedIssues Measures |
SUMMARY
The ansiconv package is archived so I'm replacing it with a similar package that's still actively being worked on.
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION