Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

feat(server): autodiscovery circuit breaker call #8022

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

squakez
Copy link
Contributor

@squakez squakez commented Mar 4, 2020

  • 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

@syndesisio-bot
Copy link

@squakez The bot could not transition the ticket automatically, please update this Jira ticket manually: https://issues.redhat.com/browse/ENTESB-12498

@Delawen Delawen self-requested a review March 4, 2020 09:46
@squakez squakez added group/common Syndesis shared common module group/server REST backend for managing integrations pr/review-requested Use this if you want to have a review. pure-bot will prevent merging if set and no review given labels Mar 4, 2020
Copy link
Member

@zregvart zregvart left a 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.

@@ -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);
Copy link
Member

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.

Copy link
Contributor Author

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.

* 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
@squakez squakez merged commit 18117f1 into syndesisio:master Mar 4, 2020
@syndesisio-bot
Copy link

@squakez The bot could not transition the ticket automatically, please update this Jira ticket manually: https://issues.redhat.com/browse/ENTESB-12498

@squakez squakez deleted the feature/ENTESB-12498 branch March 4, 2020 13:15
squakez added a commit to squakez/syndesis that referenced this pull request Mar 4, 2020
* 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
squakez added a commit to squakez/syndesis that referenced this pull request Mar 4, 2020
* 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
squakez added a commit to squakez/syndesis that referenced this pull request May 18, 2020
* 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
squakez added a commit to squakez/syndesis that referenced this pull request May 18, 2020
* 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
squakez added a commit that referenced this pull request May 18, 2020
* 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
group/common Syndesis shared common module group/server REST backend for managing integrations pr/review-requested Use this if you want to have a review. pure-bot will prevent merging if set and no review given
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants