-
Notifications
You must be signed in to change notification settings - Fork 13
add supported server resources checks #592
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
base: remove-s3-bucket-polling
Are you sure you want to change the base?
Conversation
@@ -229,6 +351,7 @@ async def delete_transform(self, transform_id=None): | |||
f"Failed to delete transform {transform_id} - {msg}" | |||
) | |||
|
|||
@requires_resource("transformationresults") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle, in your code, we should never fail this check, right?
begin_at = new_begin_at | ||
if transformation_results_enabled: | ||
new_begin_at = datetime.datetime.now(tz=datetime.timezone.utc) | ||
files = await self.servicex.get_transformation_results( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any reason that get_transformation_results
can't just return the same list of objects that self.minio.list_bucket()
would? This would simplify the failover logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list_bucket returns a list of objects with a filename
attribute, while the ServiceX adapter call is just turning JSON into dictionaries which have a 'file-path' key. I can change the key name to 'filename', but I don't think it's a good idea to change the dictionaries to objects with filename attributes given that pattern isn't reused anywhere else in the ServiceX adapter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle you could of course change the minio adapter to list the files with a dictionary instead of a list of objects of course... I would just like the "list of files to be downloaded" to be a type that doesn't depend on the source of the information.
Note also my comment on the backend PR - I'm concerned that this thing may need a new column in the database anyway, and whether you want to keep the same name may be up for discussion.
Adds client support for checking whether a server supports a given resource/endpoint.
This PR shows two implementation patterns: