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

update(CI): mitigate frequent failure in CircleCI jobs #2375

Merged
merged 2 commits into from
Jan 26, 2023

Conversation

Andreagit97
Copy link
Member

@Andreagit97 Andreagit97 commented Jan 25, 2023

What type of PR is this?

/kind cleanup

Any specific area of the project related to this PR?

/area build

What this PR does / why we need it:

This PR performs 2 main actions on the modern-falco-builder to mitigate some issues with the Falco CI:

RUN source scl_source enable devtoolset-9; \
    cmake ${CMAKE_OPTIONS} /source; \
    make falco -j${MAKE_JOBS}; \
    make package; \
    make tests -j${MAKE_JOBS}; \
    make all -j${MAKE_JOBS} 
  • Recently many CI jobs are failing with context timeout exceeding this is because the modern builder container is not able to copy the whole Falco build directory from the container to the CircleCI job's VM. The size of the build directory is almost 6 GB, this huge size causes this context timeout! With this patch, we export only what is really relevant to our integration tests reducing the build directory dimension from 6 GB to 600 MB!

This is not the final solution obviously this is just a workaround to mitigate there frequent CI failures we are facing

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
@poiana poiana added size/M and removed size/XS labels Jan 25, 2023
@Andreagit97 Andreagit97 changed the title update(docker): split the build phase into multiple RUN commands update(CI): mitigate frequent failure in CircleCI jobs Jan 25, 2023
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
@FedeDP
Copy link
Contributor

FedeDP commented Jan 26, 2023

I love this!
I'd target Falco 0.34 since we will surely be biten by this issue during the release IMHO. @LucaGuerra ?
/milestone 0.34.0

@poiana poiana added this to the 0.34.0 milestone Jan 26, 2023
Copy link
Contributor

@FedeDP FedeDP 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 Jan 26, 2023

LGTM label has been added.

Git tree hash: 902a3da8583eec555e74fa3e61d0e71a3f02b8fb

Comment on lines +48 to +62
COPY --from=build-stage /build/release/cloudtrail-plugin-prefix ${DEST_BUILD_DIR}/cloudtrail-plugin-prefix
COPY --from=build-stage /build/release/cloudtrail-rules-prefix ${DEST_BUILD_DIR}/cloudtrail-rules-prefix
COPY --from=build-stage /build/release/falcosecurity-rules-application-prefix ${DEST_BUILD_DIR}/falcosecurity-rules-application-prefix
COPY --from=build-stage /build/release/falcosecurity-rules-falco-prefix ${DEST_BUILD_DIR}/falcosecurity-rules-falco-prefix
COPY --from=build-stage /build/release/falcosecurity-rules-local-prefix ${DEST_BUILD_DIR}/falcosecurity-rules-local-prefix
COPY --from=build-stage /build/release/json-plugin-prefix ${DEST_BUILD_DIR}/json-plugin-prefix
COPY --from=build-stage /build/release/k8saudit-plugin-prefix ${DEST_BUILD_DIR}/k8saudit-plugin-prefix
COPY --from=build-stage /build/release/k8saudit-rules-prefix ${DEST_BUILD_DIR}/k8saudit-rules-prefix
COPY --from=build-stage /build/release/scripts ${DEST_BUILD_DIR}/scripts
COPY --from=build-stage /build/release/test ${DEST_BUILD_DIR}/test
COPY --from=build-stage /build/release/userspace/falco/falco ${DEST_BUILD_DIR}/userspace/falco/falco
COPY --from=build-stage /build/release/userspace/falco/config_falco.h ${DEST_BUILD_DIR}/userspace/falco/config_falco.h
COPY --from=build-stage /build/release/falco-*.tar.gz ${DEST_BUILD_DIR}/
COPY --from=build-stage /build/release/falco-*.deb ${DEST_BUILD_DIR}/
COPY --from=build-stage /build/release/falco-*.rpm ${DEST_BUILD_DIR}/
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit concerned about keeping these in sync with the build process, however, it's acceptable at the moment 👍

@poiana
Copy link
Contributor

poiana commented Jan 26, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, leogr

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 merged commit 229633e into falcosecurity:master Jan 26, 2023
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.

4 participants