Coder Social home page Coder Social logo

Comments (9)

ekimia avatar ekimia commented on May 28, 2024 1

Would totally be down to submit a PR but wanted to get the feelers out about this change.

from rome.

tmspzz avatar tmspzz commented on May 28, 2024

Hi @ekimia, thanks for opining an issue.

If I understand correctly you want to build what is missing in the cache and then upload it.
This use case is already supported as described in https://github.com/blender/Rome#listing but as I just realised the CI workflow is not obvious.

What you want to do is list before building/uploading like so:

# Rome CI workflow

rome download --platform iOS # download missing frameworks (or copy from local cache)
rome list --missing --platform ios | awk '{print $1}' | xargs carthage update --platform ios # list what is missing and update/build if needed
rome list --missing --platform ios | awk '{print $1}' | xargs rome upload --platform ios # upload what is missing

If no frameworks are missing the pipe to awk will fail and the rest of the command will not be executed. This avoids rebuilding all dependencies or uploading frameworks already present in the cache. For the sake of understanding the complete command you can call list with --present to get a feeling for the different steps.

Does this help in supporting your workflow?

The download command could be further enhanced to even skip copying file locally if your Carthage .version files are present and frameworks are at the correct hash.

from rome.

tmspzz avatar tmspzz commented on May 28, 2024

I have opened a PR to enhance the documentation on the CI workflow. Feel free to comment: https://github.com/blender/Rome/blob/fix/ci-workflow-readme/README.md#ci-workflow

from rome.

ekimia avatar ekimia commented on May 28, 2024

ah this is perfect! Great idea to enhance the documentation.

from rome.

tmspzz avatar tmspzz commented on May 28, 2024

@ekimia here is the PR #71, let me know if you have comments.

About exiting with non-zero status from a download command there are the following considerations to make:

  • exit with non-zero when ANY artifact download fails?
    • each artifact download failure could be encoded as a bit pattern and ORed together in a final error code
      • failing framework: 0x02
      • failing dSYM: 0x04
      • failing .versionFile: 0x8
  • exit with non-zero only when framework download fails?
  • exit with non-zero only on runtime errors (current behaviour)
    • bad .aws credentials
    • conflicting parameters
    • unrecoverable network error
    • ...

from rome.

netbe avatar netbe commented on May 28, 2024

I would be up for

exit with non-zero only when framework download fails?

from rome.

erichoracek avatar erichoracek commented on May 28, 2024

I think this really depends on what you consider rome's job to be. In my opinion:

If you perform rome download and you get a partial hit, this seems like rome did what you asked to the best of its ability. There is no way that rome could have succeeded any more concretely beside there more artifacts being present in the cache, which will never change no matter how many times you run rome download. As for whether or not this is a non-zero exit status, this depends on whether you think rome download means "warm the carthage build folder with cached frameworks" or "download every possible framework, otherwise bail". For me, I interpret it as the former since I see rome as a cache in front of carthage. In my experience with caching APIs, a cache miss is typically not a exception-style failure, just one of two possible successful outcomes (hit/miss).

from rome.

tmspzz avatar tmspzz commented on May 28, 2024

I agree with @erichoracek , a miss is just one of the possible outcomes, it's not an exceptional failure that terminates the program execution.

For the time being I'll leave things as they are. If the issue is brought up again I'll consider exiting with non-zero status.

@ekimia please consider closing the issue if the explanations I gave about the CI workflow are enough for you.

from rome.

tmspzz avatar tmspzz commented on May 28, 2024

Closing for now.

from rome.

Related Issues (20)

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.