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

Provide a design about Pipeline Template #453

Merged

Conversation

JohnNiang
Copy link
Member

@JohnNiang JohnNiang commented Jan 26, 2022

What type of PR is this?

/kind design
/kind feature

What this PR does / why we need it:

  1. Write a design about Pipeline Template according to Pipeline Template Design #452 .
  2. Create Template API.
  3. Refine Pipeline API to refer to a template.
  4. Provide samples for Template and Pipeline APIs.

Which issue(s) this PR fixes:

Fixes #452

Special notes for reviewers:

Hi @kubesphere/sig-devops , this PR only contains basic definition of Template API and addition of Pipeline API, not contain any reconciliation logic here. The most important thing is the design of Pipeline Template.

Does this PR introduce a user-facing change??

Improve the Pipeline templates which can load from API

Signed-off-by: johnniang <johnniang@fastmail.com>
Signed-off-by: johnniang <johnniang@fastmail.com>
Signed-off-by: johnniang <johnniang@fastmail.com>
Signed-off-by: johnniang <johnniang@fastmail.com>
@ks-ci-bot ks-ci-bot added kind/design Categorizes issue or PR as related to design. release-note-none kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 26, 2022
@codecov
Copy link

codecov bot commented Jan 26, 2022

Codecov Report

Merging #453 (4bf1331) into master (6cb96cf) will decrease coverage by 0.04%.
The diff coverage is 14.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #453      +/-   ##
==========================================
- Coverage   76.98%   76.94%   -0.05%     
==========================================
  Files         111      113       +2     
  Lines       22094    22101       +7     
==========================================
- Hits        17009    17005       -4     
- Misses       4909     4919      +10     
- Partials      176      177       +1     
Flag Coverage Δ
unittests 76.94% <14.28%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
controllers/template_controller.go 0.00% <0.00%> (ø)
pkg/api/devops/v1alpha1/groupversion_info.go 100.00% <ø> (ø)
pkg/api/devops/v1alpha1/template_types.go 100.00% <100.00%> (ø)
...trollers/devopsproject/devopsproject_controller.go 40.62% <0.00%> (-2.61%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6cb96cf...4bf1331. Read the comment docs.

pkg/api/devops/v1alpha3/pipeline_types.go Outdated Show resolved Hide resolved
pkg/api/devops/v1alpha3/pipeline_types.go Outdated Show resolved Hide resolved
pkg/api/devops/v1alpha3/pipeline_template.go Outdated Show resolved Hide resolved
pkg/api/devops/v1alpha1/template_types.go Show resolved Hide resolved
pkg/api/devops/v1alpha3/pipeline_template.go Outdated Show resolved Hide resolved
pkg/api/devops/v1alpha1/template_types.go Show resolved Hide resolved
docs/pipeline-template.md Outdated Show resolved Hide resolved
docs/pipeline-template.md Outdated Show resolved Hide resolved
@JohnNiang
Copy link
Member Author

JohnNiang commented Jan 26, 2022

#453 (comment)

Hi @kubesphere/sig-devops , I found that multi-version API might be very complex. We need to create a brand new Pipeline API event if we only add template referent. Meanwhile, we also need to create a Webhook to convert CR between our versions.

I'd prefer to revert Pipeline API enhancement now and fire another PR to solve those problems. What do you reckon?

@LinuxSuRen
Copy link
Member

I'd prefer to revert Pipeline API enhancement now and fire another PR to solve those problems. What do you reckon?

Agree!

Signed-off-by: johnniang <johnniang@fastmail.com>
@ks-ci-bot ks-ci-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 26, 2022
@JohnNiang
Copy link
Member Author

Hi @kubesphere/sig-devops , I have reverted Pipeline API improvment according to #453 (comment), please take some moment to have a look.

Signed-off-by: johnniang <johnniang@fastmail.com>
Copy link
Member

@LinuxSuRen LinuxSuRen left a comment

Choose a reason for hiding this comment

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

/label tide/merge-method-squash
/lgtm
/approve

@ks-ci-bot ks-ci-bot added tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. lgtm Indicates that a PR is ready to be merged. labels Feb 7, 2022
@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, LinuxSuRen

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

@ks-ci-bot ks-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 7, 2022
@LinuxSuRen LinuxSuRen merged commit e9a0b1c into kubesphere:master Feb 7, 2022
@JohnNiang JohnNiang deleted the feat/pipeline-template-design branch February 7, 2022 09:19
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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/design Categorizes issue or PR as related to design. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pipeline Template Design
3 participants