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

Refactor getting plugin related Kong entities in Kong state to store pointers to the entities #6115

Open
2 of 4 tasks
randmonkey opened this issue Jun 3, 2024 · 0 comments
Labels
area/debt area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality.

Comments

@randmonkey
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Does this enhancement require public documentation?

  • I have added an Acceptance Criteria item for adding and/or adjusting public documentation (if applicable)

Problem Statement

Finding referred Kong entities (service/route/consumer/...) of custom entities requires to find related entities of plugins and generating IDs for the entities. Since the existing method of getting related entities of plugins in building plugins only gets "names" of identifiers, we implemented a separate method to satisfy it to prevent significant change in the existing part.
To reduce the duplicated work and clearer code, we should refactor the building of plugin relationships and share the result in the two parts that uses them.

Proposed Solution

  • Refactor the building of plugin related entities and store the pointer to the entities in the result for further usage
  • Share the result to let all parts in building kong state using the result

Additional information

No response

Acceptance Criteria

  • Result of buildPluginRels method to get related entities of a Kong plugin can be shared between all parts of building full KongState
  • Result of related entities can store the pointer of the entity
@randmonkey randmonkey added area/debt area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/debt area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality.
Projects
None yet
Development

No branches or pull requests

1 participant