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

[Bug]: Inconsistent Behavior during Hot Reload for changes in Runtime Section of the config. #2392

Closed
1 task done
abhishekkumams opened this issue Sep 24, 2024 · 2 comments
Assignees
Labels
bug Something isn't working 🔥Hot Reload Tasks related to DAB's Hot Reload feature proposal triage issues to be triaged

Comments

@abhishekkumams
Copy link
Contributor

What happened?

Summary:

When using the Hot Reload feature to update the Runtime section of the configuration, the system does not properly refresh all objects. This leads to inconsistent behavior, specifically resulting in "resource not found" errors after re-enabling REST/GraphQL endpoints.

Steps to Reproduce:

  1. Start the engine and verify that both REST and GraphQL endpoints are accessible.
  2. Update the configuration to disable REST/GraphQL in the Runtime section.
  3. Observe that the engine reloads and both REST and GraphQL endpoints become inaccessible as expected.
  4. Update the configuration again to re-enable REST/GraphQL.
  5. Attempt to query the REST and GraphQL endpoints.

Observed Behavior:

After re-enabling REST/GraphQL, the endpoints are accessible, but querying them results in "resource not found" errors.

Expected Behavior:

After re-enabling REST/GraphQL, the endpoints should be fully functional and return the expected resources without errors.

Thoughts:

The issue appears to be related to the incomplete refresh of internal objects during the Hot Reload process. When the configuration is updated to re-enable REST/GraphQL, some objects or states are not properly re-initialized, leading to the "resource not found" errors.

Possible Root Causes:

Incomplete State Reset: Certain internal states or objects are not fully reset or re-initialized during the Hot Reload process.
Dependency Injection: Services or dependencies related to REST/GraphQL might not be properly re-injected or re-configured.

Attachments:

  1. REST response (after re-enabling)
    image

  2. GraphQL response (after re-enabling)
    image

Version

main

What database are you using?

Azure SQL

What hosting model are you using?

Local (including CLI)

Which API approach are you accessing DAB through?

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@abhishekkumams abhishekkumams added bug Something isn't working triage issues to be triaged 🔥Hot Reload Tasks related to DAB's Hot Reload feature proposal labels Sep 24, 2024
@seantleonard
Copy link
Contributor

isn't this due to pending completion of #2324?

@abhishekkumams
Copy link
Contributor Author

isn't this due to pending completion of #2324?

It shouldn't be because in this case we are not adding or removing any entities. We are just enabling/disabling global endpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🔥Hot Reload Tasks related to DAB's Hot Reload feature proposal triage issues to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants