Skip to content

Autosubmit considers valid email as invalid #1471

@kinow

Description

@kinow

Testing the NOTIFY_ON after a bug @apuiggro found, I noticed Autosubmit email validation is incorrect and inconsistent.

If you use local inboxes, for example:

mail:
    NOTIFY_ON_REMOTE_FAIL: True
    NOTIFICATIONS: True
    TO: kinow@localhost

Then autosubmit create will succeed but will print a warning.

$ autosubmit create a030
Autosubmit admin user: eadmin is not set
Autosubmit is running with 4.1.11
Autosubmit admin user: eadmin is not set
Preparing .lock file to avoid multiple instances with same expid.
Using project folder: /home/kinow/autosubmit/a030/proj

Checking configuration files...
Expdef config file is correct
Platforms sections: OK
Jobs sections OK
[WARNING] On Configuration files:
Critical Issues on [Autosubmit] config file:
[mail] invalid e-mail

Loading parameters...

But if you run autosubmit run, then the process crashes, instead of printing a warning (autosubmit create exited with 0, so why is the user not able to run?).

$ autosubmit run a030
Autosubmit admin user: eadmin is not set
Autosubmit is running with 4.1.11

Checking configuration files...
Expdef config file is correct
Platforms sections: OK
Jobs sections OK
 [CRITICAL] On Configuration files:
Critical Issues on [Autosubmit] config file:
[mail] invalid e-mail
 [eCode=7014]
More info at https://autosubmit.readthedocs.io/en/master/troubleshooting/error-codes.html

There are a few RFCs for emails, rfc822, rfc3696, rfc5321, rfc5322, rfc6530… we should probably use something from Python's stdlib, or a good library to validate it, and allow user@domain emails as this is commonly used in some IT environments.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions