This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 202
feat(server): autodiscovery circuit breaker call #8022
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...rc/main/java/io/syndesis/common/model/connection/DynamicConnectionPropertiesMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (C) 2016 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.syndesis.common.model.connection; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonDeserialize(builder = DynamicConnectionPropertiesMetadata.Builder.class) | ||
public interface DynamicConnectionPropertiesMetadata extends WithDynamicProperties { | ||
|
||
DynamicConnectionPropertiesMetadata NOTHING = new DynamicConnectionPropertiesMetadata.Builder().build(); | ||
|
||
final class Builder extends ImmutableDynamicConnectionPropertiesMetadata.Builder { | ||
// make ImmutableDynamicConnectionPropertiesMetadata.Builder accessible | ||
} | ||
|
||
@Override | ||
Map<String, List<ActionPropertySuggestion>> properties(); | ||
} |
42 changes: 42 additions & 0 deletions
42
...common/model/src/main/java/io/syndesis/common/model/connection/WithDynamicProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (C) 2016 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.syndesis.common.model.connection; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import org.immutables.value.Value; | ||
|
||
public interface WithDynamicProperties { | ||
|
||
@Value.Immutable | ||
@JsonDeserialize(builder = ActionPropertySuggestion.Builder.class) | ||
interface ActionPropertySuggestion { | ||
|
||
final class Builder extends ImmutableActionPropertySuggestion.Builder { | ||
public static ActionPropertySuggestion of(final String value, final String displayValue) { | ||
return new ActionPropertySuggestion.Builder().value(value).displayValue(displayValue).build(); | ||
} | ||
} | ||
|
||
String displayValue(); | ||
|
||
String value(); | ||
} | ||
|
||
Map<String, List<ActionPropertySuggestion>> properties(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.