Skip to content

fix: don't start operator if last_processed_batch_filepath isn't provided#1211

Merged
uri-99 merged 5 commits into
stagingfrom
1209-dont-start-operator-if-it-hasnt-provide-last_processed_batch_filepath-in-config-file
Oct 14, 2024
Merged

fix: don't start operator if last_processed_batch_filepath isn't provided#1211
uri-99 merged 5 commits into
stagingfrom
1209-dont-start-operator-if-it-hasnt-provide-last_processed_batch_filepath-in-config-file

Conversation

@MarcosNicolau
Copy link
Copy Markdown
Member

Changes
If last_processed_batch_filepath is not provided on the operator config, then don't start the program. This is to make sure operator owners don't forget to pass this new field. Alternatively, we could create a default file but I am not sure about how that could go.

Testing
Remove the last_processed_batch_filepath from the operator config and you should see an err indicating the missing field.

Closes #1209

@PatStiles
Copy link
Copy Markdown
Contributor

Works on my machine

…ide-last_processed_batch_filepath-in-config-file
Copy link
Copy Markdown
Contributor

@uri-99 uri-99 left a comment

Choose a reason for hiding this comment

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

It should also fail if the folder of the file is non-existent. This is because Operator will fail to create the file if the folder given does not exist.

@MarcosNicolau MarcosNicolau requested a review from uri-99 October 14, 2024 16:53
@MarcosNicolau
Copy link
Copy Markdown
Member Author

It should also fail if the folder of the file is non-existent. This is because Operator will fail to create the file if the folder given does not exist.

Updated!

Copy link
Copy Markdown
Contributor

@uri-99 uri-99 left a comment

Choose a reason for hiding this comment

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

new constraint doesnt allow creation of file. It should be able to create a file, but only on an existing directory.

@uri-99 uri-99 merged commit e0db1ea into staging Oct 14, 2024
@uri-99 uri-99 deleted the 1209-dont-start-operator-if-it-hasnt-provide-last_processed_batch_filepath-in-config-file branch October 14, 2024 18:28
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.

Don't start operator if it hasn't provide last_processed_batch_filepath in config file

4 participants