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

Chore: refactor module catalog sync #2015

Open
4 tasks
Tomasz-Smelcerz-SAP opened this issue Nov 5, 2024 · 0 comments
Open
4 tasks

Chore: refactor module catalog sync #2015

Tomasz-Smelcerz-SAP opened this issue Nov 5, 2024 · 0 comments
Labels
area/quality Related to all activites around quality kind/feature Categorizes issue or PR as related to a new feature.

Comments

@Tomasz-Smelcerz-SAP
Copy link
Member

Description

The module catalog sync logic in internal/remote package was extended to sync ModuleReleaseMeta objects in addition to already supported ModuleTemplates.
The change was introduced by mostly copy-pasting existing logic and changing the object types and function names.
The package requires refactoring now for two main reasons:

  • Latest changes introduced a lot of code duplication
  • Internal structure of the package can be improved

Reasons

  • remove code duplication
  • Improve readability of the sync logic
  • Improve maintainability of the sync logic
  • Increase unit test coverage

Acceptance Criteria

  • Come up with a better object model for a "syncer". Current split is based on legacy code that was "mechanically" refactored by decoupling methods directly calling each other with intermediate interfaces. So the resulting structure is far from being optimal or even "good".
  • Re-use the sync code: the sync logic for 'ModuleTemplate' and 'ModuleReleaseMeta' is almost identical
  • Improve names of types and functions
  • Increase unit test coverage

Feature Testing

No response

Testing approach

Unit tests

Attachments

No response

@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 5, 2024
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP added the area/quality Related to all activites around quality label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Related to all activites around quality kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant