Giter Club home page Giter Club logo

Comments (2)

astjohn avatar astjohn commented on July 28, 2024

After testing, I think I found part of the problem.
Something is wrong by the use of Arc.Definition.Versioning.resolve_file_name(definition, version, file_and_scope) over here

By the time this function is called, the Arc.File looks something like the following:

%Arc.File{
   binary: nil,
   file_name: "1_list_image.jpg",
   path: "/var/folders/7n/l6vc139d0c7bswg8b84j45s80000gn/T/QEWTHIDYJLEA2IDVIQXGVLPAB5EUWCWU.png"
 }

Note how file_name already has the format that the definition has defined. Then when we call Arc.Definition.Versioning.resolve_file_name, we are essentially running through the definition's filename function again resulting in a redundant operation. I'm not sure what the intention is and would love some feedback. In the meantime, I'll continue to work on a fix.

from arc_gcs.

astjohn avatar astjohn commented on July 28, 2024

I found the bug and have a pull request finished.

The issue is that the file path must be calculated separately in the put function as arc has already modified the file.file_name value to reflect the output of the definition's filename function.

Therefore, we can't use do_gcs_key at this point in time.

I made some changes that take the same approach as arc's S3 layer - namely, calculate path during the put function.

from arc_gcs.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.