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

fix(CI): Change latest release CI to containerd runtime #1632

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

PrimalPimmy
Copy link
Member

@PrimalPimmy PrimalPimmy commented Feb 15, 2024

Purpose of PR?:

Fixes #1627 , hopefully

We are changing the runtime of our CI release workflow from docker to containerd.

Does this PR introduce a breaking change?

No

If the changes in this PR are manually verified, list down the scenarios covered::

Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs

Checklist:

  • Bug fix. Fixes #
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Commit has unit tests
  • Commit has integration tests

@PrimalPimmy PrimalPimmy changed the title fix(CI) Change latest release CI to containerd runtime fix(CI): Change latest release CI to containerd runtime Feb 15, 2024
Copy link
Member

@daemon1024 daemon1024 left a comment

Choose a reason for hiding this comment

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

Please verify on your own repo if this works or not. The final push will not happen but atleast the tests can be verified

daemon1024
daemon1024 previously approved these changes Feb 16, 2024
@daemon1024 daemon1024 dismissed their stale review February 16, 2024 12:24

Check better ways, than time.Sleep to fix async issues

@PrimalPimmy PrimalPimmy marked this pull request as draft February 19, 2024 07:44
Copy link
Member

@daemon1024 daemon1024 left a comment

Choose a reason for hiding this comment

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

Let's carefully add the Eventually statement.
We only need the Eventually statement when AppArmor related policy is being applied, not in audit/visibility related tests.

Can we think of a way to refactor this such that it's a function argument true/false.

tests/k8s_env/ksp/ksp_test.go Outdated Show resolved Hide resolved
tests/k8s_env/ksp/ksp_test.go Outdated Show resolved Hide resolved
@PrimalPimmy
Copy link
Member Author

Also I have added eventually to blockposture to test something, it won't be there in the final PR

@daemon1024
Copy link
Member

Also I have added eventually to blockposture to test something, it won't be there in the final PR

I think we can add if we want to all test suites, that can be a different PR too.

@PrimalPimmy PrimalPimmy marked this pull request as ready for review February 19, 2024 16:04
Copy link
Member

@daemon1024 daemon1024 left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Some nitpicks and reundundant code comments

  • Some rendundant time.Sleep needs to be removed ( I have not commented on all of them )
  • Let's move all K8sExecInPod to AssertCommand
  • Some specific comments are inline, do check them out

tests/k8s_env/ksp/ksp_test.go Outdated Show resolved Hide resolved
tests/k8s_env/ksp/ksp_test.go Outdated Show resolved Hide resolved
tests/k8s_env/ksp/ksp_test.go Outdated Show resolved Hide resolved
tests/k8s_env/ksp/ksp_test.go Outdated Show resolved Hide resolved
tests/util/kartutil.go Outdated Show resolved Hide resolved
tests/k8s_env/ksp/ksp_test.go Outdated Show resolved Hide resolved
Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Added another file

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Changes to tags

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

operator tag change

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

tag fixed

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Used sed to replace version in config

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Tag fix

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

chore(test): add sleep to reduce flakiness

apparmor profile take some time to generate. The gingkgo tests try to check the enforcement almost immediately after applying a policy which results in increased flakiness due to the time it takes to activate policies.

Signed-off-by: Barun Acharya <barun1024@gmail.com>

chore(fix) First iteration to add eventually in the CI

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Eventually in block posture added

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Ginkgo verbose for debugging

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Fixes

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Fixes-2

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

net-raw fix

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

AssertCommand

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

AssertCommand

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Improved eventual testing

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Minor fixes

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

Minor fixes-2

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

minor fix

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

another minor fix

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

minor fix

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>

minor fix

Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>
Copy link
Member

@daemon1024 daemon1024 left a comment

Choose a reason for hiding this comment

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

LGTM 👌🏽 Nice Work

May the force be with us and we do not need to fix tests again 🙏🏽 👼🏽

Copy link
Member

@DelusionalOptimist DelusionalOptimist left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@PrimalPimmy PrimalPimmy merged commit 8ceb083 into kubearmor:main Feb 20, 2024
18 checks passed
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.

Rise of flakey tests
3 participants