Skip to content

Conversation

@Dilhasha
Copy link

$subject

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Comment on lines +600 to +602
// Get Data Sources for a specific environment and component
isolated resource function get dataSourcesByEnvironmentAndComponent(graphql:Context context, string environmentId, string componentId) returns types:DataSource[]|error {
types:UserContextV2 userContext = check extractUserContext(context);

Choose a reason for hiding this comment

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

Log Improvement Suggestion No: 1

Suggested change
// Get Data Sources for a specific environment and component
isolated resource function get dataSourcesByEnvironmentAndComponent(graphql:Context context, string environmentId, string componentId) returns types:DataSource[]|error {
types:UserContextV2 userContext = check extractUserContext(context);
// Get Data Sources for a specific environment and component
isolated resource function get dataSourcesByEnvironmentAndComponent(graphql:Context context, string environmentId, string componentId) returns types:DataSource[]|error {
log:printInfo("Fetching data sources", environmentId = environmentId, componentId = componentId);

Comment on lines +619 to +621
}

return check storage:getDataSourcesByEnvironmentAndComponent(environmentId, componentId);

Choose a reason for hiding this comment

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

Log Improvement Suggestion No: 2

Suggested change
}
return check storage:getDataSourcesByEnvironmentAndComponent(environmentId, componentId);
}
log:printDebug("Successfully retrieved data sources", environmentId = environmentId, componentId = componentId);
return check storage:getDataSourcesByEnvironmentAndComponent(environmentId, componentId);

Comment on lines +629 to +630
// Get Data Sources for a specific environment and component
public isolated function getDataSourcesByEnvironmentAndComponent(string environmentId, string componentId) returns types:DataSource[]|error {

Choose a reason for hiding this comment

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

Log Improvement Suggestion No: 3

Suggested change
// Get Data Sources for a specific environment and component
public isolated function getDataSourcesByEnvironmentAndComponent(string environmentId, string componentId) returns types:DataSource[]|error {
// Get Data Sources for a specific environment and component
public isolated function getDataSourcesByEnvironmentAndComponent(string environmentId, string componentId) returns types:DataSource[]|error {
log:printInfo("Fetching data sources for environment: " + environmentId + " and component: " + componentId);

Comment on lines +637 to +638
// If no runtimes found, return empty array
if runtimeIds.length() == 0 {

Choose a reason for hiding this comment

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

Log Improvement Suggestion No: 4

Suggested change
// If no runtimes found, return empty array
if runtimeIds.length() == 0 {
// If no runtimes found, return empty array
if runtimeIds.length() == 0 {
log:printDebug("No runtime IDs found for environment: " + environmentId + " and component: " + componentId);

Comment on lines 695 to 697
foreach types:DataSource dataSource in <types:DataSource[]>heartbeat.artifacts.dataSources {
_ = check dbClient->execute(`
INSERT INTO runtime_data_sources (

Choose a reason for hiding this comment

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

Log Improvement Suggestion No: 5

Suggested change
foreach types:DataSource dataSource in <types:DataSource[]>heartbeat.artifacts.dataSources {
_ = check dbClient->execute(`
INSERT INTO runtime_data_sources (
foreach types:DataSource dataSource in <types:DataSource[]>heartbeat.artifacts.dataSources {
log.debug("Inserting data source: " + dataSource.name + " for runtime: " + heartbeat.runtime);
_ = check dbClient->execute(`

Comment on lines 525 to 526
types:DataSource[] sourceList = [];
stream<types:DataSource, sql:Error?> sourceStream = dbClient->query(`

Choose a reason for hiding this comment

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

Log Improvement Suggestion No: 6

Suggested change
types:DataSource[] sourceList = [];
stream<types:DataSource, sql:Error?> sourceStream = dbClient->query(`
types:DataSource[] sourceList = [];
log:printInfo("Fetching data sources for runtime: " + runtimeId);
stream<types:DataSource, sql:Error?> sourceStream = dbClient->query(`

Copy link

@wso2-engineering wso2-engineering bot left a comment

Choose a reason for hiding this comment

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

AI Agent Log Improvement Checklist

⚠️ Warning: AI-Generated Review Comments

  • The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
  • Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.

✅ Before merging this pull request:

  • Review all AI-generated comments for accuracy and relevance.
  • Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
Comment Accepted (Y/N) Reason
#### Log Improvement Suggestion No: 1
#### Log Improvement Suggestion No: 2
#### Log Improvement Suggestion No: 3
#### Log Improvement Suggestion No: 4
#### Log Improvement Suggestion No: 5
#### Log Improvement Suggestion No: 6

@anuruddhal anuruddhal merged commit ceb98bb into wso2:icp2 Dec 18, 2025
3 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.

2 participants