aliyun provider oss_task_handler.py has bug about oss_log_exists #35654
Unanswered
advancehuanghang
asked this question in
General
Replies: 1 comment 5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are using oss as remote log storage, and we found a issue when run with deferrable operator, the root cause is here:
def oss_write(self, log, remote_log_location, append=True) -> bool:
oss_remote_log_location = f"{self.base_folder}/{remote_log_location}"
pos = 0
if append and self.oss_log_exists(oss_remote_log_location):
head = self.hook.head_key(self.bucket_name, oss_remote_log_location)
pos = head.content_length
self.log.info("log write pos is: %s", str(pos))
And then in oss_log_exists function:
def oss_log_exists(self, remote_log_location):
oss_remote_log_location = f"{self.base_folder}/{remote_log_location}"
with contextlib.suppress(Exception):
return self.hook.key_exist(self.bucket_name, oss_remote_log_location)
return False
So the target oss_remote_log_location has a redundant base_folder prefix, and which is not we expected.
Can any one fix this issue ASAP?
thanks.
Beta Was this translation helpful? Give feedback.
All reactions