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

chore: reject invalid tasks on client #975

Merged
merged 1 commit into from
Jun 3, 2022

Conversation

frrist
Copy link
Member

@frrist frrist commented Jun 3, 2022

closes #969

Ideally, this check would be performed once in a job run Before option, but that would break the survey command since it uses different task names. This is making me rethink if the survey job should go somewhere else. Thoughts?

@frrist frrist requested review from placer14, hsanjuan and kasteph June 3, 2022 01:00
@frrist frrist self-assigned this Jun 3, 2022
Copy link
Contributor

@kasteph kasteph left a comment

Choose a reason for hiding this comment

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

🚀

@placer14
Copy link
Contributor

placer14 commented Jun 3, 2022

What was the motivation for separating peeragents again? IIRC, it was primarily a behavorial difference in that it was indexing external/ephemeral data and not local data. Which means it probably doesn't need the majority of the machinery that all of the other commands use. So maybe there is a separate binary here which just consumes a node API? ...lotus-survey effectively becomes just lotus with some API<->DB interactions on top.

tasks := RunFlags.Tasks.Value()
for _, taskName := range tasks {
if _, found := tasktype.TaskLookup[taskName]; found {
} else if _, found := tasktype.TableLookup[taskName]; found {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why twice? No objection but it's unusual.

Copy link
Member Author

Choose a reason for hiding this comment

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

Its different. TaskLookup vs TableLookup where TableLookup contains the granular task names.

@frrist
Copy link
Member Author

frrist commented Jun 3, 2022

What was the motivation for separating peeragents again? IIRC, it was primarily a behavorial difference in that it was indexing external/ephemeral data and not local data

Yeah, the Surveyer collects information on peers lily is connected to, meaning it doesn't inspect the chain - unlike the rest of the tasks.

Which means it probably doesn't need the majority of the machinery that all of the other commands use. So maybe there is a separate binary here which just consumes a node API? ...lotus-survey effectively becomes just lotus with some API<->DB interactions on top.

Yeah, it needs a DB and an API. It may be the case that drone already does some of this, do you know?

@frrist frrist merged commit 0464ef6 into master Jun 3, 2022
@frrist frrist deleted the frrist/reject-invalid-tasks-client branch June 3, 2022 23:10
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.

Starting a notifier with an invalid task name should fail on client
3 participants