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

CI: fix CIS test failures caused by truncated ps output #5011

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

petrutlucian94
Copy link
Contributor

@petrutlucian94 petrutlucian94 commented Apr 4, 2025

The CIS tests are currently failing if we remove some Python
dependency constraints.

The reason is that these tests run a few "ps" commands and receive
truncated output[1].

As a workaround, we'll explicitly set the terminal size using
the COLUMNS env variable.

[1] https://github.com/canonical/microk8s-core-addons/blob/f2716f1d4c0e169762f0bff37d7496f7ac33db62/addons/cis-hardening/cfg/cis-1.24-microk8s/etcd.yaml#L13

@petrutlucian94 petrutlucian94 marked this pull request as draft April 4, 2025 13:00
@petrutlucian94
Copy link
Contributor Author

version diff:

> cachetools==5.5.2
19a21
> durationpy==0.9
20a23,25
> execnet==2.1.1
> fancycompleter==0.9.1
> google-auth==2.38.0
31c36
< jsonschema==3.2.0
---
> jsonschema==4.0.0
32a38
> kubernetes==32.0.1
40c46
< oauthlib==3.2.0
---
> oauthlib==3.2.2
41a48
> pdbpp==0.10.3
53a61
> pylxd==2.3.5
56a65
> pyrepl==0.9.0
59a69
> pytest-xdist==3.6.1
60a71
> python-dateutil==2.9.0.post0
65a77,79
> requests-oauthlib==2.0.0
> requests-toolbelt==1.0.0
> rsa==4.9
80a95,97
> websocket-client==1.8.0
> wmctrl==0.5
> ws4py==0.6.0

@petrutlucian94 petrutlucian94 force-pushed the lpetrut/cis-tests branch 7 times, most recently from bc16227 to 000d987 Compare April 7, 2025 11:12
The CIS tests are currently failing if we remove some Python
dependency constraints.

The reason is that these tests run a few "ps" commands and receive
truncated output[1].

As a workaround, we'll explicitly set the terminal size using
the COLUMNS env variable.

[1] https://github.com/canonical/microk8s-core-addons/blob/f2716f1d4c0e169762f0bff37d7496f7ac33db62/addons/cis-hardening/cfg/cis-1.24-microk8s/etcd.yaml#L13
@petrutlucian94 petrutlucian94 changed the title donotmerge: investigate CIS test failures caused by Python deps Fix CIS test failures caused by truncated ps output Apr 7, 2025
@petrutlucian94 petrutlucian94 marked this pull request as ready for review April 7, 2025 13:29
@petrutlucian94 petrutlucian94 force-pushed the lpetrut/cis-tests branch 4 times, most recently from 2f6e048 to 36ad811 Compare April 8, 2025 07:27
@petrutlucian94 petrutlucian94 changed the title Fix CIS test failures caused by truncated ps output fix: CIS test failures caused by truncated ps output Apr 8, 2025
@petrutlucian94 petrutlucian94 changed the title fix: CIS test failures caused by truncated ps output CI: fix CIS test failures caused by truncated ps output Apr 8, 2025
Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

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

Nice find! Do you have a dry-run in Jenkins to link?

@petrutlucian94
Copy link
Contributor Author

Nice find! Do you have a dry-run in Jenkins to link?

I didn't try the Jenkins job, it was occurring in GH actions.

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.

2 participants