-
Notifications
You must be signed in to change notification settings - Fork 66
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
prefetching-dependencies update #195
Conversation
🚀 Preview is available at https://pr-195--konflux-docs.netlify.app |
docs/modules/ROOT/pages/how-tos/configuring/prefetching-dependencies.adoc
Outdated
Show resolved
Hide resolved
b848672
to
a2ec65b
Compare
🚀 Preview is available at https://pr-195--konflux-docs.netlify.app |
docs/modules/ROOT/pages/how-tos/configuring/prefetching-dependencies.adoc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This looks good overall. A couple of comments that would be nice to resolve but are non-blocking.
|
||
.Prerequisites | ||
|
||
* You have an up-to-date `yarn.lock` file in your source repository. To make sure that you have the latest `yarn.lock` file, or to create a lockfile, run the `yarn install` command. If `yarn.lock` is not up-to-date, Cachi2 will not fetch the dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will Cachi2 not fetch any dependencies if the lockfiles are not up to date? Or is the behavior just that the locked dependencies will be fetched (and therefore your desired latest dependencies might not be fetched properly)?
(the comment is relevant for other package managers too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TL;DR It will fetch for bundler
but not for yarn
. I have to fix it...
It depends on the implementation details of each package manager. For example for yarn
, we use native mechanisms to pre-fetch the dependencies, the lockfile must be up to date. We use the command: yarn install --frozen-lockfile ...
which fails in that case. For other package managers like pip
, we just manually parse requirements-txt
so it does not make sense to do any validation there.
To prefetch dependencies for a component build, complete the following steps: | ||
|
||
. Go to the `.tekton` directory and find the `.yaml` files related to the `*pull request*` and `*push*` processes. | ||
. Configure the hermetic pipeline by adding the following parameters in both `.yaml` files: | ||
|
||
+ | ||
[source,yaml] | ||
---- | ||
spec: | ||
params: | ||
- ... | ||
- name: prefetch-input | ||
value: '{"type": "yarn", "path": "."}' | ||
---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this basically the same across all package managers? Would it be possible to abstract the general form to a common location and then just have sections on the individuality of the different managers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there is a lot of repetition in the docs. Each package manager has the same paragraph:
Verification
From the Konflux Applications view, go to Activity > Pipeline runs.
Go to the pipeline run with Build in the Type column and confirm that the prefetch-dependencies stage displays a green checkmark. This indicates that the build process successfully fetched all dependencies.
From the Konflux Applications view, go to Activity > Latest commits.
So I would propose a follow-up to clean this up and overall make it more concise. Unless you favor doing it here.
But I can delete the Procedure
section since it is duplicated for all package managers as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A follow up is fine if you don't want to do it righ tnow. You are being consistent.
- swap the package manager columns with the language column - use correct programming languages (if applicable) Signed-off-by: Michal Šoltis <[email protected]>
Signed-off-by: Michal Šoltis <[email protected]>
…agers Signed-off-by: Michal Šoltis <[email protected]>
…managers Signed-off-by: Michal Šoltis <[email protected]>
No description provided.