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

format is case sensitive #14

Open
dmth opened this issue Jun 7, 2016 · 6 comments
Open

format is case sensitive #14

dmth opened this issue Jun 7, 2016 · 6 comments
Labels

Comments

@dmth
Copy link
Contributor

dmth commented Jun 7, 2016

currently there is a difference between csv and CSV.

This should be fixed

@dmth dmth added the bug label Jun 7, 2016
@bernhardreiter
Copy link
Member

@dmth: Why should it be fixed?

My wild guess would be robustness reasons, on the other hand, because this comes out of a database and will be entered by tools, it may not make sense to be more tolerant here. More tolerance has the drawback that future sql queries will have to deal with more than one lower-and-upper casing which is
a potential source of errors.

@dmth
Copy link
Contributor Author

dmth commented Jun 7, 2016

We need to separate the database from intelmq-mailgen here.
The source of the format information is the contactdb. From my point of view, it should not be a difference if the contactdb stores CSV or csv. Mailgen should be capable of processing both.

@bernhardreiter
Copy link
Member

@dmth the question is why should it not make a difference?

I see a few cases here:
a) we only accept one specific keyword aka "csv"
b) we accept all upper and all lower case, aka "csv" and "CSV"
c) we accept all cases, aka "cSv", "csV", "CSV",...

Two implementation ideas:

  1. we define a set of values that we support and make sure that all tools
    only set these, would be good for a) and each sql statement that is written for the database.
  2. we allow c). Drawback: A counting sql statement will have to make sure the value is considered case insensitive otherwise counting will be bad.

@bernhardreiter
Copy link
Member

Ping @dmth

@dmth
Copy link
Contributor Author

dmth commented Jun 27, 2016

I don't get your point concerning the

  1. we allow c). Drawback: A counting sql statement will have to make sure the value is considered
    case insensitive otherwise counting will be bad.

Why would we need this? Is someone interested how many receivers would like to receive CSV-Mails?

We have to remind ourselves: Mailgen and the ContactDB are two different, independent applications. As mailgen just uses the data which was added by the ContactDB, it should be more robust when using this data.

@bernhardreiter
Copy link
Member

I see Mailgen and ContactDB related, they have to work nicely together.
To me it is a design question about robustness in which sense. To me a defined values
in one capitalization just seems to be more robust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants