apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code
https://dolphinscheduler.apache.org/
Apache License 2.0
12.93k stars 4.64k forks source link

[Question] [DAO] Application failed to start when active profile was set other than mysql/h2/postgresql #16839

Closed FakeTrader closed 3 days ago

FakeTrader commented 4 days ago

Search before asking

What happened

***************************
APPLICATION FAILED TO START
***************************

Description:

Field daoPluginConfiguration in org.apache.dolphinscheduler.dao.DaoConfiguration required a bean of type 'org.apache.dolphinscheduler.dao.plugin.api.DaoPluginConfiguration' that could not be found.

The injection point has the following annotations:
    - @org.springframework.beans.factory.annotation.Autowired(required=true)

Action:

Consider defining a bean of type 'org.apache.dolphinscheduler.dao.plugin.api.DaoPluginConfiguration' in your configuration.

What you expected to happen

Start application normally

How to reproduce

  1. create a local configuration file application-local.yaml, set active profile to local, application failed to start.
  2. change file name to application-mysql.yaml, set active profile to mysql, application started successfully.

Anything else

It seems the dao plugin checkes the profile and hardcodes as "mysql", "postgresql" and "h2", only loading the configuration when environment condition is met in org.apache.dolphinscheduler.dao.plugin.api.DatabaseEnvironmentCondition.

Version

3.2.x

Are you willing to submit PR?

Code of Conduct

SbloodyS commented 4 days ago

Can you describe what you what to do?

FakeTrader commented 4 days ago

Would like to create some profiles (dev/test/prod) so I can customize configurations for different environments.

SbloodyS commented 4 days ago

Since the current mysql profile is bound with many configurations, it is not recommended to change the configuration file to be compatible with different environments. You can create a profile with the same name and different contents for each environment to use in different environments.