Giter Club home page Giter Club logo

Comments (5)

 avatar commented on September 3, 2024

Couple of ideas:

  1. When the git resolver returns a successfully fetched file it also sends back the resolved commit from the branch. Alongside this it could also return an alias hint that tells Pipelines "other refs with same branch should be updated to use commit instead".
  2. Similar to above ^ except resolvers could publish this information once somewhere and pipelines could pick it up before any files are requested. This config could be another "ResourceRequest" type e.g.
kind: ResourceRequest
apiVersion: resolution.tekton.dev/v1alpha1
metadata:
  name: resolver-config-2938df38j92a8d9
  labels:
    resolution.tekton.dev/type: resolver-config
spec:
  params:
    resolver-type: foobar

Pipelines could submit this ResourceRequest the first time it sees a git type pipelineRef or taskRef. The git resolver would respond by writing a bit of json config into the status.data field. This config would include the information required for Pipelines to know that params branch and tag should be converted to commit:

// This json blob will be written by the foobar resolver and
// end up encoded as base64 in the status.data field of the
// ResourceRequest above so Pipelines can read it back:
{
  "address-narrowing": [
    { "from": "branch", "to": "commit" },
    { "from": "tag", "to": "commit" }
  ]
}

Pipelines could read this information and use it to inform decisions it makes about requesting pipelineRefs and taskRefs. For example, if it sees multiple taskRefs in a Pipeline that all share a branch param, it would know from this configuration that it should request the first taskRef and then re-use whatever commit is returned in place of each matching branch for all the other taskRefs. In this way every task from the same branch ends up pinned to the same commit. The libraries that tektoncd/resolution provides should be able to offer this functionality generically in some way so that the logic for it doesn't need to live in each client.

  1. Resolvers could share a ConfigMap with this kind of configuration data that pipelines/other clients could then read it from.

from resolution.

tekton-robot avatar tekton-robot commented on September 3, 2024

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

from resolution.

tekton-robot avatar tekton-robot commented on September 3, 2024

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

from resolution.

tekton-robot avatar tekton-robot commented on September 3, 2024

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

from resolution.

tekton-robot avatar tekton-robot commented on September 3, 2024

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from resolution.

Related Issues (15)

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.