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

Updated to app-services-sdk-go in Core SDK #1664

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jackdelahunt
Copy link
Contributor

@jackdelahunt jackdelahunt commented Mar 24, 2023

Description

This PR updates the location and version of the app-services-sdk-go used. The old package used here is now deprecated and is being replaced by the Core SDK.

Verification Steps

  • Check if all unit tests and linting has passed

Checklist (Definition of Done)

  • All acceptance criteria specified in JIRA have been completed
  • CI and all relevant tests are passing
  • Code Review completed
  • Verified independently by reviewer
  • All PR comments are resolved either by addressing them or creating follow up tasks

@jackdelahunt jackdelahunt requested review from a team as code owners March 24, 2023 10:45
@jackdelahunt jackdelahunt changed the title WIP chore: updated to app-services-sdk-go in Core SDK WIP Updated to app-services-sdk-go in Core SDK Mar 24, 2023
@@ -42,7 +42,7 @@ require (
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0
github.com/prometheus/common v0.42.0
github.com/redhat-developer/app-services-sdk-go/serviceaccounts v0.4.0
github.com/redhat-developer/app-services-sdk-core/app-services-sdk-go/serviceaccountmgmt v0.0.0-20230323122535-49460b57cc45
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR. Quick question, there is no tag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we are now publishing all packages in the SDK in one release the tag no longer points to the version (as that is the version of the parent project) but the commit/tag of the latest service account version.

Does that make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I am trying to understand more. Does it mean that the tag 1.0.1 can't be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but it is pointing to v1.0.1 just the tag is not it

Copy link
Contributor

Choose a reason for hiding this comment

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

What I was proposing is not to include the subpackage, but the whole package.
But I see you don't perform tagging at the module level. I wonder if what you are doing is in line with how Go module version management should be performed. The way it is being done users will never be able to use a specific module version via tag.
Maybe what you want are submodules, or not having tags per package (ocm sdk go doesn't do that for example)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes they won't be able to set a specific tag, I am not sure what you mean by the rest of the comment.

What I was proposing is not to include the subpackage, but the whole package

I think this would be ideal but the rest of teh SDKs are structured like this and this is how the generator generates the code. There may be a way to change this but I will need to look into it. As for including only the top level module, I believe this still wouldn't fix the issue of not being able to specify the tag as the top level module is still a sub directory of the repo

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this would be ideal but the rest of teh SDKs are structured like this and this is how the generator generates the code.
What are the "rest of the SDKs"?

There may be a way to change this but I will need to look into it
👍

As for including only the top level module, I believe this still wouldn't fix the issue of not being able to specify the tag as the top level module is still a sub directory of the repo

Not having tags per "subdirectory" would be an approach. ocm sdk go doesn't do that for example, although it contains multiple subdirectories pertaining to different parts of the sdk.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What are the "rest of the SDKs"?

The TS, Java and Python SDKs

ocm sdk go doesn't do that for example

Yes looking at ocm-sdk-go it just contains subdirectories for each service, this is different to use as they are different modules

Copy link
Contributor

Choose a reason for hiding this comment

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

ping @jackdelahunt and @miguelsorianod to see if we reached a conclusion regarding the path forward for this PR.

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #1664 (33bc316) into main (ce2958d) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1664   +/-   ##
=======================================
  Coverage   82.26%   82.26%           
=======================================
  Files         161      161           
  Lines       14989    14989           
=======================================
  Hits        12330    12330           
  Misses       2223     2223           
  Partials      436      436           
Flag Coverage Δ
unittests 82.26% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/services/sso/redhatsso_service.go 71.62% <ø> (ø)
pkg/client/redhatsso/client.go 89.93% <100.00%> (ø)

@jackdelahunt jackdelahunt changed the title WIP Updated to app-services-sdk-go in Core SDK Updated to app-services-sdk-go in Core SDK Mar 24, 2023
@machi1990
Copy link
Contributor

@jackdelahunt can you rebase?

Copy link
Contributor

@machi1990 machi1990 left a comment

Choose a reason for hiding this comment

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

thanks for the PR, it needs a rebase @jackdelahunt

@jackdelahunt
Copy link
Contributor Author

jackdelahunt commented Mar 27, 2023

it needs a rebase

Done 👍

Copy link
Contributor

@miguelsorianod miguelsorianod left a comment

Choose a reason for hiding this comment

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

@machi1990
Copy link
Contributor

ping @jackdelahunt for a rebase

@jackdelahunt
Copy link
Contributor Author

@machi1990 done 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants