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

Circle CI build job for ARM64 #1997

Merged
merged 3 commits into from
Jun 9, 2022
Merged

Conversation

odidev
Copy link
Contributor

@odidev odidev commented May 10, 2022

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area build

What this PR does / why we need it:
Added Circle CI job to build Falco for ARM64 platform.

Which issue(s) this PR fixes:

Fixes #1891

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@poiana
Copy link
Contributor

poiana commented May 10, 2022

Welcome @odidev! It looks like this is your first PR to falcosecurity/falco 🎉

machine:
enabled: true
image: ubuntu-2004:202101-01
resource-class: arm.medium
Copy link
Contributor

@FedeDP FedeDP May 10, 2022

Choose a reason for hiding this comment

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

This should be resource_class, note the underscore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified.

@@ -357,11 +381,13 @@ jobs:
command: |
FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//')
/source/falco/scripts/publish-rpm -f /build/release/falco-${FALCO_VERSION}-x86_64.rpm -r rpm-dev
/source/falco/scripts/publish-rpm -f /build/release/falco-${FALCO_VERSION}-aarch64.rpm -r rpm-dev
Copy link
Contributor

Choose a reason for hiding this comment

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

The same lines must be added also to publish/packages and publish/packages-deb job, again except for the bin static one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for suggestion, added the same.

@FedeDP
Copy link
Contributor

FedeDP commented May 10, 2022

So, we surely need to port publish-deb script.
As you can see, publish-bin already takes architecture as argument. I think we must do the same with publish-deb:
basically, on this line: https://github.com/falcosecurity/falco/blob/master/scripts/publish-deb#L41 you must check the external argument provided instead of declaring a local variable.

publish-rpm does not seem to reference x86_64 or any uname variable, therefore i guess we shouldn't touch it.

I will need someone else to review the workflow too :) It seems fine to me:

Build and test workflow

  • we have the build-arm64 job that builds and stores artifacts for arm64
  • build-arm64 is required by rpm-sign that is itself required by publish/packages-dev
  • build-arm64 is also required by publish/packages-deb-dev
[ build-arm64 ]  -> [ rpm-sign ] -> [ publish/packages-dev ]
                 |----------------> [ publish/packages-deb-dev ]

Release workflow

  • we have the build-arm64 job that builds and stores artifacts for arm64
  • build-arm64 is required by rpm-sign that is itself required by publish/packages
  • build-arm64 is also required by publish/packages-deb
[ build-arm64 ]  -> [ rpm-sign ] -> [ publish/packages ]
                 |----------------> [ publish/packages-deb ]

EDIT: i also left a couple of comments that need to be addressed :)
Thanks btw!!

@FedeDP FedeDP mentioned this pull request May 10, 2022
53 tasks
@FedeDP
Copy link
Contributor

FedeDP commented May 10, 2022

To maintainers: note that the build-arm64 job will never work unless the falcosecturity/falco-builder:latest image is available for arm64; that's part of #1990!

@odidev odidev force-pushed the arm-build branch 2 times, most recently from 035947b to 42f08d4 Compare May 11, 2022 09:23
@FedeDP
Copy link
Contributor

FedeDP commented May 11, 2022

@odidev it seems like the new v2.1 workflows version is breaking the build:

 # [#/jobs/driver-loader~1integration] string [driver-loader/integration] does not match pattern ^[A-Za-z][A-Za-z\\s\\d_-]*$

Can you revert to 2?

Moreover, can you set "Fixes #1891" in the OP?

@FedeDP
Copy link
Contributor

FedeDP commented May 12, 2022

Given that this PR depends upon #1990 , if you wish i can take over the publish scripts part; then you will need to rebase this one, once my PR is reviewed and eventually merged.
WDYT?

@odidev
Copy link
Contributor Author

odidev commented May 12, 2022

Can you revert to 2?

Usage of arm resources makes it mandatory to use workflow 2.1 . I checked out the error its nothing major, changing the name of the job should do the trick, I think it would better to mark this as WIP as it still might need some more modifications based on version 2.1 which can be figured only when we are able to run it. We can focus on releasing docker images and binary for arm64 for now.

Moreover, can you set "Fixes #1891" in the OP?

The issue is for getting testing enabled for arm64, currently we are skipping it. Once we are able to add it too we can probably close it.

Given that this PR depends upon #1990 , if you wish i can take over the publish scripts part; then you will need to rebase this one, once my PR is reviewed and eventually merged.
WDYT?

Sure thing.

@FedeDP
Copy link
Contributor

FedeDP commented May 12, 2022

The issue is for getting testing enabled for arm64

Mmh aren't we actually testing it? https://github.com/falcosecurity/falco/pull/1997/files#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R14

Usage of arm resources makes it mandatory to use workflow 2.1

Oh i see thanks! Yeah renaming the job should do the trick; i think you can proceed with that!

@FedeDP
Copy link
Contributor

FedeDP commented May 13, 2022

@odidev i updated #1990 fixing publishing (deb,rpm) scripts.
They must be used like this:

/source/falco/scripts/publish-rpm -f /build/release/falco-${FALCO_VERSION}-x86_64.rpm -f /build/release/falco-${FALCO_VERSION}-aarch64.rpm -r rpm

/source/falco/scripts/publish-deb -f /build/release/falco-${FALCO_VERSION}-x86_64.deb -f /build/release/falco-${FALCO_VERSION}-aarch64.deb -r deb-dev

(notice that passing both packages in a single call is needed!)
Can you update your PR accordingly?
Thanks!

@odidev
Copy link
Contributor Author

odidev commented May 17, 2022

Mmh aren't we actually testing it? https://github.com/falcosecurity/falco/pull/1997/files#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R14

Ah ok updated.

Oh i see thanks! Yeah renaming the job should do the trick; i think you can proceed with that!

I have changed the name of the job and validated configuration file using CircleCI command line tool as well.
Note: I had to change name of all jobs as / was present in the name of jobs which generates error in workflow 2.1 as CircleCI that it is not able to find orb of the name same as letters before the /.

(notice that passing both packages in a single call is needed!)
Can you update your PR accordingly?
Thanks!

I have updated it accordingly.

@FedeDP
Copy link
Contributor

FedeDP commented May 17, 2022

Wow thank you! This PR should be ready once my #1990 is merged!
Thank you for your really hard work!!

@odidev
Copy link
Contributor Author

odidev commented May 24, 2022

Since this PR depends on #1990 , by when can we expect it to get merged?

@FedeDP
Copy link
Contributor

FedeDP commented May 24, 2022

Hi @odidev !
Unfortunately, it was just decided to skip arm64 for the 0.32 release; instead, we are targeting the 0.33; but i've got a certain degree of confidence that we will be able to make a 0.32.1 patch release for it, as it has a huge value for the community.
Unfortunately, we are very near the 0.32 release and testing this will take much time.

/milestone 0.33.0

@leogr
Copy link
Member

leogr commented May 24, 2022

/milestone 0.33.0

@leogr
Copy link
Member

leogr commented Jun 8, 2022

Quick update: we're trying to test the new falcosecurity/falco-builder with this PR. So, sorry if we're spamming you 😅 We hope are close to a fix.

@poiana poiana added the lgtm label Jun 8, 2022
@poiana
Copy link
Contributor

poiana commented Jun 8, 2022

LGTM label has been added.

Git tree hash: d70248bc5e26c4eb8d596668f04f3be003429cef

Copy link
Contributor

@jasondellaluce jasondellaluce left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Jun 8, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jasondellaluce, odidev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana added the approved label Jun 8, 2022
@leogr
Copy link
Member

leogr commented Jun 9, 2022

Closing and reopening to trigger the CI
/close

@poiana poiana closed this Jun 9, 2022
@poiana
Copy link
Contributor

poiana commented Jun 9, 2022

@leogr: Closed this PR.

In response to this:

Closing and reopening to trigger the CI
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@leogr
Copy link
Member

leogr commented Jun 9, 2022

/reopen

@poiana poiana reopened this Jun 9, 2022
@poiana
Copy link
Contributor

poiana commented Jun 9, 2022

@leogr: Reopened this PR.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

leogr added a commit to falcosecurity/test-infra that referenced this pull request Jun 9, 2022
poiana pushed a commit to falcosecurity/test-infra that referenced this pull request Jun 9, 2022
@leogr
Copy link
Member

leogr commented Jun 9, 2022

Closing and reopening to update CI required checks
/close

@poiana poiana closed this Jun 9, 2022
@poiana
Copy link
Contributor

poiana commented Jun 9, 2022

@leogr: Closed this PR.

In response to this:

Closing and reopening to update CI required checks
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@leogr
Copy link
Member

leogr commented Jun 9, 2022

/reopen

@poiana poiana reopened this Jun 9, 2022
@poiana
Copy link
Contributor

poiana commented Jun 9, 2022

@leogr: Reopened this PR.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@poiana poiana merged commit aad70f3 into falcosecurity:master Jun 9, 2022
@jasondellaluce jasondellaluce modified the milestones: 0.33.0, 0.32.1 Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Circle CI: Enable testing for ARM64 platform
5 participants