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(globalpatches): moved require kong.constants to the closure #12328

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

ms2008
Copy link
Contributor

@ms2008 ms2008 commented Jan 10, 2024

Summary

This is necessary because EE has changed package.path in this closure, and if we continue leave that in the top-level scope of this file, EE's e2e test will report the following error:

stack traceback:
	/usr/local/share/lua/5.1/kong/constants.lua:8: in main chunk
	[C]: in function 'require'
	/usr/local/share/lua/5.1/kong/globalpatches.lua:8: in main chunk
	[C]: in function 'require'
	/usr/local/bin/kong:6: in function 'file_gen'
	init_worker_by_lua(nginx.conf:118):46: in function <init_worker_by_lua(nginx.conf:118):44>
	[C]: in function 'xpcall'
	init_worker_by_lua(nginx.conf:118):53: in function <init_worker_by_lua(nginx.conf:118):51>

Checklist

  • NA The Pull Request has tests
  • NA A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • NA There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

This is necessary because EE has changed `package.path` in this closure,
and we continue leave that at the top level of this file, EE's e2e
test will report the following error:

```
stack traceback:
        /usr/local/share/lua/5.1/kong/constants.lua:8: in main chunk
        [C]: in function 'require'
        /usr/local/share/lua/5.1/kong/globalpatches.lua:8: in main chunk
        [C]: in function 'require'
        /usr/local/bin/kong:6: in function 'file_gen'
        init_worker_by_lua(nginx.conf:118):46: in function <init_worker_by_lua(nginx.conf:118):44>
        [C]: in function 'xpcall'
        init_worker_by_lua(nginx.conf:118):53: in function <init_worker_by_lua(nginx.conf:118):51>
```
@windmgc windmgc merged commit f955b6e into master Jan 11, 2024
34 of 36 checks passed
@windmgc windmgc deleted the chore/globalpatches branch January 11, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants