Skip to content

MTA-6288 Centralized configuration in MTA CLI#305

Merged
Pkylas007 merged 2 commits intomainfrom
mta-6288-centralized-config-cli
Mar 25, 2026
Merged

MTA-6288 Centralized configuration in MTA CLI#305
Pkylas007 merged 2 commits intomainfrom
mta-6288-centralized-config-cli

Conversation

@Pkylas007
Copy link
Copy Markdown
Collaborator

@Pkylas007 Pkylas007 commented Feb 9, 2026

JIRA

Version

  • 8.1.0

Preview

Summary by CodeRabbit

  • Documentation
    • Introduced Analysis Profile docs (Technology Preview) with guidance on syncing to obtain profiles and custom rules
    • Added a CLI procedure for analyzing applications using profiles with prerequisites and example commands
    • Added a reference for mta-cli config command options and flags
    • Added docs for modifying application profiles with sample YAML and field explanations
    • Updated master docs to include Analysis Profile guidance
    • Adjusted CLI known-issues page metadata/anchor identifiers

@Pkylas007 Pkylas007 force-pushed the mta-6288-centralized-config-cli branch from 1a30474 to 6afe626 Compare February 9, 2026 11:55
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 10, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds new documentation for an Analysis Profile feature (assembly, procedure, reference files), updates the CLI master include to incorporate the new assembly, and adjusts metadata/ID on an existing known-issues page; the feature is marked Technology Preview.

Changes

Cohort / File(s) Summary
Assembly (new)
assemblies/cli-guide/assembly_analyzing-applications-using-profiles.adoc
New assembly introducing the Analysis Profile feature (Technology Preview) with metadata, conditional context blocks, abstract, role note, and external resource references.
CLI master include
docs/cli-guide/master.adoc
Inserted an include directive for the new assembly into the CLI guide include sequence.
Procedure (new)
docs/topics/mta-cli/proc_analyzing-app-with-profile.adoc
New procedure documenting login, sync (downloads profiles and rules to .konveyor/profiles), verification steps, example commands, and running mta-cli analyze with a profile.
Reference — config flags (new)
docs/topics/mta-cli/ref_mta-cli-config-flags.adoc
New reference page for mta-cli config subcommands and flags (--k, --insecure, --url, etc.) with an options table and usage notes.
Reference — profile format (new)
docs/topics/mta-cli/ref_modify-application-profile.adoc
New reference documenting the application profile YAML structure and field definitions (id, metadata, mode, scope, packages, targets, labels, files, repository).
Known issues metadata
docs/topics/mta-cli/cli-tool-known-issues.adoc
Updated metadata keys and replaced page ID from cli-tool-known-issues_{context} to cli-known-issues_{context}; no visible body content changes.

Sequence Diagram(s)

sequenceDiagram
  participant User as "User"
  participant CLI as "mta-cli"
  participant Hub as "Product Hub"
  participant FS as "Local FS\n(`.konveyor/profiles`)"
  rect rgba(200,230,255,0.5)
    User->>CLI: run `mta-cli login` (credentials)
    CLI->>Hub: authenticate
    Hub-->>CLI: auth token
  end
  rect rgba(200,255,200,0.5)
    User->>CLI: run `mta-cli sync [app]`
    CLI->>Hub: request profile & rules
    Hub-->>CLI: profile + rules
    CLI->>FS: write to `.konveyor/profiles`
  end
  rect rgba(255,230,200,0.5)
    User->>CLI: run `mta-cli analyze --profile <name>`
    CLI->>FS: load profile & rules
    CLI->>CLI: perform analysis (source/full)
    CLI-->>User: return results
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through docs to fetch a key,

Profiles nested in .konveyor for me,
Login, sync, then analyze with cheer,
Tiny paws tapping—new guides appear,
A nibble of doc and a joyful squeak!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding documentation for centralized configuration management via profiles in the MTA CLI tool.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mta-6288-centralized-config-cli

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🤖 Fix all issues with AI agents
In `@assemblies/cli-guide/assembly_analyzing-applications-using-profiles.adoc`:
- Around line 21-26: Replace the incorrect phrase "Profiles custom rules" in the
document with the intended wording; update the string to either "Profile custom
rules" if singular adjective is intended, or "Profiles and custom rules" if
listing two separate items, and ensure the corresponding directory bullet
remains consistent with `.konveyor/profiles` and
`.konveyor/profiles/_<profile-name>_/rules`.

In `@docs/topics/mta-cli/proc_analyzing-app-with-profile.adoc`:
- Around line 8-9: There is a spelling mistake in the documentation text: change
"direcory" to "directory" in the sentence inside
docs/topics/mta-cli/proc_analyzing-app-with-profile.adoc where the `.konveyor`
location is described (search for the phrase "delete the `.konveyor` direcory").
Update that occurrence (and any other accidental instances of "direcory") to
"directory" to correct the typo.
- Line 5: Update the document ID string to fix the typo: change the identifier
"analyzing-app-wth-profile_{context}" to "analyzing-app-with-profile_{context}"
so all cross-references use the correct ID; locate the attribute
id="analyzing-app-wth-profile_{context}" and replace it with
id="analyzing-app-with-profile_{context}" in the document header.
- Around line 11-16: Update the heading ".Prerequisite" to ".Prerequisites" and
correct the sentence "You administrator installed {ProductShortName}..." to
"Your administrator installed {ProductShortName}..." (locate the line containing
"You administrator" and the ".Prerequisite" title in
proc_analyzing-app-with-profile.adoc and apply these two wording fixes).
- Around line 38-42: Replace the misspelled variable {ProdoctShortName} with the
correct {ProductShortName} in the NOTE block (the line describing Username and
Password) so the documentation uses the proper substitution token; search for
the token {ProdoctShortName} and update it to {ProductShortName}.
- Around line 44-49: Update the example command to use the correct subcommand
namespace: change "./mta-cli sync" to "./mta-cli config sync" so it matches
other usages in the doc and the referenced options list; update the line showing
the command invocation (the example containing "./mta-cli sync --url
https://github.com/<my-app-repository> --application-path _<path/to/my-app>_")
to "./mta-cli config sync --url https://github.com/<my-app-repository>
--application-path _<path/to/my-app>_" to keep consistency with the "mta-cli
config" command group.

In `@docs/topics/mta-cli/ref_mta-cli-config-flags.adoc`:
- Line 2: Update the manifest metadata entry named `_template-generated`
(currently set to `2025-04-09`) so it accurately reflects the document
generation date or remove the `_template-generated` key entirely if the
timestamp is not needed; locate the `_template-generated` line in the document
header and either replace the date with the correct generation date (e.g., the
PR or build date) or delete that metadata line.
- Around line 21-23: Update the description for the `list` flag to fix the verb
tense: change "downloaded and store locally in the application." to "downloaded
and stored locally in the application." so the verbs are consistent; locate the
table entry for the `list` flag (the paragraph immediately following `|` `list`
in the docs) and replace the word "store" with "stored".
- Around line 25-34: Update the login command description: remove the stray
trailing space after `host` in the sentence "Use the command to enter the `host
` URL, `username`, and the `password`" and correct the next sentence to read
"The username and password are the {ProductShortName} realm credentials." Ensure
the references to the `login` command and the `{ProductShortName}` variable
remain unchanged and keep the `--k`, `--insecure` flag line intact.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@docs/topics/mta-cli/proc_analyzing-app-with-profile.adoc`:
- Line 6: The document title line "= Analyzing an application by using profile"
has a grammatical error; update the title to include the article by changing the
string to either "= Analyzing an application by using a profile" (singular) or
"= Analyzing an application by using profiles" (plural) so the heading is
grammatically correct; modify the title text exactly in the file where the
heading string appears.
- Line 9: Update the pluralization in the sentence that starts "Migrators can
use profiles and custom rules..." by changing "analysis" to "analyses" so it
correctly reads "run one or more analyses"; edit the text in the
docs/topics/mta-cli/proc_analyzing-app-with-profile.adoc content where that
sentence appears.

@Pkylas007 Pkylas007 force-pushed the mta-6288-centralized-config-cli branch from a2f474b to a3256de Compare February 11, 2026 07:42
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@docs/topics/mta-cli/ref_modify-application-profile.adoc`:
- Around line 54-79: Add a missing definition for the files field: insert a
concise description for `files` immediately after the `labels` definition that
explains what `files` represents (e.g., list of file paths or glob patterns to
include/exclude in the analysis), how to format it in YAML, and any default
behavior; also briefly clarify the distinction between `files` and `fields` (for
example, `files` selects file-level inputs to analyze while `fields` references
custom rule identifiers or rule files), and reference the existing symbols
`files`, `fields`, `labels`, `packages`, and `withKnownLibs` so readers can see
how `files` interacts with scope, mode, and rule configuration.
- Line 64: Remove the stray incomplete definition "withKnownLibs`:" from the
document so there is only the correct, full definition of withKnownLibs under
the Scope configuration; search for the orphan token `withKnownLibs`:` and
delete that line so the duplicate/copy-paste residue is removed and the proper
definition on the Scope section remains unchanged.
🧹 Nitpick comments (1)
docs/topics/mta-cli/ref_modify-application-profile.adoc (1)

79-79: Minor grammar improvement.

Add the article "an" before "external ruleset repository" for grammatical correctness.

✏️ Proposed fix
-`repository` :: specifies details of external ruleset repository. For example, `kind` (`Git` or `Subversion`), `URL`, `branch`, `tag`, and `path` within the repository to the rulesets.
+`repository` :: specifies details of an external ruleset repository. For example, `kind` (`Git` or `Subversion`), `URL`, `branch`, `tag`, and `path` within the repository to the rulesets.

@Pkylas007 Pkylas007 requested a review from mpershina February 11, 2026 08:55
Copy link
Copy Markdown
Collaborator

@mpershina mpershina left a comment

Choose a reason for hiding this comment

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

Review finished. Mostly discrepancies with the RH SSG or IBM SG.

@Pkylas007
Copy link
Copy Markdown
Collaborator Author

Updated changes that are applicable in the guide.

@Pkylas007 Pkylas007 force-pushed the mta-6288-centralized-config-cli branch 2 times, most recently from ece2095 to 992c23a Compare February 12, 2026 05:26
= Analyzing an application by using a profile

[role="_abstract"]
Migrators can use profiles and custom rules downloaded from the {ProductShortName} Hub to run one or more analyses. If you want to run an analysis without using the downloaded profile configuration, you must delete the `.konveyor` directory within your application where {ProductShortName} downloaded the profiles and rules.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Might be worth noting here that any options set from the CLI will override options in a profile, so the profile dir does not necessarily have to be removed.

Copy link
Copy Markdown
Collaborator Author

@Pkylas007 Pkylas007 Mar 6, 2026

Choose a reason for hiding this comment

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

@Emily Can you please confirm if users can override the options in profile using the set command? Not sure which option allows users to override profile config.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Any of the options provided from the cli that are also in a profile will override the profile. So if the profile has target set as java-ee and cloud-readiness, but the user passes in targets through the CLI analyze command, such as kantra analyze ... --target quarkus, then the target for that analysis will only be quarkus.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@eemcmullan I have added the point about overriding values in the intro and in the procedure. Could you take a look, please?

@Pkylas007 Pkylas007 requested review from ibragins and removed request for dymurray March 11, 2026 03:16
@Pkylas007
Copy link
Copy Markdown
Collaborator Author

@ibragins Could you review this PR, please?

Signed-off-by: Prabha Kylasamiyer Sundara Rajan <pkylasam@pkylasam-thinkpadp16vgen1.bengluru.csb>
@Pkylas007 Pkylas007 force-pushed the mta-6288-centralized-config-cli branch from 7da6460 to 0256101 Compare March 25, 2026 07:50
@Pkylas007 Pkylas007 merged commit 34bc8ba into main Mar 25, 2026
2 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.

4 participants