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

Confusing terms and concepts: "directives" and "phases" #7533

Open
2 tasks done
lfavreli opened this issue Jun 15, 2024 · 0 comments
Open
2 tasks done

Confusing terms and concepts: "directives" and "phases" #7533

lfavreli opened this issue Jun 15, 2024 · 0 comments

Comments

@lfavreli
Copy link

Where is the problem?

https://docs.konghq.com/gateway/3.7.x/plugin-development/custom-logic/

What happened?

(Kong Gateway > Develop Custom Plugins > Implementing Custom Logic)

I'm not an Ningx/OpenResty® expert, but I find the use of the "Phase" term on this page confusing.

In the Available contexts table, all the links refer to "directives" rather than "phases", if we adopt the lua-nginx-module terminology. For example, according to the lua-nginx-module documentation:

  • "phase init_worker" in Kong -> stands for "starting-worker" phase and "init_worker_by_lua_*" directive
  • "phase rewrite" in Kong -> stands for "rewrite tail" phase and "rewrite_by_lua_*" directive
  • "phase access" in Kong -> stands for "access tail" phase and "access_by_lua_*" directive
  • ...

An other issue concerns the "reponse" function, for which the phase is "access". However, according to the description, it replaces "header_filter()" and "body_filter()". As shown in the diagram in the Directives section, they are part of "Content Phase", not "Access Phase". This seems to be a mistake.

What did you expect to happen?

What could be preferred:

  1. Standardize terminology and retain in Kong's documentation only the four main phases described in the lua-nginx-module diagram: Initialization Phase, Rewrite/Access Phase, Content Phase, Log Phase.
  2. Replace the term "Phase" by "Directive", and continue to link to each of the lua-nginx-module directives.
  3. Another thing?

In any case, I think there's something to clear up! 😀

Hope this helps! 🙏

Code of Conduct and Community Expectations

  • I agree to follow this project's Code of Conduct
  • I agree to abide by the Community Expectations
@lfavreli lfavreli changed the title Mixing directives and phases Confusing terms and concepts: "directives" and "phases" Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant