ElektraInitiative / libelektra

Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database.
https://www.libelektra.org
BSD 3-Clause "New" or "Revised" License
208 stars 123 forks source link

website issues #1151

Closed markus2330 closed 7 years ago

markus2330 commented 7 years ago

Frontend

Questions

Archive

Frontend

Backend

Other

Questions

Namoshek commented 7 years ago

Btw. what are the results of API testing and benchmarking? Did you try something?

I tried some testing with dredd, but forget about it, doesn't work. I'm actually not even sure what it does, but what I know for sure is that it will never be able to test our authentication stuff, so it is worthless. Didn't benchmark anything though.

markus2330 commented 7 years ago

Didn't benchmark anything though.

Would be good if you take a look. Maybe the frontend has more user-visible optimization potential. In particular I noticed that many files are not downloaded before the whole application.js is downloaded. Is there some way to prefetch things?

markus2330 commented 7 years ago

Can you take a look at http://grinder.sourceforge.net/ ?

markus2330 commented 7 years ago

I added some further usability issues:

markus2330 commented 7 years ago

Thanks, I updated the issues that I noticed in #1221

markus2330 commented 7 years ago

About the black screen, maybe it is fixed when it is CSS valid: https://jigsaw.w3.org/css-validator/validator?uri=www.libelektra.org&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en

Namoshek commented 7 years ago

Mozilla Firefox 45.5.1: Webpage still is initially black (only at main page, others work as before, so it might be related to embedded asciinema). When scrolling down and then up, it gets white.

Any error in the browser console?

About the black screen, maybe it is fixed when it is CSS valid:

All errors are vendor issues from fontawesome, bootstrap, etc. I highly doubt they are really invalid css. And even if, I can't change them as they are packed automatically.

As the error appeared with the move to selfhosting of asciinema, I guess the problem is related to this. It doesn't occur in firefox 45.4.0 and also not in firefox 45.6.0 btw.

why are some snippets without author?

My best guess is: crash

Namoshek commented 7 years ago

I think we should remove the view counter from the snippets. It spams the repository with a commit each time someone looks at a snippet and I guess it would also speed up everything if it wasn't there.

markus2330 commented 7 years ago

Any error in the browser console?

[#][INFO]  State change success! ____ [application.js:17:22370] application.js:1:2750
[#][INFO]  Main template ready ____ [application.js:14:3928] application.js:1:2750
[#][INFO]  Home controller ready ____ [application.js:14:3928] application.js:1:2750
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create asciinema-player.js:36:11097
no element found data::1:1
1482348325958   addons.productaddons    ERROR   Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https."  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145"  data: no] Log.jsm:751:0
1482348325959   Toolkit.GMP ERROR   GMPWrapper(gmp-gmpopenh264) findUpdates() - updateTask for gmp-gmpopenh264 threw: [Exception... "SSL is required and URI scheme is not https."  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145"  data: no] Stack trace: checkCert()@resource://gre/modules/CertUtils.jsm:145 < downloadXML/</success()@resource://gre/modules/addons/ProductAddonChecker.jsm:113 Log.jsm:751:0
1482348326667   addons.update-checker   WARN    Update manifest for {972ce4c6-7e08-4474-a285-3208198ce6fd} did not contain an updates property
[#][INFO]  User service ready! ____ [application.js:14:3928] application.js:1:2750
[#][INFO]  Change state from '' ([object Object]) to 'main.home' ([object Object]) ____ [application.js:17:22370] application.js:1:2750
[#][INFO]  From state: {"name":"","url":"^","views":null,"abstract":true} ____ [application.js:17:22370] application.js:1:2750
[#][INFO]  To state: {"url":"/home","templateUrl":"pages/main/website/home.html","controller":"WebsiteHomeController as ctrl","ncyBreadcrumb":{"label":"APP.BREADCRUMBS.MAIN.HOME"},"name":"main.home"} ____ [application.js:17:22370] application.js:1:2750
[#][LOG]  Not authenticated ____ [application.js:17:22370] application.js:1:2750
[#][INFO]  State change success! ____ [application.js:17:22370] application.js:1:2750
[#][INFO]  Main template ready ____ [application.js:14:3928] application.js:1:2750
[#][INFO]  Home controller ready ____ [application.js:14:3928] application.js:1:2750
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create asciinema-player.js:36:11097

As the error appeared with the move to selfhosting of asciinema, I guess the problem is related to this. It doesn't occur in firefox 45.4.0 and also not in firefox 45.6.0 btw.

The problem is caused by the privacy badger. Maybe we should report the problem there?

My best guess is: crash

How to fix this?

I think we should remove the view counter from the snippets. It spams the repository with a commit each time someone looks at a snippet and I guess it would also speed up everything if it wasn't there.

You could simply not do kdb.set, then it will be changed with the next change? (If some of the views are lost, it does not really matter).

Btw. can you restore my snippets? They were modified variants of some files, its not so easy to modify them again. Please also upload more snippets, its not so inviting to contribute if there are so few snippets.

Namoshek commented 7 years ago

The problem is caused by the privacy badger. Maybe we should report the problem there?

No idea, it's your decision if you are using it. But the chances they will tell you that you are blocking scripts and stuff and that it is normal behavior is quite high.

How to fix this?

Well, I expect it to be fixed already. I'm quite sure it had to do with the high loads / sort of endless loops caused by wrong config for the simpleini plugin.

You could simply not do kdb.set, then it will be changed with the next change? (If some of the views are lost, it does not really matter).

I thought about this too, but what do we gain from the views? I think nothing... it was collect-only until now anyway. And we don't need the info in the snippet exports, so I removed it.

Btw. can you restore my snippets? They were modified variants of some files, its not so easy to modify them again.

I can try to.

markus2330 commented 7 years ago

I thought about this too, but what do we gain from the views? I think nothing... it was collect-only until now anyway.

Okay, let us reintroduce it when we actually need it for sorting or similar.

I can try to.

Thank you!

One more question: I do not understand the "Action" button in the search interface. Why not simply make the whole lines links? The problem I have with the button is that I cannot press with the middle mouse on it (to open it in a background tab)

Namoshek commented 7 years ago

The button is not a link, there is the issue. It is routed by the internal router and this one actually cannot be changed because quite some data is moved between the states (more than the key which is visible in the URL).

markus2330 commented 7 years ago

I reported the issue about Privacy Badger: https://github.com/EFForg/privacybadger/issues/1103

Namoshek commented 7 years ago

Ok forget about it, we have to remove the git script, it deletes data / prevents saving of data. I could also not restore some of the snippets you imported with the list plugin.

markus2330 commented 7 years ago

Ok forget about it, we have to remove the git script, it deletes data / prevents saving of data.

What do you mean? It is quite unlikely that two people upload/edit snippets at the same time. For all other cases you should avoid doing kdb.set.

I could also not restore some of the snippets you imported with the list plugin.

I did not import something with the list plugin. Do you mean line plugin? What is the issue? You also find older versions of these config files in http://markus-raab.org/Info/Config (you can upload all of them).

Btw. if someone has js disabled: You can argue that it is safe to activate js, because all of the js we use is free software and can be inspected in our repo (including how it is build). And if someone does not want to disable js: you can argue that all information is on github too (but less nice presented and without snippets functionality...).

markus2330 commented 7 years ago

we have to remove the git script

Are you sure that it is executed in the background?

E.g. kdb mount /tmp/test.ini system/shelltest ini array= shell 'execute/set=./script &' Then it should immediately let the other process continue. (The ' are very important)

I uploaded another snippet, for me it works really nicely now! The script, however, was not in the repo afterwards?

Namoshek commented 7 years ago

kdb mount /var/lib/jenkins/snippets/snippets.dump system/configs dump shell 'execute/set=kdb update-snippet-repository &' was the used command. I changed the mountpoint (as I said), because it - for whatever reason - deleted stuff. I had it twice that it deleted something from the database while I updated other snippets, which did not happen anymore after I removed the script. Don't ask me why, it doesn't make sense to me either, but yeah.

Do you mean line plugin?

Sorry, ofc I meant the line plugin.

markus2330 commented 7 years ago

Do you mean it removed other snippets or that it prevented something from being committed?

Btw. we could also log into the snippet repo, that might be useful.

Namoshek commented 7 years ago

Ok, maybe something else is broken. It again removed meta data of several snippets with a restart of the backend. :sob:

markus2330 commented 7 years ago

Dont worry, we will find the issue. Btw. finish the thesis first ;)

Namoshek commented 7 years ago

:man_facepalming:

ks.append (entry);
ks.append (entry.getSubkeys ());

and the subkeys (aka snippet) can contain the root key (aka entry) as well, which overrides the entry + meta keys... arbitrary plugin behavior ftw.

Namoshek commented 7 years ago

Btw. it seems that some augeas lenses can indeed import stuff, but cannot export the same stuff again (e.g. tried it with the apache2 configuration and the Httpd lens). So I think this lenses are of no value for us and we should disable them to improve performance. What do you think?

Btw. I already tried on my dev VM if this behavior changes if I add the root key of the snippets to the keyset that is used during export, but it didn't change anything.

1) system/configs/this/is/an/entry   <-- root key
2) system/configs/this/is/an/entry/setting1
3) system/configs/this/is/an/entry/setting2
4) system/configs/this/is/an/entry/settings/s1
5) system/configs/this/is/an/entry/settings/s2

(neither export with 2-5, nor with 1-5 works)

markus2330 commented 7 years ago

For me hosts works really nicely: https://www.libelektra.org/entries/details/augeas~2Fhosts~2Fv1~2Flocalhost and I think it is really informative what the differences of abstractions between augeas and otherwise written parsers can be.

But yes those who definitely do not work, please disable them. But please report it to #1215 (so that @fberlakovich knows the issues) or, for non-augeas plugins to a separate issue. We have to investigate where the problem is and always should try to keep all plugins running on the website.

Namoshek commented 7 years ago

Yes, hosts works fine, but some others unfortunately not. I'll start a list of plugins + checks which we can then use to file a new issue.

markus2330 commented 7 years ago

Thank you for all the fixes! I will close this issue (consider it as fixed) #1228 are new ideas how we could continue and the leftovers from here.