-
Notifications
You must be signed in to change notification settings - Fork 202
feat(server): autodiscovery circuit breaker call #8022
Conversation
@squakez The bot could not transition the ticket automatically, please update this Jira ticket manually: https://issues.redhat.com/browse/ENTESB-12498 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few nits, nothing major.
I think that the metadata retrieval should be done on POST
not on GET
via an explicit endpoint for it. Otherwise we introduce a cascade of requests. The GET
for connector by ID is invoked multiple times by the UI, not at all times do we wish to fetch the metadata as well.
I think we have an opportunity to redefine the API interface on syndesis-meta; it could be simpler to have one endpoint for fetching the metadata for both connector and action properties. Having the distinction between the two can be done in the connector metadata extension implementation.
app/common/model/src/main/java/io/syndesis/common/model/connection/ConfigurationProperty.java
Outdated
Show resolved
Hide resolved
app/common/model/src/main/java/io/syndesis/common/model/connection/ConfigurationProperty.java
Outdated
Show resolved
Hide resolved
app/common/model/src/main/java/io/syndesis/common/model/connection/DynamicActionMetadata.java
Outdated
Show resolved
Hide resolved
...l/src/main/java/io/syndesis/common/model/connection/DynamicConnectionPropertiesMetadata.java
Outdated
Show resolved
Hide resolved
app/common/model/src/main/java/io/syndesis/common/model/connection/WithDynamicProperties.java
Outdated
Show resolved
Hide resolved
@@ -129,7 +127,7 @@ public Connector get(final String id) { | |||
|
|||
// Retrieve dynamic properties, if connector is dynamic | |||
if (connector.getTags().contains("dynamic")) { | |||
connector = enrichWithDynamicProperties(connector); | |||
connector = enrichConnectorWithDynamicProperties(connector); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove this from the GET /connectors/{id}
. I'd like the retrieval of dynamic metadata, i.e. invoking of the syndesis-meta service to be tied to an explicit request from the UI for it, not in every case when the connector is fetched.
GET
requests should be idempotent and should not have side effects, this will endanger that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, though it would be out the scope of the request for this PR (circuit breaker). I have created further issue to take care of this refactory #8023 separately. Are you okey to proceed like this?
Also, from performance perspective, right now the "enriching" call is conditioned to the presence of a tag that we are configuring on the connectors which use this feature.
34b1cdb
to
b6d4048
Compare
* Added circuit breaker instead of plain REST call to meta connection properties * Refactored common-model to add dynamic metadata modeling * Refactored MetadataCommand to be used as abstract base for MetadataCommandAction and MetadataConnectionPropertiesCommand * Refactored unit test to use DynamicConnectionPropertiesMetadata instead of raw Response * Removed useless pom dependencies Closes ENTESB-12498
b6d4048
to
bf81249
Compare
@squakez The bot could not transition the ticket automatically, please update this Jira ticket manually: https://issues.redhat.com/browse/ENTESB-12498 |
* Added circuit breaker instead of plain REST call to meta connection properties * Refactored common-model to add dynamic metadata modeling * Refactored MetadataCommand to be used as abstract base for MetadataCommandAction and MetadataConnectionPropertiesCommand * Refactored unit test to use DynamicConnectionPropertiesMetadata instead of raw Response * Removed useless pom dependencies Closes ENTESB-12498
* Added circuit breaker instead of plain REST call to meta connection properties * Refactored common-model to add dynamic metadata modeling * Refactored MetadataCommand to be used as abstract base for MetadataCommandAction and MetadataConnectionPropertiesCommand * Refactored unit test to use DynamicConnectionPropertiesMetadata instead of raw Response * Removed useless pom dependencies Closes ENTESB-12498
* Added circuit breaker instead of plain REST call to meta connection properties * Refactored common-model to add dynamic metadata modeling * Refactored MetadataCommand to be used as abstract base for MetadataCommandAction and MetadataConnectionPropertiesCommand * Refactored unit test to use DynamicConnectionPropertiesMetadata instead of raw Response * Removed useless pom dependencies Closes ENTESB-12498
* Added circuit breaker instead of plain REST call to meta connection properties * Refactored common-model to add dynamic metadata modeling * Refactored MetadataCommand to be used as abstract base for MetadataCommandAction and MetadataConnectionPropertiesCommand * Refactored unit test to use DynamicConnectionPropertiesMetadata instead of raw Response * Removed useless pom dependencies Closes ENTESB-12498
* Added circuit breaker instead of plain REST call to meta connection properties * Refactored common-model to add dynamic metadata modeling * Refactored MetadataCommand to be used as abstract base for MetadataCommandAction and MetadataConnectionPropertiesCommand * Refactored unit test to use DynamicConnectionPropertiesMetadata instead of raw Response * Removed useless pom dependencies Closes ENTESB-12498
Closes ENTESB-12498