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

Validate the DAG when validating the pipeline spec (aka at creation) #578

Merged

Conversation

vdemeester
Copy link
Member

@vdemeester vdemeester commented Mar 4, 2019

Changes

  • Small dag refactoring (and rename the package)
  • Migrate the DAG struct and how it's build to the API
  • Update dag package to take v1alpha1.DAG as argument for
    Schedulable, …
  • Validate the DAG after validateFrom, and update validateFrom
    with no linear assumption

@bobcatfish marking this one as WIP as I'm not really a huge fan of the change 😅. I feel there is a better way than moving some part in the api/v1alpha1 packages (but I ain't sure)…

Closes #559

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide
for more details.

Release Notes

Validate the pipeline's tasks dependency graph at creation

… and rename the package from resources to dag

Signed-off-by: Vincent Demeester <[email protected]>
@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 4, 2019
@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Mar 4, 2019
@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 4, 2019
@knative-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 4, 2019
- Migrate the `DAG` struct and how it's build to the API
- Update `dag` package to take `v1alpha1.DAG` as argument for
  Schedulable, …
- Validate the DAG after `validateFrom`, and update `validateFrom`
  with no linear assumption

Signed-off-by: Vincent Demeester <[email protected]>
@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-build-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/dag.go Do not exist 100.0%
pkg/apis/pipeline/v1alpha1/pipeline_validation.go 93.3% 94.1% 0.8
pkg/reconciler/v1alpha1/pipeline/dag/dag.go Do not exist 97.7%

@nader-ziada
Copy link
Member

why are not happy with the solution @vdemeester? because you had to split things between api and pipeline/dag packages?
I think that fine, I had a similar issue when I worked on the artifact stuff and ended up having to split things between api and artifact packages

@vdemeester vdemeester changed the title wip: Validate the DAG when validating the pipeline spec (aka at creation) Validate the DAG when validating the pipeline spec (aka at creation) Mar 5, 2019
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 5, 2019
Copy link
Member

@nader-ziada nader-ziada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 6, 2019
@knative-prow-robot knative-prow-robot merged commit 3853b16 into tektoncd:master Mar 6, 2019
@vdemeester vdemeester deleted the 559-dag-validate-creation branch March 6, 2019 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants