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

Prefetch pnc #44

Open
wants to merge 36 commits into
base: rhoai-2.16
Choose a base branch
from
Open

Prefetch pnc #44

wants to merge 36 commits into from

Conversation

MohammadiIram
Copy link
Member

No description provided.

@MohammadiIram
Copy link
Member Author

@kosciCZ Could you please review the PR?

.tekton/odh-trustyai-service-v2-16-push.yaml Outdated Show resolved Hide resolved
Comment on lines 4 to 10
- download_url: https://github.com/cachito-testing/cachi2-generic/archive/refs/tags/v1.0.0.zip
checksums:
sha256: 4fbcaa2a8d17c1f8042578627c122361ab18b7973311e7e9c598696732902f87
- download_url: https://github.com/cachito-testing/cachi2-generic/archive/refs/tags/v2.0.0.zip
target: archive.zip
checksums:
sha256: 386428a82f37345fa24b74068e0e79f4c1f2ff38d4f5c106ea14de4a2926e584
Copy link

Choose a reason for hiding this comment

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

Here you'd put in the files you need, these are just examples.

  • download_url is the url the files is available from
  • target is optional and specifies a subpath the file will be saved as. If not defined, it will be derived from the url
  • checksums is a list of pairs of algorithm and hash, that is necessary to verify file identity

Copy link
Member Author

Choose a reason for hiding this comment

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

I see. Could you please let me know which files you’re referring to here?

Copy link

Choose a reason for hiding this comment

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

Those would be the files that you download from the internet during the build, which would violate the hermetic build condition. Having a brief look into your Dockerfile, I would say it's these files

Copy link
Member Author

Choose a reason for hiding this comment

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

@kosciCZ
Copy link

kosciCZ commented Oct 30, 2024

Also, please also follow step 6 here to enable dev package managers (generic package fetcher still has just experimental support)

generic_lockfile.yaml Outdated Show resolved Hide resolved
.tekton/odh-trustyai-service-v2-16-push.yaml Outdated Show resolved Hide resolved
@MohammadiIram
Copy link
Member Author

task prefetch-dependencies has the status "Failed":
Error: InvalidInput: 1 validation error for user input
packages -> 0
  Input tag 'generic' found using 'type' does not match any of the expected tags: 'bundler', 'gomod', 'npm', 'pip', 'rpm', 'yarn'

@kosciCZ I see this error during the pipeline run, any idea what could be added for generic fetcher to prefetch type

@kosciCZ
Copy link

kosciCZ commented Oct 30, 2024

@MohammadiIram that's gonna be the developer flag, see my other comment

@MohammadiIram
Copy link
Member Author

Also, please also follow step 6 here to enable dev package managers (generic package fetcher still has just experimental support)

yeah, i will add the rpms.in.yaml, but for generic fetcher what can we add the type?

@MohammadiIram
Copy link
Member Author

@kosciCZ Ay idea why do we need ["./fedora.repo"] we would want upi.repo

Something like this will be the rpms.in.yaml

contentOrigin:
  repofiles:
    - ubi.repo
packages:
  - unzip
  - jq
  - wget

@MohammadiIram
Copy link
Member Author

@kosciCZ Could we merge this PR and look what we find in the pipeline run?

@kosciCZ
Copy link

kosciCZ commented Oct 31, 2024

Also, please also follow step 6 here to enable dev package managers (generic package fetcher still has just experimental support)

yeah, i will add the rpms.in.yaml, but for generic fetcher what can we add the type?

You can specify a json array like this: [{"path": ".", "type": "rpm"}, {"path": ".", "type": "generic"}]

@MohammadiIram
Copy link
Member Author

task prefetch-dependencies has the status "Failed":
Error: InvalidInput: 1 validation error for user input
packages -> 0
Input tag 'generic' found using 'type' does not match any of the expected tags: 'bundler', 'gomod', 'npm', 'pip', 'rpm', 'yarn'

yeah, but that is not supported i guess we hit this error

task prefetch-dependencies has the status "Failed":
Error: InvalidInput: 1 validation error for user input
packages -> 0
  Input tag 'generic' found using 'type' does not match any of the expected tags: 'bundler', 'gomod', 'npm', 'pip', 'rpm', 'yarn'

@kosciCZ
Copy link

kosciCZ commented Oct 31, 2024

It should be supported now that you added the "dev-package-managers" flag

@MohammadiIram
Copy link
Member Author

MohammadiIram commented Oct 31, 2024

It should be supported now that you added the "dev-package-managers" flag

Added, but still i see same error https://github.com/red-hat-data-services/trustyai-explainability/pull/44/checks?check_run_id=32322784387

@kosciCZ
Copy link

kosciCZ commented Oct 31, 2024

It is possible that the prefetch task is fixed to the previous version of cachi2. Could you please try updating the reference from

quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies:0.1@sha256:fe7234e3824d1e65d6a7aac352e7a6bbce623d90d8d7da9aceeee108ad2c61be

to

quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies:0.1@sha256:17b60ada3c2adb88fc2af6964cc73d386b41c235424c815f8e21f9b01a34a4f5

@kosciCZ
Copy link

kosciCZ commented Oct 31, 2024

Also, you should update the Dockerfile to remove the ARG PNC_FILES_JSON and you don't need the jq and wget deps (can be removed from Dockerfile and the rpms.in.yaml/rpms.lock.yaml)

@MohammadiIram
Copy link
Member Author

It is possible that the prefetch task is fixed to the previous version of cachi2. Could you please try updating the reference from

quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies:0.1@sha256:fe7234e3824d1e65d6a7aac352e7a6bbce623d90d8d7da9aceeee108ad2c61be

to

quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies:0.1@sha256:17b60ada3c2adb88fc2af6964cc73d386b41c235424c815f8e21f9b01a34a4f5

After updating i see this

Task Statuses:
Pipeline rhoai-tenant/odh-trustyai-service-v2-16-on-pull-request-b88gg can't be Run; it contains Tasks that don't exist: Couldn't retrieve Task "resolver type bundles\nname = prefetch-dependencies\n": error requesting remote resource: error getting "bundleresolver" "rhoai-tenant/bundles-1c2b8a693f3a93dfd98b741fedd6b54a": cannot retrieve the oci image: GET https://quay.io/v2/konflux-ci/tekton-catalog/task-prefetch-dependencies/manifests/sha256:17b60ada3c2adb88fc2af6964cc73d386b41c235424c815f8e21f9b01a34a4f5: MANIFEST_UNKNOWN: manifest unknown; map[]

@MohammadiIram
Copy link
Member Author

@kosciCZ I also tried to update it with the latest digest which is sha256:3be04adda63fc843db5eea837cabe33317a6d4f378c559de0c7ef888103e7fd4
the latest run still says https://github.com/red-hat-data-services/trustyai-explainability/pull/44/checks?check_run_id=32332061259

Error: InvalidInput: 1 validation error for user input
packages -> 1
Input tag 'generic' found using 'type' does not match any of the expected tags: 'bundler', 'gomod', 'npm', 'pip', 'rpm', 'yarn'

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