Coder Social home page Coder Social logo

permian's People

Contributors

jikortus avatar jstodola avatar kkoukiou avatar pebringer avatar pholica avatar rvykydal avatar velezd avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

permian's Issues

AnacondaWebUIWorkflow breaks terminal output

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).

Empty 'x86_64' value of bootIso structure inference from url broken for Anaconda workflow

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

Conversion from KstestParamsStructure to BootIsoStructure

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.

webui crashes in presence of binary (non-UTF-8) log file

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..)

Use tclib.expressions.compile_bool instead of tclib.expressions.eval_bool

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.