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

[ISSUE #2576] Tweak Convert's code framework, for ease of enhancement #2784

Merged
merged 1 commit into from
Jan 1, 2023

Conversation

eight-nines
Copy link
Contributor

Fixes #2576.

Motivation

Enhancement the config manage for project

Modifications

[1] Split the converter classes in Convert into separate files
[2] Add the converter field to ConfigFiled, used to specify the converter class of the field

Documentation

  • Does this pull request introduce a new feature? no

[1] Split the converter classes in Convert into separate files
[2] Add the converter field to ConfigFiled, used to specify the converter class of the field
@eight-nines eight-nines reopened this Jan 1, 2023
@codecov
Copy link

codecov bot commented Jan 1, 2023

Codecov Report

Merging #2784 (2812bf7) into config-manage-improve (027ebd5) will increase coverage by 0.12%.
The diff coverage is 54.30%.

@@                     Coverage Diff                     @@
##             config-manage-improve    #2784      +/-   ##
===========================================================
+ Coverage                    12.59%   12.71%   +0.12%     
- Complexity                     932      979      +47     
===========================================================
  Files                          488      502      +14     
  Lines                        28465    28515      +50     
  Branches                      3053     3045       -8     
===========================================================
+ Hits                          3585     3627      +42     
- Misses                       24565    24575      +10     
+ Partials                       315      313       -2     
Impacted Files Coverage Δ
.../common/config/convert/converter/MapConverter.java 5.55% <5.55%> (ø)
.../config/convert/converter/PropertiesConverter.java 12.50% <12.50%> (ø)
...common/config/convert/converter/DateConverter.java 20.00% <20.00%> (ø)
...common/config/convert/converter/EnumConverter.java 25.00% <25.00%> (ø)
...n/config/convert/converter/IPAddressConverter.java 25.00% <25.00%> (ø)
...n/config/convert/converter/LocalDateConverter.java 25.00% <25.00%> (ø)
...nfig/convert/converter/LocalDateTimeConverter.java 25.00% <25.00%> (ø)
.../eventmesh/common/config/convert/ConvertValue.java 50.00% <50.00%> (ø)
...onfig/convert/converter/BaseDataTypeConverter.java 52.38% <52.38%> (ø)
...common/config/convert/converter/ListConverter.java 57.69% <57.69%> (ø)
... and 6 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jonyangx jonyangx merged commit dc24ad3 into apache:config-manage-improve Jan 1, 2023
@eight-nines eight-nines changed the title Tweak Convert's code framework, for ease of enhancement [ISSUE #2576] Tweak Convert's code framework, for ease of enhancement Jan 1, 2023
jonyangx pushed a commit that referenced this pull request Jan 14, 2023
* [ISSUE #2576]Enhancement the config manage for project

* [1] test code

* EventMeshServer config improve

* Extract the key prefix of the @configFiled field into @config

* Improve configuration management of SPI implementations
[1] config improve of RocketMQProducerImpl and RocketMQConsumerImpl
[2] config UT of RocketMQProducerImpl and RocketMQConsumerImpl

* Improve configuration management of SPI implementations
[1] extensionInstance config init process improve
[2] RocketMQProducerImpl and RocketMQConsumerImpl config UT improve

* Improve configuration management of Kafka SPI Impl
[1] KafkaConsumerImpl and KafkaProducerImpl config improve
[2] KafkaConsumerImpl and KafkaProducerImpl config UT

* Improve configuration management of Redis SPI Impl
[1] RedisProperties config improve

* Improve configuration management of Redis SPI Impl
[1] RedisProperties config and UT improve
[2] New parser ConvertProperties
[3] To fix a bug where parser convertEnum could not parse null values

* Fix config UT of Redis SPI Impl

* Tweak Convert's code framework, for ease of enhancement (#2784)

[1] Split the converter classes in Convert into separate files
[2] Add the converter field to ConfigFiled, used to specify the converter class of the field

* Improve configuration management of Knative SPI Impl (#2791)

[1] KnativeConsumerImpl and KnativeProducerImpl config improve
[2] KnativeConsumerImpl and KnativeProducerImpl config UT

* Improve configuration management of Pravega SPI Impl

[1] PravegaConsumerImpl and PravegaProducerImpl config improve
[2] PravegaConsumerImpl and PravegaProducerImpl config UT
[3] add new converter URIConverter

* Improve configuration management of Pulsar SPI Impl

[1] PulsarConsumerImpl and PulsarProducerImpl config improve
[2] PulsarConsumerImpl and PulsarProducerImpl config UT

* Improve configuration management of Rabbitmq SPI Impl

[1] RabbitmqConsumer and RabbitmqProducer config improve
[2] RabbitmqConsumer and RabbitmqProducer config UT

* Improve configuration management of Prometheus SPI Impl

[1] PrometheusMetricsRegistry config improve
[2] PrometheusMetricsRegistry config UT

* Improve configuration management of AuthHttpBasic SPI Impl

[1] AuthHttpBasicService config improve
[2] AuthHttpBasicService config UT

* Enhance configuration management capabilities - @configFiled

[1] Add two properties to @configFiled,findEnv / notNull, and the configuration file parsing capabilities that go with them
[2] Delete @NotNull and replace it with @ConfigFiled.notNull

* Improve configuration management of Pinpoint SPI Impl

[1] PinpointTraceService config improve
[2] PinpointTraceService config UT

* Improve configuration management of Zipkin SPI Impl

[1] ZipkinTraceService config improve
[2] ZipkinTraceService config UT

* Add repeatable functionality to @config

For tagging multiple configuration fields on a class

* Improve configuration management of TracePlugin

[1] ExporterConfiguration config improve
[2] ExporterConfiguration config UT

* Improve configuration management of WebHook

[1] WebHook config improve
[2] WebHook config UT

* Add field beNumber for @configFiled

[1] If String config field not a number, an exception is thrown

* Change the configuration management class CommonConfiguration to a new framework

[1] Replace the CommonConfiguration field modifier public with private
[2] Use getter/setter methods to access it

* Change CommonConfiguration subclass to new framework

[1] EventMeshHTTPConfiguration/EventMeshGrpcConfiguration/EventMeshTCPConfiguration

* Change CommonConfiguration and subclass to new framework

[1] EventMeshHTTPConfiguration/EventMeshGrpcConfiguration/EventMeshTCPConfiguration

* Add field notEmpty for @configFiled

[1] If it cannot be empty but is empty, an exception is thrown

* Change the SPI RocketMQ config to new framework

* Change the SPI kafka config to new framework

* Change the SPI Redis config to new framework

* Change the SPI knative config to new framework

* Change the SPI pravega config to new framework

* Change the SPI pulsar config to new framework

* Change the SPI rabbitmq config to new framework

* Change the SPI Prometheus config to new framework

* Change the SPI auth-http-basic config to new framework

* Change the SPI trace-api config to new framework

* Change the SPI pinpoint config to new framework

* Change the SPI zipkin config to new framework

* Use getter/setter methods to access EventMeshGrpcConfiguration

* Use getter/setter methods to access EventMeshHTTPConfiguration

* Enhanced Configuration management

* remove temporary blocking @ignore

* fix styleCheck

* fix UT

* rename ConfigService method

* Revision review comments

* Fixed code review comments
[1] save the last accessible status of reflection field and recovery it after custom operation

* Fixed code review comments
[1] CLASS_PATH_PREFIX/FILE_PATH_PREFIX constants optimization
[2] Some other code details optimization

* Fixed code review comments
[1] add UT for ConfigService#getConfig(ConfigInfo configInfo)

Co-authored-by: githublaohu <2372554140@qq.com>
Co-authored-by: mike_xwm <mike_xwm@126.com>
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 this pull request may close these issues.

2 participants