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
Fix SLE11-SP4 Incidents #17196
Fix SLE11-SP4 Incidents #17196
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
lib/qam.pm
Outdated
my ($url, $name) = @_; | ||
my $gpg = get_var('BUILD') =~ m/^MR:/ ? "-G" : ""; | ||
my $system_repos = script_output('zypper lr -u'); | ||
unless ($system_repos =~ /$url/) { |
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 think this regex check could easily break due to unescaped special characters in $url
. It'd be safer to call $repolist = zypper_repos('-u')
and then grep { $_->{uri} eq $url } @$repolist
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.
Done, I don't know, but I don't think there should be any special characters in this urls, but now we will never find out. 😉
lib/qam.pm
Outdated
add_repo_if_not_present("http://dist.suse.de/ibs/SUSE/Updates/SLE-Product-SLES/15-SP3-ERICSSON/$arch/update/", '15-SP3-ERICSSON-Updates'); | ||
} | ||
elsif (is_sle('=15-SP4')) { | ||
add_repo_if_not_present("http://dist.suse.de/ibs/SUSE/Updates/SLE-Product-SLES/15-SP4-ERICSSON/$arch/update/", '15-SP4-ERICSSON-Updates'); |
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.
When there are so many repos, it'd be cleaner to define an array and loop over it:
my @repo_list = (
{cond => '=12-SP2', name => '12-SP2-LTSS-ERICSSON-Updates', uri => '...'},
{...}
);
for my $repo in (@repo_list) {
add_repo_if_not_present($repo->{uri}, $repo->{name}) if is_sle($repo->{cond});
}
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 had feeling to make it better, this is great. Thank you
} | ||
|
||
# https://progress.opensuse.org/issues/90522 | ||
sub add_extra_customer_repositories { |
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 thought this already existed 🧠 ... deja vu!
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.
No, only add_test_repositories for updates, but this is "extension" for the extra repos. :)
waiting on @mdoucha's comments |
0186e85
to
fb37c20
Compare
It was on multiple places and repeating check if the repo is not added already. Also add ERICSSON SLE15 SP3 & SP4 repos.
Code looks good but please add one more verification run. |
https://dzedro.suse.cz/tests/1379#step/patch_and_reboot/19 |
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.
LGTM
https://openqa.suse.de/tests/overview?distri=sle&version=11-SP4&build=%3Atest%3A29128&groupid=485
https://openqa.suse.de/tests/overview?distri=sle&version=11-SP4&build=%3Atest%3A29130&groupid=485
https://dzedro.suse.cz/tests/1358#step/patch_and_reboot/19
https://dzedro.suse.cz/tests/1343 kernel_update 29128
https://dzedro.suse.cz/tests/1342 kernel_update 29130