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

Remove Decoder stage (breaking change) #225

Merged
merged 3 commits into from
Jun 16, 2022
Merged

Conversation

jotak
Copy link
Member

@jotak jotak commented Jun 7, 2022

Decoder is removed as a stage, and added wherever it makes sense as
Ingest config: relevant only for File ingester and Kafka ingester.

Also remove AWS decoder (after discussion)

@jotak
Copy link
Member Author

jotak commented Jun 7, 2022

(draft because not tested yet)

@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2022

Codecov Report

Merging #225 (b634451) into main (ddba882) will decrease coverage by 0.38%.
The diff coverage is 64.81%.

@@            Coverage Diff             @@
##             main     #225      +/-   ##
==========================================
- Coverage   61.33%   60.94%   -0.39%     
==========================================
  Files          67       67              
  Lines        3843     3795      -48     
==========================================
- Hits         2357     2313      -44     
+ Misses       1342     1333       -9     
- Partials      144      149       +5     
Flag Coverage Δ
unittests 60.94% <64.81%> (-0.39%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/api/enum.go 75.75% <0.00%> (ø)
pkg/confgen/flowlogs2metrics_config.go 0.00% <0.00%> (ø)
pkg/config/config.go 50.00% <ø> (ø)
pkg/config/pipeline_builder.go 90.47% <ø> (+11.30%) ⬆️
pkg/pipeline/pipeline.go 91.89% <ø> (ø)
pkg/pipeline/pipeline_builder.go 64.47% <ø> (-1.72%) ⬇️
pkg/pipeline/ingest/ingest_file.go 50.74% <46.15%> (-0.08%) ⬇️
pkg/pipeline/decode/decode.go 57.14% <57.14%> (-42.86%) ⬇️
pkg/pipeline/ingest/ingest_grpc.go 75.00% <57.14%> (-2.11%) ⬇️
pkg/pipeline/ingest/ingest_kafka.go 80.58% <72.72%> (-1.90%) ⬇️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ddba882...b634451. Read the comment docs.

Comment on lines 134 to 138
func toMap(t *testing.T, in string) config.GenericMap {
var m config.GenericMap
err := json.Unmarshal([]byte(in), &m)
require.NoError(t, err)
return m
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps move this function to test/utils.go

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

description: "middle node decode1 does not have outputs",
config: baseConfig + `- name: decode2
decode:
description: "middle node transform1 does not have outputs",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"does not have outputs"? or "does not have inputs"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is really "outputs" not "inputs" here. I guess you were looking at the pipeline defined above, but this description is for the one below:

- { follows: ingest1, name: transform1 }
- { follows: ingest1, name: transform2 }
- { follows: transform2, name: write1 }

Comment on lines 75 to 84
pipeline:
- { follows: ingest1, name: decode1 }
- { follows: ingest1, name: decode2 }
- { follows: decode2, name: write1 }
- { follows: ingest1, name: transform1 }
- { follows: ingest1, name: transform2 }
- { follows: transform2, name: write1 }
`,
failingNodeName: "decode1",
failingNodeName: "transform1",
}, {
description: "terminal node write1 does not have inputs",
config: baseConfig + `- transform:
type: none
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like transform1 does not have outputs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here again I think you're looking at the wrong pipeline, it's the one defined below

@jotak jotak marked this pull request as ready for review June 14, 2022 12:32
Copy link
Collaborator

@ronensc ronensc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Decoder is removed as a stage, and added wherever it makes sense as
Ingest config: relevant only for File ingester and Kafka ingester.
@jotak jotak merged commit f711714 into netobserv:main Jun 16, 2022
jotak added a commit to jotak/network-observability-operator that referenced this pull request Jun 16, 2022
Following netobserv/flowlogs-pipeline#225 , decode stages should not be set after ingesting ipfix or grpc

Also rename stages to make them more explicit
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.

4 participants