Skip to content

support load .env config from nacos #18186

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No 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? No Sign in to your account

Merged
merged 10 commits into from
Apr 22, 2025

Conversation

shiyiyue1102
Copy link
Contributor

@shiyiyue1102 shiyiyue1102 commented Apr 16, 2025

Summary

support load .env config from nacos

Similar to #11210

Resolved #11064

Tip

Close issue syntax: Fixes #<issue number> or Resolves #<issue number>, see documentation for more details.

Screenshots

Before After
... ...

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 💪 enhancement New feature or request labels Apr 16, 2025
@crazywoola crazywoola requested a review from laipz8200 April 16, 2025 09:18
@crazywoola
Copy link
Member

Please fix the tests in CI

@laipz8200 laipz8200 requested a review from Copilot April 16, 2025 09:38
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

@laipz8200 laipz8200 requested a review from Copilot April 16, 2025 09:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

api/configs/remote_settings_sources/nacos/utils.py:2

  • [nitpick] The use of 'self' as the first parameter in this standalone function is potentially confusing. Consider renaming it to something more appropriate (e.g. 'content_parser' if needed) or refactoring this logic as a static method.
def _parse_config(self, content: str) -> dict[str, str]:

api/configs/remote_settings_sources/nacos/init.py:37

  • [nitpick] The log message tag '[get-access-token]' is misleading in the context of the async initialization of the settings source. Consider updating it to reflect that the error occurred during Nacos config fetching.
logger.exception("[get-access-token] exception occurred")

@shiyiyue1102
Copy link
Contributor Author

shiyiyue1102 commented Apr 22, 2025

Why hasn't CI been running even after a day has passed? @crazywoola

@crazywoola crazywoola closed this Apr 22, 2025
@crazywoola crazywoola reopened this Apr 22, 2025
@crazywoola
Copy link
Member

Not sure about the CI pipeline, I have closed it and reopen the PR again.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 22, 2025
@crazywoola crazywoola merged commit 8e6ea4d into langgenius:main Apr 22, 2025
7 checks passed
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
💪 enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.env configuration pull from "configuration center"
2 participants