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

Allow anonymous read access to operator tables #1220

Merged
merged 2 commits into from Mar 17, 2017

Conversation

Martchus
Copy link
Contributor

@Martchus Martchus commented Feb 8, 2017

See https://progress.opensuse.org/issues/13858

Concerning tables

  • Medium types
  • Machines
  • Test suites
  • Job groups and job templates
  • Scheduled products

@Martchus
Copy link
Contributor Author

I will move the menu entries back to the user menu as discussed with oliver. I also need to find out why the full stack test fails.

@Martchus
Copy link
Contributor Author

Also here it makes only sense to continue fixing the tests when it is decided where the menu entries should go.

@codecov
Copy link

codecov bot commented Feb 17, 2017

Codecov Report

Merging #1220 into master will increase coverage by 10.12%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           master    #1220       +/-   ##
===========================================
+ Coverage   76.59%   86.71%   +10.12%     
===========================================
  Files         103      103               
  Lines        7160     7161        +1     
===========================================
+ Hits         5484     6210      +726     
+ Misses       1676      951      -725
Impacted Files Coverage Δ
lib/OpenQA/WebAPI.pm 93.79% <100%> (+4.17%)
lib/OpenQA/Schema/Result/Jobs.pm 94.79% <0%> (+0.32%)
lib/OpenQA/BuildResults.pm 95.72% <0%> (+0.85%)
lib/OpenQA/Schema/Result/JobModules.pm 90.1% <0%> (+1.64%)
lib/OpenQA/WebAPI/Controller/API/V1/Job.pm 83.12% <0%> (+1.68%)
lib/OpenQA/Schema/ResultSet/Jobs.pm 95.81% <0%> (+2.09%)
lib/OpenQA/WebAPI/Controller/Main.pm 100% <0%> (+2.38%)
lib/OpenQA/WebAPI/Controller/API/V1.pm 100% <0%> (+2.81%)
lib/OpenQA/Schema/Result/Users.pm 100% <0%> (+4.34%)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2985445...8a2ccb0. Read the comment docs.

@Martchus
Copy link
Contributor Author

So this is now in the user menu as oliver likes it. Previous version with extra menu is still on https://github.com/Martchus/openQA/tree/read_access_extra_menu branch, just in case.

@Martchus
Copy link
Contributor Author

Martchus commented Mar 6, 2017

The admin test doesn't fail on my workstation with Perl 5.24.0 but on Travis:

[12:45:46] ./t/ui/13-admin.t ................... 11/? Use of ?PATTERN? without explicit operator is deprecated at template
admin/job_template/index.html.ep line 6 (#1)
(D deprecated) You have written something like ?\w?, for a regular
expression that matches only once. Starting this term directly with
the question mark delimiter is now deprecated, so that the question mark
will be available for use in new operators in the future. Write m?\w?
instead, explicitly using the m operator: the question mark delimiter
still invokes match-once behaviour.

I tried using brackets and regular if in templates/admin/job_template/index.html.ep as workaround but it didn't work.

@Martchus Martchus changed the title Allow annonymous read access to operator tables Allow anonymous read access to operator tables Mar 6, 2017
@Martchus Martchus force-pushed the read_access branch 2 times, most recently from 82dc6ca to f236722 Compare March 10, 2017 12:24
@Martchus
Copy link
Contributor Author

I added a workaround for the failing test so I runs now with older Perl, too.

@okurz
Copy link
Member

okurz commented Mar 13, 2017

the test coverage decrease seems to be valid, check
https://codecov.io/gh/os-autoinst/openQA/compare/56121a418ca82cb7dbdfd2c79433364392489a0f...f2367227b132778e751eb3be08630989a2634e50/src/lib/OpenQA/WebAPI/Controller/API/V1.pm

Maybe your rework has now left behind error handling which is not true anymore?

@Martchus
Copy link
Contributor Author

Fix for coverage decrease seems to work.

@Martchus Martchus force-pushed the read_access branch 2 times, most recently from 39999db to f8b33f9 Compare March 14, 2017 15:10
@okurz
Copy link
Member

okurz commented Mar 14, 2017

@Martchus please check checks again

@Martchus
Copy link
Contributor Author

Doesn't look related. When I wrote the last comment all checks were successful. I just changed amended again to fix some strings.

See https://progress.opensuse.org/issues/13858

Concerning tables
* Medium types
* Machines
* Test suites
* Job groups and job templates
* Scheduled products
Test runs fine with Perl 5.24.0 but fails with
Perl 5.18.2. Hence this workaround is required.
@Martchus
Copy link
Contributor Author

Rebased again and all checks pass again. So the last failure was indeed unrelated.

@coolo coolo merged commit 1c196ff into os-autoinst:master Mar 17, 2017
coolo pushed a commit that referenced this pull request Mar 17, 2017
commit 1c196ff
Merge: 38959c2 8a2ccb0
Author:     Stephan Kulow <coolo@kde.org>
AuthorDate: Fri Mar 17 17:23:57 2017 +0100
Commit:     GitHub <noreply@github.com>
CommitDate: Fri Mar 17 17:23:57 2017 +0100

    Merge pull request #1220 from Martchus/read_access

    Allow anonymous read access to operator tables
@Martchus Martchus deleted the read_access branch March 17, 2017 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants