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

Use dynamic branch triggers #1016

Merged
merged 7 commits into from
Feb 17, 2025

Conversation

pawiecz
Copy link
Contributor

@pawiecz pawiecz commented Feb 14, 2025

This patch series adds support for dynamically updated branch names in the Pipeline config. It's required for NIPA system integration.

Please see also the details descriptions in specific patches.

This patch slightly modifies existing patch URL validator. This function
will be later moved to other Pipeline package and reused for triggering
Maestro events based on dynamic kernel tree branches' names.

Modified URL validator uses HEAD request instead of GET to just check
resource availability - its content won't be used in the validation
funtion so there's no need to download it.

Signed-off-by: Paweł Wieczorek <pawiecz@collabora.com>
Copy link
Member

@nuclearcat nuclearcat left a comment

Choose a reason for hiding this comment

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

LGTM!

@padovan
Copy link
Contributor

padovan commented Feb 14, 2025

It looks like this does the job. I guess we try it in staging?

This patch extracts function from "lava_callback" to keep it in a more
generic package. In future it might be moved to e.g. "helpers" one but
for now base Service will do.

Signed-off-by: Paweł Wieczorek <pawiecz@collabora.com>
@pawiecz pawiecz force-pushed the use-dynamic-branch-triggers branch from 164d9c1 to 7ba3900 Compare February 14, 2025 15:08
NIPA [0] system doesn't use static branch names that could be added to
the Pipeline config. This patch adds support to use an URL of a resource
that contains dynamically updated branch names which will trigger
Maestro events.

This patch doesn't affect static Pipeline configuration.

[0] https://github.com/linux-netdev/nipa

Signed-off-by: Paweł Wieczorek <pawiecz@collabora.com>
…anches

Signed-off-by: Paweł Wieczorek <pawiecz@collabora.com>
Signed-off-by: Paweł Wieczorek <pawiecz@collabora.com>
@pawiecz pawiecz force-pushed the use-dynamic-branch-triggers branch from 7ba3900 to 6de88fc Compare February 14, 2025 15:17
Tarball service searches through the build configs for exact matches of
tree and branch combinations. It won't find any on dynamically defined
branches from external resource.

This patch allows overriding branch from build config using value from
event that triggered Tarball service.

This change should be considered as a tech debt and replaced with a
long-term solution.

Signed-off-by: Paweł Wieczorek <pawiecz@collabora.com>
@pawiecz pawiecz force-pushed the use-dynamic-branch-triggers branch from 1bd86ff to 60fc952 Compare February 14, 2025 16:14
Function "find_tree" verifies tree existence in the Pipeline config but
branch for "/checkout" request is taken from user's input.

This patch uses less strict check to allow checkouts from branches
absent in the static Pipeline config.

Signed-off-by: Paweł Wieczorek <pawiecz@collabora.com>
@pawiecz pawiecz force-pushed the use-dynamic-branch-triggers branch from 60fc952 to 99d78cb Compare February 14, 2025 16:16
@pawiecz
Copy link
Contributor Author

pawiecz commented Feb 14, 2025

Two patches added after initial review allow triggering custom checkouts using Pipeline API /checkout endpoint:

./tools/kci-maintainer --checkout -u https://github.com/linux-netdev/testing.git -b net-next-2025-02-14--15-00 --latest-commit -f kbuild-gcc-12-x86 -f baseline-x86

kci-dev uses the same endpoint so it should work fine as well

@nuclearcat nuclearcat added this pull request to the merge queue Feb 17, 2025
Merged via the queue into kernelci:main with commit 1d08975 Feb 17, 2025
3 checks passed
@pawiecz pawiecz deleted the use-dynamic-branch-triggers branch February 26, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants