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

Containerless support for Java apps #338

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

eemcmullan
Copy link
Collaborator

@eemcmullan eemcmullan commented Sep 23, 2024

See docs/containerless.md for testing instructions

Signed-off-by: Emily McMullan <[email protected]>
@eemcmullan eemcmullan marked this pull request as ready for review September 26, 2024 13:44
Copy link
Contributor

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

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

Can we just run the static report from the main process rather than call the binary via script? IIUC what is happening

@@ -70,6 +68,17 @@ var (
}
)

// analyzer container paths
const (
RulesetPath = "/opt/rulesets"
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens with these paths on windows?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These paths are only used by the analyzer container, which are linux containers anyways. They aren't used in the containerless work

cmd/analyze-bin.go Outdated Show resolved Hide resolved
@eemcmullan
Copy link
Collaborator Author

Can we just run the static report from the main process rather than call the binary via script? IIUC what is happening

@shawn-hurley The first step of static report does run from main, which creates the output.js file. The script is there just because the second step required in generating the static report, building the dir and moving over the output.js file and then moving that dir into user output, requires a decent amount of chaining commands. Just thought the script made things more straight-forward, but could be wrong.

Signed-off-by: Emily McMullan <[email protected]>
Copy link
Member

@aufi aufi left a comment

Choose a reason for hiding this comment

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

Overall looks good and mostly fits to the konveyor/enhancements#196, LGTM.

Copy link
Contributor

@pranavgaikwad pranavgaikwad left a comment

Choose a reason for hiding this comment

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

Overall, code makes sense. Concern about static-report..

static-report.sh Outdated

# TODO test this on windows
(cd ${HOMEDIR}/.kantra/static-report &&
npm clean-install &&
Copy link
Contributor

Choose a reason for hiding this comment

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

if I am not wrong, this is happening at runtime. I don't think we can expect the users to have npm installed. This should be a built artifact that's already present in .kantra/static-report. we just have to copy it into the output dir and put output.js under the copied dir.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@pranavgaikwad the build dir doesn't have to be created for each new analysis output? Sorry if that's not what you're talking about. I wasn't sure

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah build dir is a one time process when we create a static-report release. The contents of the build directory remain constant for different analyses, the only variable is output.js file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Gotcha. Apologies - misunderstood that step. Will update

Signed-off-by: Emily McMullan <[email protected]>
@eemcmullan eemcmullan merged commit cafa2f2 into konveyor:main Sep 30, 2024
3 checks passed
aufi added a commit to aufi/kantra that referenced this pull request Oct 2, 2024
Missing container-kantra-deps setup caused kantra analyze-bin command
segfault. Adding check and error message to fail nicely.

Related to: konveyor#338

Signed-off-by: Marek Aufart <[email protected]>
eemcmullan pushed a commit that referenced this pull request Oct 2, 2024
* Handle missing containerless-deps

Missing container-kantra-deps setup caused kantra analyze-bin command
segfault. Adding check and error message to fail nicely.

Related to: #338

Signed-off-by: Marek Aufart <[email protected]>

* Update .kantra subdirs validation

Signed-off-by: Marek Aufart <[email protected]>

* Update RulesetsLocation path from const

Signed-off-by: Marek Aufart <[email protected]>

---------

Signed-off-by: Marek Aufart <[email protected]>
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.

5 participants