Adalennis opened a new pull request, #9195:
URL: https://github.com/apache/hop/pull/9195

   Addresses #8970
   
   Eleventh batch: a Result section on the pages of Encrypt files with PGP, 
Decrypt files with PGP, Verify file signature with PGP, Mail validator and Get 
mails (POP3/IMAP).
   
   Every row comes from a hop-run test against the current code (171 workflows: 
GnuPG in a Docker container with a test keyring holding keys with and without a 
passphrase, GreenMail in Docker for POP3 and IMAP with a mailbox reset before 
each test, and a fake SMTP server on port 25 for the Mail validator SMTP check; 
files reset before each test). Each action was also run after an action that is 
true with 2 errors and after a false action on an unconditional hop (all pass 
on true with 0 errors), with a previous result holding files and rows, on 
success and on failure, and the PGP failures under each Success condition. What 
the tests show:
   - Encrypt and Decrypt files with PGP: with the default If destination file 
exists (Do nothing), Add files to result files name adds nothing, also for new 
files. A new destination file is added with every other option except Fail; an 
existing one only with Overwrite destination file or Create file with unique 
name.
   - If destination file exists doesn't do what some options say: Delete source 
file deletes the existing destination file, not the source, and encrypts 
nothing; Move source file to folder moves the source without encrypting or 
decrypting it; in Encrypt, Create file with unique name builds a new name but 
writes to the existing file, which is overwritten, and adds the new name (a 
file that doesn't exist) to the result files. Documented as a WARNING.
   - A file that fails counts as an error: with Success when number of errors 
lesser than the action stays true up to the limit, with Success when at least x 
files decrypted it is true once enough files are done, whatever the errors. In 
a folder, the failure that breaks the success condition counts as two errors 
when files are left after it. Success when number of errors lesser than is true 
when the number of errors equals the limit, as in the other actions with this 
option. Move source file to folder with an empty or missing Destination folder 
is false before any file, under every condition.
   - Encrypt: a GPG location that is empty or not found counts as 1 error 
before any file, so the action is true with Success when number of errors 
lesser than. Decrypt: the same GPG location stops the workflow under every 
condition, no hop is followed.
   - Encrypt has no passphrase option, so Sign and Sign and encrypt fail with a 
key that has a passphrase (unless gpg-agent holds it).
   - The output file keeps the source name: no .gpg extension is added when 
encrypting, and none is removed when decrypting.
   - When the action stops before the files (Move to folder check) or between 
two entries of the list, Lines written keeps the previous action's value.
   - Get mails: Lines written holds the saved messages, Files retrieved the 
attachments, Lines deleted the deleted messages and Lines updated the moved 
ones. A message moved on its own (Move message to folder after retrieval, or 
Move messages to folder with Retrieve the first...emails) also counts as 
deleted. On a failure all these metrics keep the previous action's values. No 
result files are added.
   - Get mails: the #IdFile# number restarts in each folder, so with Include 
subfolders a message of a subfolder overwrote the file of a message of the 
first folder. Retrieve the first...emails also limits the Delete messages and 
Move messages to folder actions.
   - Mail validator: the addresses must be separated by exactly one space; two 
spaces or a comma make the check fail. The SMTP check uses port 25 and the time 
out is in milliseconds. Without Default SMTP server, an address of a domain 
with an A record but no MX record always fails ("Error getting machines : Index 
1 out of bounds for length 1").
   
   Also fixed:
   - Encrypt and Decrypt: descriptions for If destination file exists, Add 
files to result files name and Include Subfolders; Do not keep folder structure 
was described backwards; If file exists in destination folder listed the wrong 
choices (it has Do nothing, Overwrite file, Unique name and Fail); Nr errors 
lesser than is also the file count of Success when at least x files decrypted.
   - Decrypt: description for Copy previous results to args (the fields read by 
position) and a Passphrase row; the Advanced tab was a second "Destination File 
Tab".
   - Get mails: Port description; Date 1 and Date 2 format (yyyy-MM-dd 
HH:mm:ss); removed three "Option|Description" rows inside the tables.
   - Labels: Action name, Mail Server Connection, SMTP check, Include 
Subfolders, Overwrite destination file, Success when all works fine, Nr errors 
lesser than.
   
   Found while testing (not reported yet): PGP result files not added with the 
default Do nothing, If destination file exists (Unique name overwriting, Delete 
source file deleting the destination, Move source file to folder skipping the 
encryption), the double error count in a folder, Decrypt stopping the workflow 
on a bad GPG location, the missing passphrase option for signing, Get mails 
#IdFile# overwriting files across folders and counting single moves as deleted, 
and the Mail validator SMTP check failing for domains without an MX record.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   - [x] Run `mvn clean install apache-rat:check` to make sure basic checks 
pass. A more thorough check will be performed on your pull request 
automatically.
   - [x] If you have a group of commits related to the same change, please 
squash your commits into one and force push your branch using `git rebase -i`.
   - [x] Mention the appropriate issue in your description (for example: 
`addresses #123`), if applicable.
   
   To make clear that you license your contribution under the [Apache License 
Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to