Skip to content

Conversation

@SammyOina
Copy link
Contributor

@SammyOina SammyOina commented Mar 31, 2025

What type of PR is this?

This is a refactor of sdk methods

What does this do?

This PR introduces distributed tracing support by passing context to all SDK calls in the CLI commands and updates mock generation versions.

  • Update SDK calls to include context by using cmd.Context() in all CLI files
  • Upgrade mockery generated files from v2.43.2 to v2.53.2
  • Update the GitHub workflow to align with the new mockery version

Which issue(s) does this PR fix/relate to?

  • Related Issue #
  • Resolves #

Have you included tests for your changes?

Did you document any new/modified feature?

Notes

@SammyOina SammyOina requested a review from a team as a code owner March 31, 2025 11:21
@SammyOina SammyOina requested a review from Copilot March 31, 2025 11:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces distributed tracing support by passing context to all SDK calls in the CLI commands and updates mock generation versions.

  • Update SDK calls to include context by using cmd.Context() in all CLI files
  • Upgrade mockery generated files from v2.43.2 to v2.53.2
  • Update the GitHub workflow to align with the new mockery version

Reviewed Changes

Copilot reviewed 82 out of 82 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cli/clients.go Added context parameter to multiple SDK calls
cli/channels.go Added context parameter to multiple SDK calls
cli/certs.go Added context parameter to multiple SDK calls
channels/private/mocks/service.go Updated mockery version in generated header
channels/mocks/service.go Updated mockery version in generated header
channels/mocks/repository.go Updated mockery version in generated header
channels/mocks/channels_client.go Updated mockery version in generated header
certs/service.go Reordered parameters to pass context when retrieving clients
certs/mocks/service.go Updated mockery version in generated header
certs/mocks/pki.go Updated mockery version in generated header
auth/mocks/token_client.go Updated mockery version in generated header
auth/mocks/service.go Updated mockery version in generated header
auth/mocks/patsrepo.go Updated mockery version in generated header
auth/mocks/pats.go Updated mockery version in generated header
auth/mocks/keys.go Updated mockery version in generated header
auth/mocks/hasher.go Updated mockery version in generated header
auth/mocks/callback.go Updated mockery version in generated header
auth/mocks/cache.go Updated mockery version in generated header
auth/mocks/authz.go Updated mockery version in generated header
.github/workflows/check-generated-files.yaml Updated mockery version used to check generated files

@dborovcanin
Copy link
Collaborator

@SammyOina Please resolve conflicts.

@SammyOina SammyOina force-pushed the sdk-req-context branch 2 times, most recently from e075e8c to 65fb59c Compare April 1, 2025 19:14
@dborovcanin
Copy link
Collaborator

Please fix the CI.

Signed-off-by: Sammy Oina <sammyoina@gmail.com>
…for clientID

Signed-off-by: Sammy Oina <sammyoina@gmail.com>
…proved accuracy

Signed-off-by: Sammy Oina <sammyoina@gmail.com>
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
… for improved accuracy

Signed-off-by: Sammy Oina <sammyoina@gmail.com>
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
…proved accuracy

Signed-off-by: Sammy Oina <sammyoina@gmail.com>
@codecov
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

Attention: Patch coverage is 93.05211% with 28 lines in your changes missing coverage. Please review.

Project coverage is 31.06%. Comparing base (12b41e3) to head (1046d21).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cli/clients.go 76.92% 2 Missing and 4 partials ⚠️
cli/groups.go 73.68% 1 Missing and 4 partials ⚠️
cli/domains.go 81.81% 2 Missing and 2 partials ⚠️
cli/users.go 88.88% 2 Missing ⚠️
pkg/sdk/channels.go 94.11% 2 Missing ⚠️
pkg/sdk/clients.go 96.42% 2 Missing ⚠️
pkg/sdk/domains.go 95.65% 2 Missing ⚠️
pkg/sdk/groups.go 96.66% 2 Missing ⚠️
pkg/sdk/roles.go 93.33% 2 Missing ⚠️
cli/channels.go 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2783      +/-   ##
==========================================
+ Coverage   27.56%   31.06%   +3.49%     
==========================================
  Files         351       65     -286     
  Lines       55271    15164   -40107     
==========================================
- Hits        15234     4710   -10524     
+ Misses      39287    10205   -29082     
+ Partials      750      249     -501     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dborovcanin dborovcanin merged commit 340098c into absmach:main Apr 1, 2025
7 of 8 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