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

adding new_pathWrite() as per Reid suggestion #1049

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

petersilva
Copy link
Contributor

I worked on this last week and got distracted by ddsr-dev replacing the gswob feed to the datamart. This is kind of the complement to getContent() that is used to write local files and return a well-formed message for it.

It should be helpful in callbacks that transform data. I don't know when I will get back to this either.

Copy link

github-actions bot commented May 15, 2024

Test Results

244 tests   235 ✅  17s ⏱️
  1 suites    8 💤
  1 files      1 ❌

For more details on these failures, see this check.

Results for commit c5a8d8b.

♻️ This comment has been updated with latest results.

@petersilva petersilva marked this pull request as ready for review May 15, 2024 16:44
@petersilva
Copy link
Contributor Author

@reidsunderland worry:

  • if message has inlined file data... what happens?
    • current implementation ignores it. result if present... new data will be over-written by message data if download==True.

what is a good behaviour?

  • if data==None

    • use data from inline, write to disk.
  • if data!=None

  • consider this an override for inline data...

  • look at options...

    • if inlining is active, then update the inline field, in addition to writing the data.
    • if ! inlining, then remove the field.
  • if download==True... potential for double file write.

    • perhaps not because mtime & checksum....

For converter plugins in general, all the options feel weird...

  • shovel(flowcb/filter/wmo2msc)

    • change line termination,
    • changes file tree.
    • shovels feel weird because they are supposed to be about messages... not data.
    • renamer is natural
  • sarra

    • feel less weird than shovels... not convinced they are wrong...
    • renamers are natural here also.
  • sender (flowcb/filter/wmo00 )

    • wmo00_accumulate makes sense... but is it a general thing, or it just makes sense in that case?
    • renamers are natural here also.
  • flow ... should transformers use a flow to denote that they aren't doing what any standard components do.

  • transform/xform/convert/fx/ ... should we establish another type of flow for conversion?

    • just a sarra with download off, because we will be transforming data.
    • this makes it identical to a shovel... ;-)

This is essentially re-inventing the discussion in #494... and we the hierarchy makes sense again...

for now, conclusion is to use flow/cvt_ to represent transformers.

Also need to set msg['size'] = len(data)

@petersilva petersilva changed the title adding new_fileWrite() as per Reid suggestion adding new_pathWrite() as per Reid suggestion May 25, 2024
@petersilva
Copy link
Contributor Author

last commit included "size" support as well. so I guess it's good to go.

@petersilva
Copy link
Contributor Author

I'm still puzzled as to why I haven't figured out how to leverage Transfer classes for this stuff, or have code from transfer moved here... or... Transfer/_init_.py there is read_writelocal which is exactly the same logic... but a bit more complete.

@petersilva petersilva added bug Something isn't working Priority 1 - ASAP Absolute Priority... really need to do this. Refactor change implementation of existing functionality. HPC related to hich performance computing mirroing use case crasher Crashes entire app. ReliabilityRecovery improve behaviour in failure situations. enhancement New feature or request likely-fixed likely fix is in the repository, success not confirmed yet. and removed bug Something isn't working Priority 1 - ASAP Absolute Priority... really need to do this. Refactor change implementation of existing functionality. HPC related to hich performance computing mirroing use case crasher Crashes entire app. ReliabilityRecovery improve behaviour in failure situations. labels May 31, 2024
@petersilva petersilva merged commit f655319 into development Jun 3, 2024
26 of 36 checks passed
@petersilva petersilva deleted the Messaage_fileWrite_method branch June 6, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request likely-fixed likely fix is in the repository, success not confirmed yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant