rhinstaller / permian Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
AnacondaWebUIWorkflow is using virt-install command to start VM and to get console output. But virsh console switches the terminal in to raw mode and that breaks output of the whole pipeline. New lines do not return to the start.
This is not an issue if the output is redirected in to a file, eg. running in jenkins or GitHub CI.
And it can be workaround-ed but running Permian with /dev/null on stdin ./pipeline ... < /dev/null
(Permian will create new pty).
With the PR #24
one of our use cases from https://github.com/rhinstaller/kickstart-tests/blob/master/.github/workflows/scenarios-permian.yml (happens for rhel8 and rhel9 scenarios) was broken.
The case:
run_event '{"type":"github.scheduled.daily.kstest.rhel8",
"bootIso":{"x86_64":""},
"kstestParams":{"platform":"rhel8","urls":{"x86_64":{"installation_tree":"http://download.eng.bos.redhat.com/rhel-8/development/RHEL-8/latest-RHEL-8/compose/BaseOS/x86_64/os","modular_url":"http://download.eng.bos.redhat.com/rhel-8/development/RHEL-8/latest-RHEL-8/compose/AppStream/x86_64/os"}}}}'
The case(s) we would like to cover are defined in the test added in:
rvykydal@0e6ffc7
I think the behaviour of the cases is worth face to face discussion.
Is it correct to supply bootIso with empty values for archs or missing archs ? It is easier for us given the way how we construct the event in the GitHub workflow, but maybe we should prohibit using empty value for an arch and do not supply the arch key in such case - that would still require some update of the code in the plugin as well.
For now we are using branch from my fork with revert of the PR for deployed daily workflow: https://github.com/rvykydal/permian/commits/kstest-revert-boot-iso-conversion
when -o library.directPath=/some/non-existing/dir/ is used and path doesn't exist, the pipeline is executed, doesn't find any TestCases for event, and exits without any error.
It should at least warn (better fail) about non-existing library in this case.
In KickstartTestWorkflow.process_installation_urls in libpermian/plugins/kickstart_test/init.py, there is a conversion from tree url to boot iso url. This should instead happen automatically in conversion method from KstestParamsStructure to BootIsoStructure. That will also eliminate some ifs in KickstartTestWorkflow.
After a binary file is added to logs (using IsolatedWorkflow.logData()
or GroupedWorkflow.groupLogData()
), webui will crash.
A "crude" but easy way to reproduce would be--once #15 is merged--alter tests/test_library/testing_plugin_8.tc.yaml so that the data_hex
key includes non-UTF-8 bytes.
[..]
[..]
STARTING TEST: tests/integration/test_testing_plugin/test_7.sh
Verifies execution of workflows with logs
+ test
+ PIPELINEPLUGINS_ENABLE=test
+ ./pipeline test -o library.defaultCaseConfigMergeMethod=extension -o library.directPath=tests/test_library -o testingPlugin.reportSenderDirectory=/tmp/tmp.9MAWMa5JRE -o workflows.local_logs_dir=/tmp/tmp.ivl9qzSPtC --tp 'testing plugin plan 9'
INFO:libpermian.webui.callbacks(Thread-2):WebUI started at: http://10.0.2.100:50580/
[2022-03-15 11:04:12,530] ERROR in app: Exception on /logs/af8351f1315424feb7ae8a2000d29a9d12f114e2/horse [GET]
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/root/permian/libpermian/webui/builtin.py", line 61, in logs
return Response(logfile.read(), mimetype="text/plain")
File "/usr/lib64/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
[2022-03-15 11:04:12,555] ERROR in app: Exception on /logs/1bbc1c85a2c20554b2741590e766aa127ceb05c3/horse [GET]
[..]
[..]
(Above, I did it by replacing the key content with 1-pixel PNG, but I believe it should be enough to just replace any byte with 0x89, ie. 89
in the data_hex
key.)
It seems that at some point, webui is trying to load and decode every logfile as UTF-8. As @pholica explained to me, this is likely related to dumping of the UI for later access and in current production this would not prevent pipeline from submitting the results. (It would still break access to the web UI dump..)
Using the tclib.expressions.eval_bool
repeatedly on the same jinja2 expression has effect on the performance. There's https://github.com/rhinstaller/tclib/pull/8 which should improve the situation in the tclib itself.
There are some places in the Permian where the tclib.expressions.eval_bool
is used inside loops using the same jinja2 template string which leads to performance issues.
I can see one candidate in run_subset
plugin which is worth fixing (especially when there are a lot of CRCs being filtered).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.