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

Circular dependency in v3.0.0 prevents webhook from working #1044

Open
gtjoseph opened this issue Feb 22, 2024 · 1 comment · May be fixed by #1045
Open

Circular dependency in v3.0.0 prevents webhook from working #1044

gtjoseph opened this issue Feb 22, 2024 · 1 comment · May be fixed by #1045

Comments

@gtjoseph
Copy link

URL to the linked Repository or Organization

https://github.com/

Steps to reproduce the problem

  1. Open a pull request

What is the expected result?

The check shows status of CLA signature

What happens instead?

The check shows:
license/cla Expected — Waiting for status to be reported
permanently

Any other information? (attach screenshot if possible)

The server shows the following error:

(node:2108508) Warning: Accessing non-existent property 'get' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:787:11)
    at Object.get (node:internal/modules/cjs/loader:803:5)
    at RepoService.getPRCommitters (/usr/src/cla-assistant/cla-assistant/src/server/src/services/repo.js:365:47)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async updateStatusAndComment (/usr/src/cla-assistant/cla-assistant/src/server/src/webhooks/pull_request.js:67:28)

Used browser and browser version?

Any other tested browsers/devices(OK/FAIL):

@gtjoseph
Copy link
Author

A little more investigation shows that the issue is that src/server/src/services/webhook.js requires repo.js which in turn requires webhook.js. repo.js also requires org.js which in turn also requires webhook.js.

gtjoseph added a commit to asterisk/cla-assistant that referenced this issue Feb 22, 2024
There was a circular dependency between repo, org and webhook
that prevented webhook calls from GitHub from being serviced.
Merging those files together resolves the circular dependency.

Resolves: cla-assistant#1044
gtjoseph added a commit to asterisk/cla-assistant that referenced this issue Feb 23, 2024
There was a circular dependency between repo, org and webhook
that prevented webhook calls from GitHub from being serviced.
Merging those files together resolves the circular dependency.

Resolves: cla-assistant#1044
gtjoseph added a commit to asterisk/cla-assistant that referenced this issue Feb 23, 2024
There was a circular dependency between repo, org and webhook
that prevented webhook calls from GitHub from being serviced.
Merging those files together resolves the circular dependency.

Resolves: cla-assistant#1044
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

Successfully merging a pull request may close this issue.

1 participant