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 issues of policies #838

Closed
6 tasks done
flavio opened this issue Aug 9, 2024 · 3 comments
Closed
6 tasks done

Fix CI issues of policies #838

flavio opened this issue Aug 9, 2024 · 3 comments

Comments

@flavio flavio added this to Kubewarden Aug 9, 2024
@flavio flavio converted this from a draft issue Aug 9, 2024
@flavio flavio added this to the 1.16 milestone Aug 9, 2024
@viccuad viccuad self-assigned this Aug 22, 2024
@viccuad viccuad moved this from Todo to In Progress in Kubewarden Aug 22, 2024
@viccuad
Copy link
Member

viccuad commented Aug 23, 2024

There's several issues:

  1. Policies being updated to go 1.23 toolchain, which must be built with tinygo >= 0.33.0.

  2. From kwctl 1.13 to 1.14, we changed behaviour, and now kwctl doesn't print a json by default:

    $ kwctl-1.14 run annotated-policy.wasm -r test_data/ingress.json --settings-json '{"denied_labels": ["foo", "cc-center"], "constrained_labels": {"cc-center": "^cc-\\d+$"}}'
    libunwind: __unw_add_dynamic_fde: bad fde: FDE is really a CIE
    Error: Error running policy file:///home/vic/suse/kw/policies/safe-labels-policy/annotated-policy.wasm: Provided settings are not valid: "Provided settings are not valid: These labels cannot be constrained and denied at the same time: cc-center"
    $ kwctl-1.13 run annotated-policy.wasm -r test_data/ingress.json --settings-json '{"denied_labels": ["foo", "cc-center"], "constrained_labels": {"cc-center": "^cc-\\d+$"}}'
    libunwind: __unw_add_dynamic_fde: bad fde: FDE is really a CIE
    {"valid":false,"message":"Provided settings are not valid: These labels cannot be constrained and denied at the same time: cc-center"}
    Error: Provided settings are not valid: Some("Provided settings are not valid: These labels cannot be constrained and denied at the same time: cc-center")

    List: https://github.com/search?q=org%3Akubewarden%20.*valid.*false&type=code

  3. Possible Sigstore change and/or error (at least on my machine)

    Error: Failed to fetch https://tuf-repo-cdn.sigstore.dev/6.root.json: Transport 'other' error fetching 'https://tuf-repo-cdn.sigstore.dev/6.root.json': The HTTP client could not be built: builder error
    
      Caused by:
          0: Transport 'other' error fetching 'https://tuf-repo-cdn.sigstore.dev/6.root.json': The HTTP client could not be built: builder error
          1: The HTTP client could not be built: builder error
          2: builder error
          3: Permission denied (os error 13)

@viccuad
Copy link
Member

viccuad commented Aug 26, 2024

Number 2 is caused by a correct removal of a printf that was priting to stdout a json with the result of the settings validation. The correct solution is to amend the tests on the policies.

I haven't found the culprit for number 3.

@viccuad
Copy link
Member

viccuad commented Aug 26, 2024

I have opened #853 for number 1, number 2 is done and with this the listed repos have green CI, and I will have an eye on number 3.

Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants