Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
src/patchset.py: Implement Patchset service #342
src/patchset.py: Implement Patchset service #342
Changes from all commits
0f096bc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Okay, now I understand why you are finding all the running nodes on every event.
According to the state machine and design,
checkout
node should only have children after its state changes toavailable
.Instead of manually creating
checkout
andpatchset
nodes, we can listen toavailable checkout
node events in the patchset service and create a node automatically from the service itself.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.
So, for every
patchset
node I should create a newcheckout
node and wait for it to becomeavailable
? It will pause the queue for quite some time and seems to be quite inefficient.However it gave me another idea. Ideally I want to apply patchset to whatever latest commit is available on a tree. Is it possible to query latest available checkout node?
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.
Yes, that's what I am suggesting. You can listen to available checkout nodes and create patchset nodes from the service directly.
See, for instance, you can use the below filter here to get available checkout node events:
Then you can get
checkout
node from the event just like https://github.com/kernelci/kernelci-pipeline/blob/main/src/tarball.py#L130 and then you can createpatchset
node from it.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.
So it should be done outside of
patchset
service, right? In an another service that will preparecheckout
node and then pass it topatchset
?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.
So I think the greatest challenge with checkout nodes so is picking the right one. I'm not sure how to determine an appropriate version to apply a patch and then correctly query a right node. If we have checkouts for
6.4
,6.8
etc how to pick the right version. Maybe we should pick the latest stable andnext
branch and create two patchset nodes based on them.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.
The pipeline service
trigger
is already creating checkout nodes whenever a new commit is detected for a particular kernel revision. As I have not been involved in the patchset-related discussions, I am not aware of all the requirements, but do you think you can usecheckout
nodes created by thetrigger
service?Once the trigger service creates a
checkout
node, thetarball
service will create and push a tarball and change the node's status toavailable
. Then you can use the below filter in thepatchset
service and create a patchset node from it: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.
As we discussed with @gctucker in kernelci-pipeline#295,
patchset
service only processed patchset nodes created by another service (patchwork<>kernelci connector). So patchset service should tream these nodes as created on-demand and process them accordingly.I am open to suggestions on how to link existing checkout nodes and freshly created patchset node. I think it's a topic for a larger discussion on how we want to test kernel patches in general.
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.
@JenySadadia @yurinnick I agree it will be an important next step to find the best way to connect
patchset
nodes withcheckout
ones created by thetrigger
service. Let keep the scope of this PR to just processingpatchset
nodes created by on-demand - with an assumption for an already existing parent checkout node (like in the verification steps posted in this PR).I created #490 to track this task. @JenySadadia Please let me know if there something else that should be done before starting integration of this service.
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 we should merge this PR now and improvements can be discussed as follow-ups.