Skip to content

Disable git_clone minion jobs #237

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/install/openqa_webui.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ sub install_from_pkgs {
assert_script_run 'systemctl enable apache2';
assert_script_run 'systemctl restart apache2';
}
if (get_var('FULL_OPENSUSE_TEST')) {
# avoid second git fetch after fetchneedles
assert_script_run q{if [ -e /etc/openqa/openqa.ini ]; then sed -i -e 's/#\[scm git\]/[scm git]\ngit_auto_clone = no\ngit_auto_update = no/' /etc/openqa/openqa.ini; else echo -e "[scm git]\ngit_auto_clone = no\ngit_auto_update = no" > /etc/openqa/openqa.ini.d/git.ini; fi};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can just assume that /etc/openqa/openqa.ini.d is supported.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this in the install_from_pkgs. I just wonder if this is the best place to inject this. Following the logic from run, I wouldnt expect this hidden here maybe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this in the install_from_pkgs.

That's the only place where we edit openqa.ini currently. Directly below this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can just assume that /etc/openqa/openqa.ini.d is supported.

I just used the same as below, so I'd say it would just look weird if we still have that logic below but not in the code I introduce.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont want to be destructive but I think it make sense to take those openqa.ini out of that function, wrap them into another with a corresponding name and add it in the run function. it will look more clear and will keep the functions clean. wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why you're all complaining about this line but did not complain about line 43 below

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because line 43 was introduced when the new config parsing was just introduced so it had to support the old and new behavior. However, I don't think this is required anymore so always creating a drop-in config file should be enough.

}
assert_script_run($_) foreach (split /\n/, <<~'EOF');
if [ -e /etc/openqa/openqa.ini ]; then sed -i -e 's/#.*method.*OpenID.*$/&\nmethod = Fake/' /etc/openqa/openqa.ini; else echo -e "[auth]\nmethod = Fake" > /etc/openqa/openqa.ini.d/auth.ini; fi
systemctl enable --now openqa-webui
Expand Down
4 changes: 2 additions & 2 deletions tests/osautoinst/test_running.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use utils;
sub run ($self) {
my $api_query = get_var('FULL_MM_TEST') ? 'test=ping_client' : 'state=running state=done';
my $success = get_var('FULL_MM_TEST') ? 'passed' : 'passed\|running';
assert_script_run qq{retry -s 15 -r 120 -- sh -c '
assert_script_run qq{retry -s 15 -r 60 -- sh -c '
r=`openqa-cli api jobs $api_query | tee /dev/fd/2 |
jq -r ".jobs | max_by(.id) | if .result != \\"none\\" then .result else .state end"`;
echo \$r | grep -q "incomplete\\|failed" && killall retry;
echo \$r | grep -q "$success"'}, timeout => 1830;
echo \$r | grep -q "$success"'}, timeout => 930;
if (get_var('FULL_MM_TEST')) {
# we can't upload logs if the multimachine OVS bridge in the SUT has the same IP as the openQA-worker host
script_run 'ip a del 10.0.2.2/15 dev br1'; # This may fail in case this IP is not actually set on the bridge
Expand Down