-
Notifications
You must be signed in to change notification settings - Fork 205
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 scheduling a (example) product via the web UI #5933
base: master
Are you sure you want to change the base?
Conversation
So the test won't fail if we would add other links (e.g. in the navbar). Related ticket: https://progress.opensuse.org/issues/166658
overall this looks quite good. I was thinking of alternatives where to place the action but your proposal so far looks like the best to me. Just with the "+" I was thinking of a bigger button, possibly blue, with a frame around to distinguish clearly from the caret I mean https://fontawesome.com/icons/square-plus?f=classic&s=regular |
I'm pondering about configurability. Reading the structure that has currently the FIXME comment from EDIT: I guess I'll go for |
6fdab55
to
3ba945a
Compare
I now made it configurable. So in this screenshot I overrode the title by putting a This screenshot also shows that it is now also possible to add additional settings. I think this is important if we want to offer this as a generic form (and the implementation is also quite simple). This leaves tests and the possibility to clone the example distribution automatically (for the scenario definitions). |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5933 +/- ##
==========================================
+ Coverage 98.73% 98.74% +0.01%
==========================================
Files 395 396 +1
Lines 38764 38870 +106
==========================================
+ Hits 38275 38384 +109
+ Misses 489 486 -3 ☔ View full report in Codecov by Sentry. |
Config::IniFiles allows groups. You separate the group from the section with a space. |
3ba945a
to
ac5e408
Compare
I now changed it to use e.g. |
ac5e408
to
17d8212
Compare
Is this obsolete? As this is not a draft anymore 😉 |
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.
Looks really nice. Especially with the help texts. And I appreciate your making it extensible in the future.
I crossed out the obsolete part. Considering there's remaining work to do I'm still considering this as not ready. We don't want to show a new option prominently that'll not work out of the box. |
return undef unless my $ini_config = $config->{ini_config}; | ||
my $ini_key = "test_preset $preset_key"; | ||
return $presets{$preset_key} | ||
= $ini_config->SectionExists($ini_key) |
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 still don't like that we are creating some extra code for this specific feature to handle nested data, while we could do this in a more generic way in Setup.pm with the group feature.
Also it moves any validation we might want to do to runtime instead of server startup.
Since it's something internal we can probably change the implementation later, but just saying.
Not sure what others think.
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 tried to keep it simple but chose the section name so the group feature can be used in the future for more generic parsing. So if we needed to parse this in a more generic way at some point it'll be possible without a breaking change to the config file format.
Consider a feature switch which should be off by default until we stabilized the feature |
I now implemented cloning the example test distribution. So when the user enters the page and the repo hasn't been cloned yet it says "You have to clone the example test distribution first." where the bold part is a link, When clicking on the link one gets a loading indication and after a few seconds (it really doesn't take long to checkout the example distribution) the form reloads with all values filled in. (And in any error case the error is shown and one can retry.) This didn't require adding much code because we already have Minion tasks for cloning from Git now. |
1fd66cc
to
a15b42c
Compare
Btw, we have to be careful to not do this on o3 or osd until fetchneedles is replaced. The example distri has a default branch |
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.
Some inline comments.
And have you considered #5933 (comment) ?
I only read that comment after I implemented the most recent changes I pushed to this PR yesterday. I don't think it is useful to merge this feature without enabling it by default because it is about the out of the box experience. |
a15b42c
to
3af5894
Compare
I know but do you trust it enough to be enabled on all production instances? After all the primary goal was to show that easy starting point on clean jobless instances |
I guess we are not clear on what we want here afterall
The feature itself I'd generally consider stable. It has full test coverage. The checkout of the example distribution relies on the Git cloning we implemented a while ago and I don't think it is generally problematic. I suppose the only problem is fetchneedles cannot handle the use of |
I added another commit to avoid problems with |
3e20b94
to
571eacc
Compare
* Avoid running into an error when a Git repository like our example distribution that does not use the `master` branch anymore is present * Avoid hard-coding the default branch name for test and needle repositories * Use `git rev-parse --abbrev-ref refs/remotes/origin/HEAD` instead which works with all test and needle repositories we have in our two production instances (after I created `.git/refs/remotes/origin/HEAD` in the SLE needles checkout; see added comment for details) * Keep the possibility to specify `branch` and `needles_branch` in case one wants to fetch a special branch * Tested locally with repos using master and main including the code branch for repairing the needle repos * See https://progress.opensuse.org/issues/166658
571eacc
to
1a61ffb
Compare
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.
Looks very nice now. Fix the code style issues and I am sure I can approve.
@@ -1 +0,0 @@ | |||
../../etc/openqa/openqa.ini |
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.
why?
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.
Because I had to add config values for testing instead of just testing with the default config. (We want to cover the part of the code that allows the users/admins to override values so we obviously need to supply this kind of configuration when running the test.)
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.
Looks very nice now. Fix the code style issues and I am sure I can approve.
Related ticket: https://progress.opensuse.org/issues/166658
Still a draft because I need to add UI tests and move the so far hard-coded data intoOf course this only works if there's a checkout of the example distribution. Maybe we should offer the user to create that checkout in case it is missing (which wouldn't be very hard to do; we'd just add a link on the web UI that'll internally spawn a checkout Minion job we recently implemented anyway).openqa.ini
. It already reads scenario definitions and certain parameters directly from the example distribution, though.This is how the menu, the form and success/error messages look like in one screenshot: