Skip to content

feat: print a progress message before fetching packages in http client sample - #126

Merged
warunalakshitha merged 1 commit into
mainfrom
revamp-http-client-sample
Aug 14, 2026
Merged

warunalakshitha merged 1 commit into
mainfrom
revamp-http-client-sample

Conversation

@TharmiganK

@TharmiganK TharmiganK commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

$Subject

Summary by CodeRabbit

  • User Experience
    • Added a status message indicating that popular packages are being fetched from Ballerina Central before displaying query results.
    • The message includes the search query and registry name for clearer feedback during requests.

…t sample

The Central registry call takes a few seconds, so print a status line
before it starts instead of leaving the output blank while it runs.
string query = "aws";
http:Client registry = check new ("https://api.central.ballerina.io/2.0/registry");

io:println(string `Fetching popular packages for query '${query}' from Ballerina Central...`);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we use ballerina/log. I am not sure it is good to have mix of io and log.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

From connector team, we follow and recommend the convention to use io prints in main function examples and log statements for service examples.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d08972f-cd08-4ac3-b1d5-1d0eacd743b4

📥 Commits

Reviewing files that changed from the base of the PR and between 9f13cbd and 3520efc.

📒 Files selected for processing (2)
  • e2e/fixtures/examples/02-http-client.txt
  • examples/02-http-client/main.bal

📝 Walkthrough

Walkthrough

The HTTP client example now prints a package-fetch status message before querying Ballerina Central. The E2E fixture includes the new output line.

Changes

HTTP client status output

Layer / File(s) Summary
Add package-fetch status message
examples/02-http-client/main.bal, e2e/fixtures/examples/02-http-client.txt
The example prints a status message before the registry request. The E2E fixture records the new output.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 3520e

This change only adds a progress message and updates the corresponding example output; no actionable merge-blocking risk remains after the normal fixture refresh check.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains only a placeholder and does not address the required purpose, goals, approach, testing, security, samples, or release information. Complete the repository template with the change purpose, implementation details, testing, security checks, documentation impact, and other applicable sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a progress message before package fetching in the HTTP client sample.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revamp-http-client-sample

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.

@warunalakshitha
warunalakshitha merged commit e89aa8c into main Aug 14, 2026
2 checks passed
@TharmiganK
TharmiganK deleted the revamp-http-client-sample branch August 14, 2026 06:14
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.

2 participants