canonical / bundle-kubeflow

Charmed Kubeflow
Apache License 2.0
101 stars 48 forks source link

Scanning scripts are not working for 1.9 #1032

Closed kimwnasptd closed 1 week ago

kimwnasptd commented 3 weeks ago

Bug Description

Right now the action for scanning 1.9 is failing.

Currently the main reason is that an incorrect path is getting used, introduced by https://github.com/canonical/bundle-kubeflow/pull/1027. But we observed follow-up issues with the scanning like https://github.com/canonical/knative-operators/issues/219.

The current list of bugs that need to be resolved around the scanning are:

You can see an initially failing scan (because of incorrect path) in https://github.com/canonical/bundle-kubeflow/actions/runs/10500366253/job/29088636529

To Reproduce

Check the Actions tab

Environment

current state of the repo as of 22 August 2024

Relevant Log Output

> Run BUNDLE="releases/1.9/stable/kubeflow"
Error: open releases/1.9/stable/kubeflow/bundle.yaml: no such file or directory
Error: open releases/1.9/stable/kubeflow/bundle.yaml: no such file or directory
Image list:

...
Traceback (most recent call last):
  File "./kubeflow-ci/scripts/images/get-summary.py", line 148, in <module>
    main(args.report_path, args.print_header)
  File "./kubeflow-ci/scripts/images/get-summary.py", line 79, in main
    file_list = get_reports_files_list(report_path)
  File "./kubeflow-ci/scripts/images/get-summary.py", line 33, in get_reports_files_list
    raise ValueError(f"Failed to retrieve list of files for {report_path}")
ValueError: Failed to retrieve list of files for ./trivy-reports

Additional Context

No response

syncronize-issues-to-jira[bot] commented 3 weeks ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-6142.

This message was autogenerated

kimwnasptd commented 3 weeks ago

Then, while not directly related to ensuring the action is working, we also need to fix Knative image gathering logic to include rocks https://github.com/canonical/knative-operators/issues/220

kimwnasptd commented 3 weeks ago

After resolving https://github.com/canonical/knative-operators/issues/219 the next error we see is the following (after setting set -xe):

+ git clone --branch main https://github.com/canonical/kubeflow-roles-operator
Cloning into 'kubeflow-roles-operator'...
remote: Enumerating objects: 502, done.
remote: Counting objects: 100% (226/226), done.
remote: Compressing objects: 100% (114/114), done.
remote: Total 502 (delta 146), reused 152 (delta 112), pack-reused 276 (from 1)
Receiving objects: 100% (502/502), 120.49 KiB | 1.15 MiB/s, done.
Resolving deltas: 100% (262/262), done.
+ cd kubeflow-roles-operator
+ IMAGES+=($(bash ./tools/get-images.sh))
++ bash ./tools/get-images.sh
bash: ./tools/get-images.sh: No such file or directory

This is because the kubelflow-roles-operator does not include any OCI images. There are 2 approaches here:

  1. Add an empty tools/get-images.sh executable in that repo
  2. Have a check in our script and don't run image gathering for that repo
kimwnasptd commented 2 weeks ago

I resolved the above issue in the PR that refactors the code to use python scripts https://github.com/canonical/bundle-kubeflow/issues/1036

The script will ignore the roles that don't have images in them

kimwnasptd commented 1 week ago

Closing this, since the final effort of https://github.com/canonical/bundle-kubeflow/issues/1036 is done.

You can find an update action in https://github.com/canonical/bundle-kubeflow/actions/runs/10736791016