spring-cloud / spring-cloud-dataflow-ui

This repo provides the Dashboard application of Spring Cloud Data Flow
https://dataflow.spring.io/
Apache License 2.0
213 stars 118 forks source link

Confusing alert when deploying a stream #1745

Closed sabbyanandan closed 3 years ago

sabbyanandan commented 3 years ago

In 1.3 PRO ANSP (2.8 SNAP) on TAS, when deploying a stream, I get this following alert.

image

What is the version.time pertain to? I am deploying geode | log; I am confused what property it is saying is wrong.

Also, the alert below shows something like this: image

jvalkeal commented 3 years ago

I think when you modified app versions, last deploy(think you did undeploy and then deploy) had that versions for time and it doesn't exist anymore. That's the error I think.

jvalkeal commented 3 years ago

You've reused stream name and old manifest points to ticktock:

dataflow:>stream manifest --name foo
"apiVersion": "skipper.spring.io/v1"
"kind": "SpringCloudDeployerApplication"
"metadata":
  "name": "log"
"spec":
  "resource": "maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar"
  "resourceMetadata": "maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:jar:metadata:2.1.5.RELEASE"
  "version": "2.1.5.RELEASE"
  "applicationProperties":
    "spring.cloud.dataflow.stream.app.label": "log"
    "management.metrics.tags.application.type": "${spring.cloud.dataflow.stream.app.type:unknown}"
    "management.metrics.tags.application.version": "${vcap.application.application_version:unknown}"
    "management.metrics.tags.stream.name": "${spring.cloud.dataflow.stream.name:unknown}"
    "management.metrics.tags.application": "${spring.cloud.dataflow.stream.name:unknown}-${spring.cloud.dataflow.stream.app.label:unknown}-${spring.cloud.dataflow.stream.app.type:unknown}"
    "spring.cloud.dataflow.stream.name": "foo"
    "management.metrics.tags.organization.name": "${vcap.application.org_name:default}"
    "management.metrics.tags.instance.index": "${vcap.application.instance_index:${spring.cloud.stream.instanceIndex:0}}"
    "management.metrics.tags.space.name": "${vcap.application.space_name:unknown}"
    "wavefront.application.service": "${spring.cloud.dataflow.stream.app.label:unknown}-${spring.cloud.dataflow.stream.app.type:unknown}"
    "management.metrics.tags.application.id": "${vcap.application.application_id:unknown}"
    "spring.cloud.stream.bindings.input.group": "foo"
    "management.metrics.tags.application.guid": "${spring.cloud.application.guid:unknown}"
    "management.metrics.tags.application.name": "${vcap.application.application_name:${spring.cloud.dataflow.stream.app.label:unknown}}"
    "management.metrics.tags.space.id": "${vcap.application.space_id:unknown}"
    "spring.cloud.dataflow.stream.app.type": "sink"
    "spring.cloud.stream.bindings.input.destination": "foo.time"
    "wavefront.application.name": "${spring.cloud.dataflow.stream.name:unknown}"
  "deploymentProperties":
    "spring.cloud.deployer.group": "foo"
---
"apiVersion": "skipper.spring.io/v1"
"kind": "SpringCloudDeployerApplication"
"metadata":
  "name": "time"
"spec":
  "resource": "maven://org.springframework.cloud.stream.app:time-source-rabbit:jar"
  "resourceMetadata": "maven://org.springframework.cloud.stream.app:time-source-rabbit:jar:jar:metadata:2.1.4.RELEASE"
  "version": "2.1.4.RELEASE"
  "applicationProperties":
    "spring.cloud.dataflow.stream.app.label": "time"
    "management.metrics.tags.application.type": "${spring.cloud.dataflow.stream.app.type:unknown}"
    "management.metrics.tags.application.version": "${vcap.application.application_version:unknown}"
    "management.metrics.tags.stream.name": "${spring.cloud.dataflow.stream.name:unknown}"
    "management.metrics.tags.application": "${spring.cloud.dataflow.stream.name:unknown}-${spring.cloud.dataflow.stream.app.label:unknown}-${spring.cloud.dataflow.stream.app.type:unknown}"
    "spring.cloud.dataflow.stream.name": "foo"
    "management.metrics.tags.organization.name": "${vcap.application.org_name:default}"
    "management.metrics.tags.instance.index": "${vcap.application.instance_index:${spring.cloud.stream.instanceIndex:0}}"
    "management.metrics.tags.space.name": "${vcap.application.space_name:unknown}"
    "wavefront.application.service": "${spring.cloud.dataflow.stream.app.label:unknown}-${spring.cloud.dataflow.stream.app.type:unknown}"
    "management.metrics.tags.application.id": "${vcap.application.application_id:unknown}"
    "spring.cloud.stream.bindings.output.producer.requiredGroups": "foo"
    "management.metrics.tags.application.guid": "${spring.cloud.application.guid:unknown}"
    "spring.cloud.stream.bindings.output.destination": "foo.time"
    "management.metrics.tags.application.name": "${vcap.application.application_name:${spring.cloud.dataflow.stream.app.label:unknown}}"
    "management.metrics.tags.space.id": "${vcap.application.space_id:unknown}"
    "spring.cloud.dataflow.stream.app.type": "source"
    "wavefront.application.name": "${spring.cloud.dataflow.stream.name:unknown}"
  "deploymentProperties":
    "spring.cloud.deployer.group": "foo"

So error is expected.

sabbyanandan commented 3 years ago

@jvalkeal: If there's a stream with the same name, why was I allowed to create the stream in first place? I hope you understand that I am looking at the stream deployment page - please pay attention.

sabbyanandan commented 3 years ago

And, for the steps, here's what I went through:

1- I had RMQ apps bulk imported 2- Someone asked me "can you install both sets of apps at the same time (both rabbit and kafka versions?)" (see thread); so for this experiment, I imported Kafka Apps on top fo the same registry 3- While the import was successful, this resulted in many issues in stream create page (See: https://github.com/spring-cloud/spring-cloud-dataflow-ui/issues/1743) 4- To get around this problem, I bulk unregistered all apps from the GUI 5- Re-imported RMQ apps 6- Created a foo stream with geode | log 7- I see the alert then and also I cannot deploy the stream since apps don't have "default" version assigned

ilayaperumalg commented 3 years ago

What we noticed from your environment was that you had the stream name foo created with some other stream definition a long time back - from the stream history. Given skipper tracks the manifests for all the previously created streams under the same name, it still keeps those manifest properties. Remember, Skipper wouldn't remove the manifests during the update. This is the reason you see version.time there.

jvalkeal commented 3 years ago

This has nothing to do with default versions. In your env that log has default version 3.0.1 but manifest has 2.1.5.RELEASE it wants to use and you've removed that.

We don't silently ever switch to some default version if manifest has some version already(and it always has).

jvalkeal commented 3 years ago

Possible enhancement could be to anayze existing manifest and new definition and warn that structure is different. Stream update is more strict and I believe it throws error if "pipe" in definition is not a same, but re-create is a bit different.