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

Stop identifying group repositories as a single String #1173

Open
fuss86 opened this issue Apr 2, 2019 · 5 comments
Open

Stop identifying group repositories as a single String #1173

fuss86 opened this issue Apr 2, 2019 · 5 comments
Labels
enhancement GraceHopperOSD Issues suitable for the Grace Hopper 2020 hackfest

Comments

@fuss86
Copy link
Contributor

fuss86 commented Apr 2, 2019

Task Description

We have at least 3 places where we identify group repositories using String object:

  • org.carlspring.strongbox.storage.repository.Repository#getGroupRepositories
  • org.carlspring.strongbox.storage.repository.ImmutableRepository#groupRepositories
  • org.carlspring.strongbox.storage.repository.MutableRepository#groupRepositories

There are 2 possible values of this object:

  • when the group repository belongs to the same storage as the owner repository, we are using repositoryId as this String value.
  • when the group repository does not belong to the same storage as the owner repository, we are using storageId:repositoryId as this String value.

This is not obvious, introduces misunderstandings and should become more clear.

We should create structure(s) for group repositories. Group repository should always be identified by storageId and repositoryId. Also, we should drop ConfigurationManager#getStorageId and ConfigurationManager#getRepositoryId and ConfigurationManager#getRepository(java.lang.String)

After making the necessary changes, make sure the UI still works as expected (i.e. Storage Management and Routing Management)

Help

@carlspring
Copy link
Member

@sbespalov , @steve-todorov ,

What are your thoughts on this?

@fuss86
Copy link
Contributor Author

fuss86 commented Apr 14, 2019

Any progress, @akhil10x5 ?

@akhil10x5
Copy link
Contributor

Hi @fuss86, i did not pick up this issue. However regarding this, i tried few things earlier which did not work out but the changes were committed in a local branch which later got pushed to remote when i created a PR for another issue. I am not working on this anymore.

@fuss86
Copy link
Contributor Author

fuss86 commented Jun 11, 2019

What are your thoughts on this?

@sbespalov , @steve-todorov do you have any thoughts ? :)

@steve-todorov
Copy link
Member

Sorry for the late reply on this.

I agree with you - we should create a new object type which has the storageId and repositoryId fields. This should then be used across Strongbox in that format and we should always have both fields.

Another place where this is being used is the Routing and specially the Repositories part which holds the list of accepted/denied repositories.

Changes made here will result in some broken UI, so whoever has interest in picking this up should also fix the UI if possible (or ping me when this is ready)

@steve-todorov steve-todorov added the hacktoberfest Pre-selected issues for Hacktoberfest label Oct 16, 2019
@carlspring carlspring added the GraceHopperOSD Issues suitable for the Grace Hopper 2020 hackfest label Jun 23, 2020
@steve-todorov steve-todorov removed the hacktoberfest Pre-selected issues for Hacktoberfest label Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement GraceHopperOSD Issues suitable for the Grace Hopper 2020 hackfest
Projects
None yet
Development

No branches or pull requests

4 participants