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

Add Egress info fields to flow table #349

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

dreamtalen
Copy link
Contributor

@dreamtalen dreamtalen commented Jun 21, 2023

Add two new fields EgressName, EgressIP to our flow table.
We add these two fields in Flow Exporter/Aggregator recently: antrea-io/antrea#5088

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #349 (b3437d2) into main (44efc42) will decrease coverage by 14.70%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main     #349       +/-   ##
===========================================
- Coverage   66.56%   51.87%   -14.70%     
===========================================
  Files          38       65       +27     
  Lines        4783     6747     +1964     
===========================================
+ Hits         3184     3500      +316     
- Misses       1452     3079     +1627     
- Partials      147      168       +21     
Flag Coverage Δ *Carryforward flag
python-coverage 57.51% <ø> (ø) Carriedforward from 82155e7
unit-tests 50.60% <ø> (-19.13%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

see 28 files with indirect coverage changes

Add two new fields EgressName, EgressIP to our flow table.

Signed-off-by: Yongming Ding <dyongming@vmware.com>
@dreamtalen dreamtalen marked this pull request as ready for review June 21, 2023 22:04
@@ -190,3 +190,13 @@ INSERT INTO ".inner.flows_policy_view_local" SELECT * FROM policy_view_table_loc
DROP TABLE pod_view_table_local;
DROP TABLE node_view_table_local;
DROP TABLE policy_view_table_local;

--Alter table to drop new columns
ALTER TABLE flows
Copy link
Contributor

Choose a reason for hiding this comment

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

Will the following statement work?

ALTER TABLE flows DROP egressName String, DROP egressIP String;
ALTER TABLE flows_local DROP egressName String, DROP egressIP String;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, I tried this one is working:

ALTER TABLE flows
    DROP COLUMN egressName,
    DROP COLUMN egressIP;

Also did a similiar change on the add column statements.

@@ -47,5 +47,7 @@ CREATE TABLE flows (
reverseThroughputFromSourceNode NUMBER(20, 0),
reverseThroughputFromDestinationNode NUMBER(20, 0),
clusterUUID STRING(36),
timeInserted TIMESTAMP_TZ DEFAULT current_timestamp()
timeInserted TIMESTAMP_TZ DEFAULT current_timestamp(),
egressName STRING(256),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do egressName and egressIP need to come before timeInserted in order to match the S3 csv data format? I'm not sure about whether the snowpipe copy statement will work correctly in this case or not. Have you tried 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.

They come after timeInserted actually, yes I have verified a snowflake setup manually

Copy link
Contributor

@yanjunz97 yanjunz97 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@yuntanghsu yuntanghsu left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Yongming Ding <dyongming@vmware.com>
Copy link
Contributor

@heanlan heanlan left a comment

Choose a reason for hiding this comment

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

LGTM

@dreamtalen dreamtalen merged commit d5cbecc into antrea-io:main Jun 22, 2023
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