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

details: nits from SCIONLab #4629

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

juagargi
Copy link
Contributor

While in the process of merging FABRID into SCIONLab, we have found these very small nits to probably be beneficial to merge upstream (here):

  • Allow the parsing of ASes from string using a different separator than :
  • Improve the comment on the package variable HostAddr in package tools/integration.

@jiceatscion
Copy link
Contributor

This change is Reviewable

@juagargi juagargi changed the title Nits from SCIONLab details: nits from SCIONLab Sep 20, 2024
Copy link
Contributor

@jiceatscion jiceatscion left a comment

Choose a reason for hiding this comment

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

What is the benefit of supporting a separator other than ':'? In theory, I suppose it wouldn't hurt (it needs a test, though). But in principle it ads code for the sole purpose of supporting a notation that violates the spec we're in the process of submitting to the ietf. In that spec we're allowing only a narrow syntax. This is important in order to ensure that tools from various sources remain compatible in the long run. Can you imagine if every web browser on the planet had to support every possible notations for ip addresses that any prominent TCP/IP stack had once felt like promoting? This isn't yet a problem for SCION, but we should try and ensure it doesn't become one.

Reviewable status: 0 of 2 files reviewed, all discussions resolved

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @juagargi)


pkg/addr/fmt.go line 59 at r2 (raw file):

// ParseFormattedAS parses an AS number that was formatted with the FormatAS
// function. The same options must be provided to successfully parse.
func ParseFormattedAS(as string, opts ...FormatOption) (AS, error) {

Is this not sufficient for your use case?

If not, what is blocking you from using this instead of the newly introduced function?

@juagargi
Copy link
Contributor Author

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @juagargi)

pkg/addr/fmt.go line 59 at r2 (raw file):

// ParseFormattedAS parses an AS number that was formatted with the FormatAS
// function. The same options must be provided to successfully parse.
func ParseFormattedAS(as string, opts ...FormatOption) (AS, error) {

Is this not sufficient for your use case?

If not, what is blocking you from using this instead of the newly introduced function?

I'm tagging @marcodermatt so that he sees this PR and discussion.
In my opinion, fmt.ParseFormattedAS should be enough, but I don't know enough about FABRID or the performance they would need to have a canonical answer ...

@jeltevanbommel
Copy link

pkg/addr/fmt.go line 59 at r2 (raw file):

Previously, juagargi (Juan A. Garcia Pardo) wrote…

I'm tagging @marcodermatt so that he sees this PR and discussion.
In my opinion, fmt.ParseFormattedAS should be enough, but I don't know enough about FABRID or the performance they would need to have a canonical answer ...

We will use fmt.ParseFormattedAS indeed, so the change is not necessary. Thanks @oncilla!

@juagargi
Copy link
Contributor Author

Reverted changes to parseAS

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1, 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @juagargi)

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @juagargi)

@jiceatscion jiceatscion merged commit 06a3c9b into scionproto:master Sep 23, 2024
5 checks passed
@juagargi juagargi deleted the juagargi/nits_from_scionlab branch September 23, 2024 12:44
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