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

Implement bal tool search #40758

Merged

Conversation

gayaldassanayake
Copy link
Contributor

@gayaldassanayake gayaldassanayake commented Jun 19, 2023

Purpose

$ subject

Related to #40264

The output is identical to the bal search command output except for the newly added ID field.

Ballerina Central
=================

|ID                            |PACKAGE                        |DESCRIPTION                    |DATE            |VERSION                        |
|------------------------------|-------------------------------|-------------------------------|----------------|-------------------------------|
|gayals                        |gayaldassanayake/tool_gayals   |1. Run `bal pack` with the ... |2023-06-14-Wed  |2.2.7                          |


1 tools found.

Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@gayaldassanayake gayaldassanayake requested a review from hevayo as a code owner June 19, 2023 11:54
settings = Settings.from();
}
CentralAPIClient client = new CentralAPIClient(RepoUtils.getRemoteRepoURL(),
initializeProxy(settings.getProxy()),
Copy link
Contributor

Choose a reason for hiding this comment

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

@Thevakumar-Luheerathan is there anything more for the proxy implementation?

Copy link
Member

Choose a reason for hiding this comment

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

We need to pass the username password too... Check

CentralAPIClient client = new CentralAPIClient(RepoUtils.getRemoteRepoURL(),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Thevakumar-Luheerathan please check if it's correct now.

Choose a reason for hiding this comment

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

ya... It's

}
} catch (CentralClientException e) {
String errorMessage = e.getMessage();
if (null != errorMessage && !"".equals(errorMessage.trim())) {
Copy link
Contributor

@azinneera azinneera Jun 19, 2023

Choose a reason for hiding this comment

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

Let's throw a generic error if the message is not present.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a generic error

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.51 ⚠️

Comparison is base (bbc591e) 76.93% compared to head (8cd301c) 76.42%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #40758      +/-   ##
============================================
- Coverage     76.93%   76.42%   -0.51%     
- Complexity    53747    55274    +1527     
============================================
  Files          3332     3386      +54     
  Lines        200289   208284    +7995     
  Branches      25654    26959    +1305     
============================================
+ Hits         154086   159185    +5099     
- Misses        37819    40324    +2505     
- Partials       8384     8775     +391     
Impacted Files Coverage Δ
...rc/main/java/io/ballerina/cli/cmd/ToolCommand.java 3.90% <0.00%> (ø)
...c/main/java/io/ballerina/cli/utils/PrintUtils.java 47.48% <0.00%> (-42.21%) ⬇️
...ballerinalang/central/client/CentralAPIClient.java 37.42% <0.00%> (-11.34%) ⬇️
...inalang/central/client/model/ToolSearchResult.java 0.00% <0.00%> (ø)

... and 570 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gayaldassanayake gayaldassanayake merged commit c230d98 into ballerina-platform:master Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants