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

Better Versioning Of Resources #313

Open
Michaelpalacce opened this issue Jul 11, 2024 · 2 comments
Open

Better Versioning Of Resources #313

Michaelpalacce opened this issue Jul 11, 2024 · 2 comments
Labels
area/artifact-manager Relates to the `artifact-manager` maven module kind/refactor Refactoring of existing features lang/java Related to Java Code triage/blocked This issue is blocked by another, specified in the description

Comments

@Michaelpalacce
Copy link
Collaborator

Description

Changes to the APIs in different solutions lead to a lot of checks of which minor/patch version we are using of a specific API and then doing some complex conditionals inline at random places to trigger different logic. This should be improved.

**NOTE: This Issue is NOT related to major version changes, rather only for minor and patch versions! How major changes are handled is a part of #305

Proposed change

  • We need to separate parts of the business logic of specific stores away from the stores themselves and move it to a separate class
    • This class will be created by a Factory, given the version we want
    • Versioning will work by:
      • Add a map with versions pointing to Classess for that version
      • Have a default option for things that are unmatched
      • Versions will match up to a version, aka if you have version 8.8 everything under: 8.0...8.8 will get that specific Class
      • If you have a version 8.8 and 8.10, then 8.9 will go to 8.10
      • Each versioned class will essentially be a patch from the default one
    • The versioned classes returned by the factory will implement the strategy pattern and the stores will use the correct strategy based on what was returned by the factory.

Example of this in Typescript:

Client Map:
image


Example factory function:
image


Example Patch Class:
image
with the super:
image

@Michaelpalacce Michaelpalacce added lang/java Related to Java Code area/artifact-manager Relates to the `artifact-manager` maven module triage/needed Needs to be discussed by project maintainers kind/refactor Refactoring of existing features labels Jul 11, 2024
@Michaelpalacce Michaelpalacce modified the milestone: 3.0.0 Jul 11, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 16, 2024
@Michaelpalacce Michaelpalacce added triage/blocked This issue is blocked by another, specified in the description and removed Stale triage/needed Needs to be discussed by project maintainers labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/artifact-manager Relates to the `artifact-manager` maven module kind/refactor Refactoring of existing features lang/java Related to Java Code triage/blocked This issue is blocked by another, specified in the description
Projects
None yet
Development

No branches or pull requests

1 participant