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

✨ Adding ability for the cache for dependencies to re-gen #777

Conversation

shawn-hurley
Copy link
Contributor

  • When the pom file has changed (by comparing a hash of the file) we will regen the cache.
  • this should work for all the cases that have a pom
  • there is a TODO to add this behavior for gradle, but that didn't ever seem to be cached.

* When the pom file has changed (by comparing a hash of the file) we
  will regen the cache.
* this should work for all the cases that have a pom
* there is a TODO to add this behavior for gradle, but that didn't ever
  seem to be cached.

Signed-off-by: Shawn Hurley <shawn@hurley.page>
return nil, err
}
hash := sha256.New()
if _, err := io.Copy(hash, file); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like file may not always be a file? From demo output: 0.errors.java-pomxml-dependencies = read /analyzer-lsp/examples/quarkus-1-6-2-jar-exploded: is a directory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I think in the case of binaries, there is some special stuff, I don't need the behavior changed for that, so adding back the behavior for that and adding handling nested poms.

@eemcmullan eemcmullan self-requested a review February 18, 2025 16:41
@shawn-hurley shawn-hurley force-pushed the feature/add-cache-refresh-on-pom-change branch from 198c82f to 1f1602a Compare February 18, 2025 16:47
@shawn-hurley
Copy link
Contributor Author

Something that I am doing is now making the tests time out. I couldn't tell you what that is, though. This should behave the same besides the file path walk, and if we were really already that tight on time, then something else is wrong.

I am going to need to dig in more here.

Signed-off-by: Shawn Hurley <shawn@hurley.page>
@shawn-hurley shawn-hurley force-pushed the feature/add-cache-refresh-on-pom-change branch from 1f1602a to 7d448e2 Compare February 18, 2025 20:02
@shawn-hurley
Copy link
Contributor Author

@eemcmullan @fabianvf can you re-look this is now passing CI and it works for kai. Want to get another pair of eyes because i changed it quite a bit from approval.

@shawn-hurley shawn-hurley merged commit e8fcefb into konveyor:main Feb 19, 2025
10 checks passed
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.

3 participants