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

Unify duplicate handling in Tasks #2

Open
duesee opened this issue May 30, 2024 · 5 comments
Open

Unify duplicate handling in Tasks #2

duesee opened this issue May 30, 2024 · 5 comments
Assignees

Comments

@duesee
Copy link
Collaborator

duesee commented May 30, 2024

  • Emit warning`
  • Take first or last?
    • Append -> Last
    • PostAppendNoOp -> Last (no warning)
    • PostAppendCheck -> Last (no warning)
    • AuthenticateTask -> Take last data (no warning). May take data instead of status.
    • ...

Proposal:

I think we want to tell our users not only that there was a duplicate, but also how we resolved the situation. Maybe something like ...

if let Some(old) = self.output.replace(seq) {
    // Note: `unwrap` can't fail here.
    warn!(?old, new=?self.output.unwrap(), "duplicate data replaced");
}

... ?

@soywod
Copy link
Member

soywod commented Jun 4, 2024

Is there any task that should take and keep the first? Seems like it is always the last. Otherwise I really like your proposition!

@duesee
Copy link
Collaborator Author

duesee commented Jun 4, 2024

I think not. It should always be the last.

@duesee
Copy link
Collaborator Author

duesee commented Jul 16, 2024

Hey @soywod! Can you assign me this issue?

@duesee
Copy link
Collaborator Author

duesee commented Jul 16, 2024

Or make me a collaborator so I can do myself, how you prefer :D

@soywod
Copy link
Member

soywod commented Jul 18, 2024 via email

@duesee duesee self-assigned this Jul 18, 2024
@soywod soywod changed the title feat: Unify duplicate handling in Tasks Unify duplicate handling in Tasks Sep 10, 2024
@soywod soywod added this to Pimalaya Sep 10, 2024
@soywod soywod moved this to Todo in Pimalaya Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants