Skip to content

Feature/create api marketplace metrics#37

Draft
jordivx wants to merge 20 commits into
developfrom
feature/create-api-marketplace-metrics
Draft

Feature/create api marketplace metrics#37
jordivx wants to merge 20 commits into
developfrom
feature/create-api-marketplace-metrics

Conversation

@jordivx

@jordivx jordivx commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@jordivx jordivx requested a review from jorge-romero June 18, 2026 07:41
@github-actions

Copy link
Copy Markdown

📊 Static Analysis Summary

🔍 Code Quality Checks

  • ✅ JaCoCo coverage report generated

📦 Download detailed reports from the workflow artifacts.

1 similar comment
@github-actions

Copy link
Copy Markdown

📊 Static Analysis Summary

🔍 Code Quality Checks

  • ✅ JaCoCo coverage report generated

📦 Download detailed reports from the workflow artifacts.

@jordivx jordivx marked this pull request as draft June 25, 2026 07:13
@jordivx jordivx force-pushed the feature/create-api-marketplace-metrics branch from 302e7ed to a069870 Compare June 25, 2026 07:34
@github-actions

Copy link
Copy Markdown

📊 Static Analysis Summary

🔍 Code Quality Checks

  • ✅ JaCoCo coverage report generated

📦 Download detailed reports from the workflow artifacts.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

📊 Static Analysis Summary

🔍 Code Quality Checks

  • ✅ JaCoCo coverage report generated

📦 Download detailed reports from the workflow artifacts.

@jorge-romero jorge-romero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Please move your version to v0.0.4, as we are delivering the v0.0.3 now :-)
  • Remove autogenerated by OpenAPI classes like MarketplaceMetricsApi.java and the model (if it comes with the next PR I could assume to have it. It includes the API and the service
  • We are missing controller tests.

Comment thread api-marketplace-metrics/openapi/api-marketplace-metrics.yaml Outdated
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

📊 Static Analysis Summary

🔍 Code Quality Checks

  • ✅ JaCoCo coverage report generated

📦 Download detailed reports from the workflow artifacts.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

📊 Static Analysis Summary

🔍 Code Quality Checks

  • ✅ JaCoCo coverage report generated

📦 Download detailed reports from the workflow artifacts.

1 similar comment
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

📊 Static Analysis Summary

🔍 Code Quality Checks

  • ✅ JaCoCo coverage report generated

📦 Download detailed reports from the workflow artifacts.

Co-authored-by: Vila,Jordi (IT EDP) <jordi.vila@boehringer-ingelheim.com>
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
2 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

📊 Static Analysis Summary

🔍 Code Quality Checks

  • ✅ JaCoCo coverage report generated

📦 Download detailed reports from the workflow artifacts.

}

@SuppressWarnings("unchecked")
private static <E extends Throwable, R> R sneakyThrow(Throwable e) throws E {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please check if an error 500 is throw properly as this trick maybe is not capture by spring mvc or any restcontroller advice and just an error 500 is propagated.


MarketplaceMetricsFacade marketplaceMetricsFacade;

@CrossOrigin(origins = "*")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Check this please, we should use a centralized cors configuration

@@ -0,0 +1,12 @@
package org.opendevstack.apiservice.core.security.client.crendentials;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I assume that is a typo crendentials instead of credentials in the package name

return getProjectComponent(getDefaultInstance(), projectId, componentId);
}

public ProjectComponentListResponse getAllProjectComponents(String instanceName, Integer page, Integer size) throws MarketplaceException {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add the @ override so if the interface changes we notice that something happened

}
}

public ProjectComponentListResponse getAllProjectComponents(Integer page, Integer size) throws MarketplaceException {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same about override

log.debug("Marketplace service GET all catalog items in instance {} ", instanceName);

try {
MarketplaceApiClient marketplaceClient = getOboAuthenticatedClient(instanceName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this is for the metrics, the endpoint is used by another platform, not by an user, so the OBO flow should not work here.

ApiClient apiClient = marketplaceClient.getApiClient();
CatalogItemsApi catalogItemsApi = new CatalogItemsApi(apiClient);

apiClient.setBasePath(marketplaceClient.getConfig().getProjectComponentsBaseUrl());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The call should be paginated, check how is done with the products.
The end point should be paginated.

public ResponseEntity<MarketplaceCatalogItemsMetrics> getMarketplaceCatalogItemsMetrics() {
MarketplaceCatalogItemsMetrics catalogItemsMetrics;
try {
catalogItemsMetrics = marketplaceMetricsFacade.getMarketplaceCatalogItemsMetrics();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MarketplaceCatalogItemsMetrics has pagination but marketplaceMetricsFacade.getMarketplaceCatalogItemsMetrics not

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