Skip to content

Conversation

@FriederikeHanssen
Copy link
Member

No description provided.

Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

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

Read-through of the code looks good. Docs need updating though, and ideally needs some testing in the wild.

@ewels
Copy link
Member

ewels commented Dec 11, 2025

It'd also be nice to have a tick box to choose whether to compare on just filename, or filename + meta. As folks on HPC sometimes have filesystems that can mess with last-modified dates.

Adds detection mode option to poll-files node with two behaviors:
- Name + metadata (default): Detects files as new when name,
  lastModified, size, or etag changes. Enables detection of
  overwritten/replaced files with same name (e.g., daily status files).
- Name only: Only detects truly new filenames (original behavior)

Also adds third output for deleted files, allowing flows to respond
when files are removed from Data Links.

Updates documentation with examples for both detection modes and
deletion detection use cases.

Co-Authored-By: FriederikeHanssen <[email protected]>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@FriederikeHanssen
Copy link
Member Author

Added looks like this now:
Screenshot 2025-12-11 at 13 51 47
Screenshot 2025-12-11 at 13 51 59

Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

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

LGTM, happy to merge once you've tested it and validated that it works as expected 👍🏻

Comment on lines +125 to +133
### Monitor for status file updates

Use this pattern when a completion marker file is deposited with the same name but new timestamp:

1. Set **Detection mode** to **Name + metadata**
2. Set **Pattern**: `RTAComplete\.txt$` to match only the status file
3. Connect output 2 to your workflow trigger
4. Each time the file is deposited (even with the same name), the workflow will trigger

Copy link
Member

Choose a reason for hiding this comment

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

I think that this one is a bit obvious

Suggested change
### Monitor for status file updates
Use this pattern when a completion marker file is deposited with the same name but new timestamp:
1. Set **Detection mode** to **Name + metadata**
2. Set **Pattern**: `RTAComplete\.txt$` to match only the status file
3. Connect output 2 to your workflow trigger
4. Each time the file is deposited (even with the same name), the workflow will trigger
### Monitor for status file updates
Use this pattern when a completion marker file is deposited with the same name but new timestamp:
1. Set **Detection mode** to **Name + metadata**
2. Set **Pattern**: `RTAComplete\.txt$` to match only the status file
3. Connect output 2 to your workflow trigger
4. Each time the file is deposited (even with the same name), the workflow will trigger

@ewels ewels marked this pull request as draft December 12, 2025 11:01
@ewels
Copy link
Member

ewels commented Dec 12, 2025

We had a look at this, the detection seems to work when the file deletion / recreation has a poll event in between (so it detects first the deletion, then the new file) - this is working as before this PR. However, detection of file modification timestamps does not work.

Looking at the debug log messages, my suspicion is that the Seqera Platform API does not return modified timestamps, and that Claude was being a little over-eager in writing this code, based purely on the assumption that the API might.

So, possible that file modification may be impossible to detect without upstream changes. We can see.

}
// metadata mode (default)
const parts = [item.name];
if (item.lastModified) parts.push(item.lastModified);
Copy link
Member

Choose a reason for hiding this comment

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

We think that item.lastModified was probably hallucinated.

@ewels
Copy link
Member

ewels commented Dec 17, 2025

Reimplemented the "deleted files" output in this PR: #27

@ewels
Copy link
Member

ewels commented Dec 18, 2025

Closing for now until we can show that the API really is able to return metadata about files like this.

@ewels ewels closed this Dec 18, 2025
@ewels ewels deleted the poll-files-update branch December 18, 2025 21:52
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.

3 participants