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

feat: As a user, I want to refactor the resources under apisix.admin, so that we don't need to repeat #8569

Closed
spacewander opened this issue Dec 26, 2022 · 3 comments · Fixed by #8611, #8661 or #8911
Assignees

Comments

@spacewander
Copy link
Member

Description

Currently, all the resources under apisix.admin are basically copied and pasted from a template and changed. If you make general changes to the resource, such as fix count or add adapter, you need to change it file by file. And due to historical problems, some resource implementation methods are incomplete.
I hope we can refactor the code to something like core.config.new, where we only need to pass a few parameters to create a new resource.

Note: Please read every resource file before jumping into the refactor. Some resources have particular logic. We need a smart way to handle them.

CC @An-DJ

@An-DJ
Copy link
Contributor

An-DJ commented Jan 6, 2023

I think we can refactor the resources one by one:

@spacewander
Copy link
Member Author

We can use fewer PRs to implement it. The refactor progress can be faster after several PRs as we will have a stable foundation.

What about refactoring 2~3 resources in the upcoming PR?

@An-DJ
Copy link
Contributor

An-DJ commented Feb 16, 2023

The plugins is structurally different from other resources.

Maybe it is NOT need to be refactored. @spacewander Can we remove it from the list?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment