Skip to content

Batch 1: Document the result of the Pipeline, Workflow, Copy files, Mail, Simple evaluation and SFTP actions. #8970 - #9000

Merged
bamaer merged 1 commit into
apache:mainfrom
Adalennis:8970
Oct 18, 2026

Conversation

@Adalennis

Copy link
Copy Markdown
Contributor

Addresses #8970 (first batch, the issue stays open for the remaining actions)

First batch: a Result section on the pages of the Pipeline, Workflow, Copy files, Mail, Simple evaluation and SFTP actions, to agree on the format before doing the other actions. Each one says when the action is true or false, what it does with the result files and the result rows, and the metrics it sets, as read from its execute() method. They link to the general Action results page.

While at it, the option labels these sections refer to now match Hop Gui:

  • Pipeline: "Wait for the pipeline to complete" (was "Wait for remote pipeline to finish"); "Follow local abort to remote pipeline" removed, the dialog no longer has it; the Parameters table had cols-"1,3].

  • Workflow: "Wait for remote workflow to complete", "Specify logfile".

  • Mail: "Attach file(s) to message".

  • 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.

  • 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.

  • 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
you have to acknowledge this by using the following check-box.

@bamaer

bamaer commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Thanks @Adalennis, the format works well, and it's good to have the labels lined up with Hop Gui. I checked the tables against each action's execute() on current main (I read the code, didn't run the actions). A few rows say something the code doesn't do:

Fix before merge

  1. Pipeline / Workflow, Execute for every result row: the rows are not passed on unchanged. Each run gets a single row and the list is cleared before every run (ActionPipeline.java:385, ActionWorkflow.java:341). So what goes on is the last run's rows, or the last input row. On Pipeline, Clear results files before execution also runs before every run, not once.
  2. Workflow, Result rows: the rows are replaced only when the child returns a non-empty list (ActionWorkflow.java:560). A child that returns no rows leaves the received rows in place.
  3. Copy files:
    • A file copied into a folder is not added to the result files, only file-to-file and folder-to-folder copies are (ActionCopyFiles.java:385-403).
    • A single file that fails to copy inside a pair is only logged, so the action can be true with 0 errors.
  4. Mail: the result is false whenever an error was counted, even when the message went out. With Zip files, a zip error sends the mail without the zip and returns false (ActionMail.java:577-599). A result file that doesn't exist is skipped without an error, so "false when a file could not be attached" only holds for errors at send time.
  5. SFTP:
    • It is also false when Remove files after retrieval fails. The file is downloaded and in the result files by then (ActionSftp.java:427-429).
    • On any failure, Files retrieved stays 0, even for files already downloaded.
    • With Copy previous results to args, the first field is matched exactly against the file names in the remote directory, and the wildcard is not used.
  6. Simple evaluation: an invalid regular expression isn't a false result. The exception leaves execute() and stops the workflow, the same as the Mail NOTE (ActionSimpleEval.java:561).

Worth fixing

  • Simple evaluation: "no variable is set in Variable name" reads as "the variable is undefined". It means the Variable name field is empty.

@Adalennis

Copy link
Copy Markdown
Contributor Author

Thanks @bamaer, you were right on every point. I fixed all of them, and this time ran each row instead of only reading execute(): every row of the six tables is now backed by a test with hop-run on current main (48 cases, with a local SMTP server for Mail and an SFTP server for SFTP).

  • Pipeline / Workflow: with Execute for every result row each run gets its own row, and the action passes on what the last run left (the rows it copied or returned, or else the last input row). Clear results files runs before every run. Workflow replaces the rows only when the child returns at least one.
  • Copy files: a single file copied into a folder isn't added to the result files, and a file that fails inside a folder is only logged (true, 0 errors).
  • Mail: false whenever an error was counted, even when the message went out; a zip error sends the mail without the zip; a result file that no longer exists is skipped without an error unless zipping.
  • SFTP: false when Remove files after retrieval fails (the file is downloaded and in the result files by then); Files retrieved is only set on success; with Copy previous results to args the names are matched exactly and the wildcard is ignored.
  • Simple evaluation: "the Variable name field is empty", and a NOTE that an invalid regular expression stops the workflow.

@bamaer

bamaer commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Thanks @Adalennis, I re-checked the new tables against the code on main and all the points are resolved. Good to go from my side.

@bamaer
bamaer merged commit 4bbc851 into apache:main Oct 18, 2026
3 checks passed
@Adalennis Adalennis changed the title Document the result of the Pipeline, Workflow, Copy files, Mail, Simple evaluation and SFTP actions. #8970 Batch 1: Document the result of the Pipeline, Workflow, Copy files, Mail, Simple evaluation and SFTP actions. #8970 Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants