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 port type #1187

Merged
merged 11 commits into from Nov 23, 2020
Merged

Remove port type #1187

merged 11 commits into from Nov 23, 2020

Conversation

mavam
Copy link
Member

@mavam mavam commented Nov 19, 2020

📔 Description

This PR removes the port type from the data model. Ports become count types. To keep the domain-specific semantics when working with network data, a type alias with the name port will be the new way to express the same data.

📝 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

File by file.

@dominiklohmann
Copy link
Member

@mavam this needs the integration test baseline to be updated.

@mavam mavam marked this pull request as ready for review November 20, 2020 15:22
Copy link
Member

@dominiklohmann dominiklohmann left a comment

Choose a reason for hiding this comment

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

Just a first round. The code itself looks fine, but I'll do some git grep locally to check whether you missed anything. Also still need to test locally.

libvast/src/format/pcap.cpp Outdated Show resolved Hide resolved
libvast/test/type.cpp Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@mavam mavam force-pushed the story/ch5991 branch 2 times, most recently from 2234463 to a11f434 Compare November 20, 2020 20:26
Copy link
Member

@dominiklohmann dominiklohmann left a comment

Choose a reason for hiding this comment

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

I ran further tests locally and this is looking alright to me. Tested various queries and they all work as expected.

Please update the docs as noted in the checklist. This also must be rebased onto latest master before merging, and there's a missing newline in the changelog entry.

I'm yet unsure whether we want to bump the db version. Currently, we run into a global buffer overflow according to asan when loading an old db with this version.

@mavam
Copy link
Member Author

mavam commented Nov 23, 2020

Please update the docs as noted in the checklist.

Once approved, I'll pivot to updating docs.

This also must be rebased onto latest master before merging, and there's a missing newline in the changelog entry.

Now that the scope is wider, this reflects better the intention.
@mavam
Copy link
Member Author

mavam commented Nov 23, 2020

@tenzir/backend new DV version changes implemented as discussed. See last two commits.

Copy link
Member

@dominiklohmann dominiklohmann left a comment

Choose a reason for hiding this comment

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

As discussed via Slack, there's a segfault when the db version mismatches. Just nits otherwise.

/// This version number defines compatibility of persistent state with with
/// prior directory layouts and contents. Breaking changes shall bump the
/// version number. A breaking change includes the structure, sequence and
/// organization of the database directory itself, as well irreconcilable
Copy link
Member

Choose a reason for hiding this comment

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

This is missing some word before irreconcilable.

Copy link
Member

Choose a reason for hiding this comment

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

Also, can you please use incompatible instead? I had to look up what irreconcilable even means.

Copy link
Member

@dominiklohmann dominiklohmann left a comment

Choose a reason for hiding this comment

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

Tested locally, works well now.

@mavam mavam merged commit 722c9da into master Nov 23, 2020
@mavam mavam deleted the story/ch5991 branch November 23, 2020 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants