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

⚠ Update models #1911

Merged
merged 1 commit into from
Jan 22, 2021
Merged

Conversation

Adirio
Copy link
Contributor

@Adirio Adirio commented Dec 17, 2020

Description

  • Stage model:
    • Extracted to a separate model package to be shared by plugin and project configuration versions
    • Cove coverage: 100%
  • Options:
    • Move Options to pkg/plugins/golang
    • Code coverage: 100%
  • Resource model:
    • GVK submodel
    • Make compound fields (those that can be obtained from other fields) be methods instead of fields
    • Add auxiliary methods to check if each part should be scaffolded
    • Update method to allow Config files modify the tracked information about the resources.
    • Code coverage: 100%
  • Project configuration:
    • Split each version into each own package that share a common interface
    • Code coverage: 97.11%

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 17, 2020
Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

just one question. Otherwise, it shows fine.
But, I think that would be nice to get @estroz's review on this one.

^ ignore my above comment it receives changes after that.

@Adirio
Copy link
Contributor Author

Adirio commented Dec 17, 2020

just one question. Otherwise it shows fine.

It is still a draft, I plan to add more updates including Resource and Config, so that this can replace #1869, but having the changes better structured

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 17, 2020
@Adirio Adirio force-pushed the update-models branch 3 times, most recently from 30d8135 to 0639798 Compare December 17, 2020 14:37
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 17, 2020
@camilamacedo86
Copy link
Member

What is the closer goal of this pr?

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 17, 2020
@Adirio
Copy link
Contributor Author

Adirio commented Dec 17, 2020

What is the closer goal of this pr?

This is still a draft, some additional changes are going to be done as explained in the first message. For exmple GVK will be part of the interface with the Config file.

@estroz
Copy link
Contributor

estroz commented Jan 19, 2021

remember that a init plugin doesn't need to match a create api, or edit plugins and therefore the PROJECT handled by plugins will be a hell to manage not only for developers but also for users.

If we forced init to create some config then this could work. However I agree it may be more problematic than the current problem 😬.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Adirio, estroz

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 19, 2021
@estroz
Copy link
Contributor

estroz commented Jan 19, 2021

@DirectXMan12 can you take a look at this? Also coveralls may need to be overridden (I think coverage change is a false positive in terms of functional coverage).

@Adirio
Copy link
Contributor Author

Adirio commented Jan 19, 2021

P.S.: Coveralls computes the final score only considering those packages that have at least a *_test.go file. Package pkg/plugins/go/v2 adds tests for its Options object, which includes the v2 plugin code in the coverage, resulting in a coverage false "decrease" according to coveralls. In reality, the coverage has increased. Master has 1364 lines covered (link) and this PR has 1863 (link).

This ⬆️

What we may want to do is place a suite test in every directory (that PR will get a horrible coveralls score) so that the following PRs do show the real result. (We probably want some exceptions, like template scaffolds which dont need to be tested in unit tests.)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 20, 2021
@Adirio Adirio force-pushed the update-models branch 4 times, most recently from 7f18984 to 861f65b Compare January 21, 2021 10:45
…ce for better project version maintanability

Signed-off-by: Adrian Orive <adrian.orive.oneca@gmail.com>
Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Hi @Adirio,

Great work 🥇
I could make Ansible/Helm plugins in SDK work with the changes.
For the golang I still needing to figure out some nits but all shows fine.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 22, 2021
@camilamacedo86
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2021
@k8s-ci-robot k8s-ci-robot merged commit 1e78a6f into kubernetes-sigs:master Jan 22, 2021
@Adirio Adirio deleted the update-models branch January 22, 2021 07:36
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", 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.

4 participants