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

ebuilds for kernel branches are the same package #47

Closed
kuzetsa opened this issue Dec 30, 2017 · 3 comments
Closed

ebuilds for kernel branches are the same package #47

kuzetsa opened this issue Dec 30, 2017 · 3 comments
Assignees
Labels
bug D-Medium A task that takes 4 houts to complete
Projects

Comments

@kuzetsa
Copy link

kuzetsa commented Dec 30, 2017

Pull request should be checked/ build-tested on each branch.

This code grabs a list of packages to test:

https://github.com/gentoo/Gentoo_kernelCI/blob/376010acdd4188debb1f9338d987608a1f4e6636/files/stabilize-packages.py#L10-L13

Then later, the kernel CI bot checks to see that the
most recent commit for each package is working:

https://github.com/gentoo/Gentoo_kernelCI/blob/376010acdd4188debb1f9338d987608a1f4e6636/files/stabilize-packages.py#L29

I believe this part is correct, because it's doing what
it was written to do: perform a build test on each package ...


The head of the branch (the git branch) for a PR is
normally the correct state to test. For a non-kernel PR,
testing the most recent commit in a PR is enough.

hypothetical failure test case / example:

sys-kernel/foo-sources-4.4.131.ebuild {commit #1}
sys-kernel/foo-sources-4.15.2.ebuild {commit #2}

The current state of the kernel CI bot treats these commits
the same package, and performs one test of the package.

both of these are part of sys-kernel/foo-sources package,
but each ebuild is on a different branch, and needs tested.

I don't understand how to change this buildbot code:

https://github.com/gentoo/Gentoo_kernelCI/blob/376010acdd4188debb1f9338d987608a1f4e6636/files/stabilize-packages.py#L10-L13

.

this is not python code:


.
.
pseudocode / algorithm:

branch_list = new object_collection[] // key-value err... python dictionary?
commit_list = this.bot(input_data).commits
for each commit in commit_list
  {
    if !contains_ebuild(commit) then
      continue // no ebuild, check next iteration

    chk_vers = ebuild_getbranch(commit) // which branch is this?
    if branch_list.has_key(chk_vers) then
      branch_list(chk_vers) = commit // not testing obsolete revision anyway (overwrite)
    else
      branch_list(chk_vers) = commit // is this how python adds a NEW key/value pair?
  }

.
Then update the iterator itself to check for branches:

https://github.com/gentoo/Gentoo_kernelCI/blob/376010acdd4188debb1f9338d987608a1f4e6636/files/stabilize-packages.py#L29

should now be something like:

for branch in branch_list: 

At this time, requiring one PR per bumped branch would be a workaround.

I don't write python.

@kuzetsa
Copy link
Author

kuzetsa commented Dec 30, 2017

Test case showing failure (wrong behavior):

gentoo/gentoo#6683

.
The kernel CI buildbot saw both commits, but only tested one:

screenshot:


Imgur

@mjeveritt
Copy link
Collaborator

Yup, this should be fixable. Leave it with me and I'll poke it with @aliceinwire .

@mjeveritt mjeveritt self-assigned this Jul 24, 2018
@aliceinwire aliceinwire added this to In progress in GkernelCI Dec 13, 2018
@aliceinwire aliceinwire added bug D-Medium A task that takes 4 houts to complete labels Dec 19, 2019
@aliceinwire
Copy link
Member

GkernelCI automation moved this from In progress to Done Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug D-Medium A task that takes 4 houts to complete
Projects
GkernelCI
  
Done
Development

No branches or pull requests

3 participants