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

storage: fix storage_update API #368

Merged
merged 1 commit into from
Nov 19, 2023
Merged

Conversation

DingMeng-Siemens
Copy link
Contributor

The storage_update need to change since the _storage_write is removed.
to solve issue #366
cc @chombourger @bovi

@github-actions github-actions bot requested a review from chombourger November 17, 2023 07:02
mtda/client.py Outdated
impl = self._impl
session = self._session

file = ImageLocal(path, impl, session, blksz, callback)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am adding ImageFile.new() with #369
if used here, it will let us storage update a file which is either local or remote

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I will change.

Copy link
Collaborator

Choose a reason for hiding this comment

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

thank you. I have merged #369. you should be able to rebase your work

mtda/client.py Outdated

try:
# Prepare for download/copy
file.prepare(imgsize)
Copy link
Collaborator

@chombourger chombourger Nov 17, 2023

Choose a reason for hiding this comment

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

with #369, prepare() can be told the compression format to use
(file.prepare(imgsize, compression=CONSTS.IMAGE.RAW.value))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I will change.

@DingMeng-Siemens
Copy link
Contributor Author

DingMeng-Siemens commented Nov 19, 2023

Refined the code.
I also removed _self.writer.start() from storage_update() in main.py, because this will create an unmanaged writing thread and that will cause strange behavior since we already call storage_open() to create writing thread in storage_update() in client.py.
cc @chombourger Please check.

mtda/client.py Outdated
Comment on lines 202 to 203
# It also prevents us from loading a new bmap file while
# another transfer may be on-going
Copy link
Collaborator

Choose a reason for hiding this comment

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

this portion of the comment is not relevant (bmap files are only used with storage write)

@chombourger
Copy link
Collaborator

Changes look good. just one comment needs to be updated

@DingMeng-Siemens
Copy link
Contributor Author

changed

@chombourger chombourger merged commit 20b795a into siemens:master Nov 19, 2023
1 check passed
@bovi
Copy link
Member

bovi commented Nov 19, 2023

@DingMeng-Siemens great work!

@chombourger thanks for merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants