Coder Social home page Coder Social logo

Validate the Build on creation about build HOT 8 CLOSED

sbose78 avatar sbose78 commented on August 18, 2024
Validate the Build on creation

from build.

Comments (8)

zhangtbj avatar zhangtbj commented on August 18, 2024

On creation of a Build, also need to validate that the formats in spec are valid.

  • Like git url
  • Like out image path
  • Like builder image
  • Like resource limit

from build.

qu1queee avatar qu1queee commented on August 18, 2024

@sbose78 Iยดm taking this one, fyi

from build.

sbose78 avatar sbose78 commented on August 18, 2024

Go ahead! :)

from build.

qu1queee avatar qu1queee commented on August 18, 2024

@sbose78 for this particular issue, it seems most of the controllers lack of unit tests. For the verification of specific resources, I think the best place is during the reconciliation. For this we need to fake some artifacts, like the client and the manager.

Can you please take a look on https://github.com/redhat-developer/build/compare/master...qu1queee:qu1queee/83?expand=1 . I have a prototype on how to do this, by using counterfeiter. The code its WIP(dirty), but I think the idea is clear.

Let me know what you thing pls.

from build.

sbose78 avatar sbose78 commented on August 18, 2024
// NewReconciler returns a new reconcile.Reconciler
func NewReconciler(mgr manager.Manager) reconcile.Reconciler {

Did you export these to be able to use them from /fakes/* ? If that's the only reason, I would recommend not exporting them, rather bring the fakes into the same package. Suggesting this so that we don't inadvertently expose something we were generally not planning on exposing :)

What do you think?

from build.

sbose78 avatar sbose78 commented on August 18, 2024

Ah, you are using package build_test :) I like that!

from build.

sbose78 avatar sbose78 commented on August 18, 2024

Looks good, go for it @qu1queee !

from build.

qu1queee avatar qu1queee commented on August 18, 2024

This card have been completed, closing.

from build.

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.