MTA-6288 Centralized configuration in MTA CLI#305
Conversation
1a30474 to
6afe626
Compare
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.
assemblies/cli-guide/assembly_analyzing-applications-using-profiles.adoc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
a2f474b to
a3256de
Compare
There was a problem hiding this comment.
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.
assemblies/cli-guide/assembly_analyzing-applications-using-profiles.adoc
Outdated
Show resolved
Hide resolved
assemblies/cli-guide/assembly_analyzing-applications-using-profiles.adoc
Outdated
Show resolved
Hide resolved
assemblies/cli-guide/assembly_analyzing-applications-using-profiles.adoc
Outdated
Show resolved
Hide resolved
assemblies/cli-guide/assembly_analyzing-applications-using-profiles.adoc
Outdated
Show resolved
Hide resolved
mpershina
left a comment
There was a problem hiding this comment.
Review finished. Mostly discrepancies with the RH SSG or IBM SG.
|
Updated changes that are applicable in the guide. |
ece2095 to
992c23a
Compare
| = 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@eemcmullan I have added the point about overriding values in the intro and in the procedure. Could you take a look, please?
|
@ibragins Could you review this PR, please? |
Signed-off-by: Prabha Kylasamiyer Sundara Rajan <pkylasam@pkylasam-thinkpadp16vgen1.bengluru.csb>
7da6460 to
0256101
Compare
JIRA
Version
Preview
Summary by CodeRabbit