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

[RFE] Support for Analyzing Multiple Inputs Applications Together #194

Closed
kthatipally opened this issue Mar 19, 2024 · 12 comments · Fixed by #198
Closed

[RFE] Support for Analyzing Multiple Inputs Applications Together #194

kthatipally opened this issue Mar 19, 2024 · 12 comments · Fixed by #198
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@kthatipally
Copy link

kthatipally commented Mar 19, 2024

Kantra currently can't analyze input multiple applications at once. Adding this feature would let users analyze several projects together, using the same settings and producing combined reports similar to how Windup supports analyzing multiple applications simultaneously. This change would save time, ensure consistency, and give better insights.

@konveyor-ci-bot konveyor-ci-bot bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 19, 2024
@konveyor-ci-bot
Copy link

This issue is currently awaiting triage.
If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members.

@konveyor-ci-bot konveyor-ci-bot bot added needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. labels Mar 19, 2024
@kthatipally kthatipally changed the title [Feature]: Support for Analyzing Multiple Inputs Applications Together [Feature] Support for Analyzing Multiple Inputs Applications Together Mar 19, 2024
@pranavgaikwad pranavgaikwad added triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/feature Categorizes issue or PR as related to a new feature. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. labels Mar 29, 2024
@konveyor-ci-bot konveyor-ci-bot bot removed the needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. label Mar 29, 2024
@pranavgaikwad pranavgaikwad added this to the v0.4.0 milestone Mar 29, 2024
@aufi aufi self-assigned this Apr 2, 2024
@aufi
Copy link
Member

aufi commented Apr 3, 2024

Let's clarify the CLI arguments for multiple applications analysis, assuming this is not Hub-related, but pure kantra CLI solution. Windup looks to use --input option [1] that could be file or a directory, is it the right way to allow use multiple --input as an array or applications?

[1] https://access.redhat.com/documentation/en-us/red_hat_jboss_migration_toolkit/2.4/html-single/windup_user_guide/index#command-line-arguments

@dymurray dymurray modified the milestones: v0.4.0, v0.5.0 Apr 23, 2024
@brunoborges
Copy link

@aufi I think that the main benefit here for having multiple apps, is so that we have a static report generated with multiple apps as part of the assessment.

This is particularly useful for microservices, or even larger systems deployed as a handful of deployable units, all part of the same "business application". This will give the end user a single report with all the analysis in a single report.

Now, whether --input can receive a list of inputs (e.g., --input my app.jar,myotherappsource/,someotherapp.jar) or requiring one --input for each input (e.g. --input myapp.jar --input otherapp.jar --input sourcefolder/), I think that's up to the engineering team to decide. Both options are scriptable.

aufi referenced this issue in aufi/kantra May 15, 2024
Adding "feature" to support multiple inputs for kantra. That allows
running analysis of multiple applications within a single kantra call
and having results in a single statis report.

Limitations:
- analyses are executed serially one after another and there is _no_
  plan on making it paralel (use full Konveyor if need this)
- all options (like labels, rules) are shared for all inputs (again no
  plan on supporting per-input labels etc., use full Konveyor if needed)

Since the multiple input analysis execution might take a while, static
report is re-generated after each application analysis. Analysis YAML
results and log are stored in single output directory in files with
name suffix based on input name.

Single-input analysis output structure is not changed.

TODOs:
- include dependencies files in outputs
- consider support `input dir` with multiple applications if needed
- optimize repeated execution of provider containers&related stuff setup and cleanup

Fixes: https://github.com/konveyor/kantra/issues/180

Signed-off-by: Marek Aufart <[email protected]>
aufi referenced this issue in aufi/kantra May 31, 2024
It was requested to allow multiple inputs for kantra analyze command.
Full multiple inputs support (or a limited/hidden input-bin directory
support) would bring unwanted complications for codebase and unwanted usage of kantra
tool instead of using Konveyor Hub (discussed in eng team).

It looks much cleaner to me to state in README, that kantra analyze
is intentionaly a single input command, but allow script multiple inputs
analysis on user-side with --bulk command option, that allows run
mutliple analysis into the same output directly and create a combined
static report.

Related to
- https://github.com/konveyor/kantra/issues/180
- konveyor#234 (alternative)

Signed-off-by: Marek Aufart <[email protected]>
aufi referenced this issue in konveyor/kantra Jun 18, 2024
Support multiple inputs with bulk option

It was requested to allow multiple inputs for kantra analyze command.
Full multiple inputs support (or a limited/hidden input-bin directory
support) would bring unwanted complications for codebase and unwanted usage of kantra
tool instead of using Konveyor Hub (discussed in eng team).

It looks much cleaner to me to state in README, that kantra analyze
is intentionaly a single input command, but allow script multiple inputs
analysis on user-side with --bulk command option, that allows run
mutliple analysis into the same output directly and create a combined
static report.

Related to
- https://github.com/konveyor/kantra/issues/180
- #234 (alternative)

Signed-off-by: Marek Aufart <[email protected]>
Signed-off-by: Marek Aufart <[email protected]>
@aufi
Copy link
Member

aufi commented Jun 18, 2024

@aufi
Copy link
Member

aufi commented Jun 18, 2024

Related paragraph from kantra readme:

Analyze multiple applications

By design, kantra supports single application analysis per kantra command execution. However, it is possible use --bulk option for executing multiple kantra analyze commands with different applications to get an output directory and static-report populated with all applications analysis reports.

Example:

kantra analyze --bulk --input=<path/to/source/A> --output=<path/to/output/ABC>
kantra analyze --bulk --input=<path/to/source/B> --output=<path/to/output/ABC>
kantra analyze --bulk --input=<path/to/source/C> --output=<path/to/output/ABC>

@rromannissen
Copy link
Contributor

@aufi I don't understand how that example relates to what @brunoborges was asking for. Could you elaborate further how would that work if I want to analyze applications A, B and C and get the reports for the three of them merged together?

@brunoborges
Copy link

I think the implementation is almost there.

But instead of calling kantra three times with the --bulk parameter, the --input parameter should allow multiple inputs, either by comma separated list, or by adding multiple --input

@aufi
Copy link
Member

aufi commented Jun 18, 2024

Thank you for comment Ramon and Bruno, adding some description what lead us to focus on little different way to getting static report including multiple applications analyses. If the proposed --bulk option would not satisfy you use-case, let's discuss it.

Initialy requested command like below would introduce issues with different input applications technologies, output directory structure incompatible with single application analysis, unexpectable running time before returning the report and our aim move such use-cases primary to use Hub-based Konveyor installation.

kantra analyze --input A --input B --input C --output=<path/to/output/ABC>
# or
kantra analyze --input A,B,C --output=<path/to/output/ABC>

The --bulk option allows to run applications analysis (single application per kantra call), but put results of multiple application analyses into a single static report (when pointing to the same output directory and it doesn't make assumptions about applications technologies/languages, sources, targets, etc.

It is true that there was also nearly working PR with initialy requested functionality (currently broken by multiprovider changes and replaced by the multiple inputs with --bulk option), but it could be refreshed and completed.

This discussion probably should involve also @pranavgaikwad and @shawn-hurley (when they're available).

@aufi
Copy link
Member

aufi commented Jun 18, 2024

Example of currently proposed solution:
A user have apps A, B and C in a directory path/to/source and wants analyze them with kantra.

In order to run analysis and get single static report covering all 3 applications A, B, C, commands below should be executed (kantra analyze with --bulk option to the same output directory)

kantra analyze --bulk --input=<path/to/source/A> --output=<path/to/output/ABC>
kantra analyze --bulk --input=<path/to/source/B> --output=<path/to/output/ABC>
kantra analyze --bulk --input=<path/to/source/C> --output=<path/to/output/ABC>

@aufi
Copy link
Member

aufi commented Jun 20, 2024

I should have mentioned one more option we agreed at some point with dev-colleagues and that was not use multiple input fields (or list of applications), but add --input-bin-dir option to analyze all applications within the directory. (implentation not finished yet)

Example command:

# E.g. have applications A.war, B.war, C.ear in directory ./apps and want analyze them to get single static report covering all 3 applications
kantra analyze --input-bin-dir=./apps --output=<path/to/output>

@aufi
Copy link
Member

aufi commented Jun 28, 2024

Let me summarize current state. There is merged&built upstream solution/workaround combining multiple application analyses into single static report with --bulk option.

To fulfil request from this RFE, we might discuss if real multiple --input options and/or --input-bin-dir options support will be implemented too. Let's talk about it on regular bi-weekly call.

@dymurray dymurray removed this from the v0.5.0 milestone Aug 1, 2024
@dymurray dymurray added this to the v0.6.0 milestone Aug 1, 2024
@rromannissen rromannissen transferred this issue from konveyor/kantra Aug 1, 2024
@konveyor-ci-bot konveyor-ci-bot bot added the needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. label Aug 1, 2024
@rromannissen rromannissen changed the title [Feature] Support for Analyzing Multiple Inputs Applications Together [RFE] Support for Analyzing Multiple Inputs Applications Together Aug 1, 2024
@rromannissen
Copy link
Contributor

To be refined to follow @brunoborges' request by 0.6.

aufi added a commit to aufi/enhancements that referenced this issue Aug 14, 2024
Adding multiple inputs support for kantra analyze command.

Fixes: konveyor#194

Signed-off-by: Marek Aufart <[email protected]>
@aufi aufi closed this as completed in #198 Sep 13, 2024
@aufi aufi closed this as completed in 4b2ebd4 Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

6 participants