kubectl icon indicating copy to clipboard operation
kubectl copied to clipboard

Umbrella Issue: refactor commands to split flags from options

Open soltysh opened this issue 4 years ago • 37 comments

Currently most or even all of the commands have an *Options structure holding all of the data needed to run a command and three main methods Complete (finishing *Options struct), Validate (validating *Options struct) and Run (actual code behind the command). The current problem is that these *Options struct is tightly coupled with flags, but we'd like to split these.

A perfect example is wait command.

This issue should serve as a synchronization point.

/cc @eddiezane @seans3

soltysh avatar Apr 28 '21 14:04 soltysh

/triage accepted

soltysh avatar Apr 28 '21 14:04 soltysh

/remove-help /remote-good-first-issue

Holding off on this until we scope better and trial a few to confirm it's what we want.

eddiezane avatar Apr 28 '21 16:04 eddiezane

@soltysh looking at logs and get

eddiezane avatar Apr 28 '21 16:04 eddiezane

@rikatz will take basic create

eddiezane avatar Apr 28 '21 16:04 eddiezane

@KnVerey to look at drain or describe

eddiezane avatar Apr 28 '21 16:04 eddiezane

@eddiezane will look at a simple config command

eddiezane avatar Apr 28 '21 16:04 eddiezane

/assign So I wont forget :)

rikatz avatar Apr 28 '21 16:04 rikatz

Will do create with @rikatz synchronously

lauchokyip avatar Apr 30 '21 04:04 lauchokyip

/assign I'll try to do for apply command

SaiHarshaK avatar May 01 '21 06:05 SaiHarshaK

/assign

ihcsim avatar May 04 '21 23:05 ihcsim

i can do attach.

ihcsim avatar May 04 '21 23:05 ihcsim

A simple summary:

  • [x] - wait ✅ a perfect example
  • [ ] - [WIP]create @lauchokyip & rikatz https://github.com/kubernetes/kubernetes/pull/101736
  • [ ] - logs and get @soltysh
  • [ ] - apply @SaiHarshaK
  • [ ] - config @eddiezane
  • [ ] - drain/describe @KnVerey
  • [ ] - attach @ihcsim
  • [ ] - scale @BigaDev

pacoxu avatar May 07 '21 09:05 pacoxu

@BigaDev will take a look at scale

eddiezane avatar May 11 '21 15:05 eddiezane

@pacoxu thanks for the summary!

I want to make sure folks understand that this will be a bit of an iteration process while we dial in exactly what we want these to look like. Expect some refactors and potential rewrites.

eddiezane avatar May 11 '21 15:05 eddiezane

/assign

scale

BigaDev avatar May 11 '21 16:05 BigaDev

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Aug 09 '21 23:08 k8s-triage-robot

/remove-lifecycle stale

lauchokyip avatar Aug 11 '21 02:08 lauchokyip

/remove-kind design /kind feature kind/design is migrated to kind/feature, see https://github.com/kubernetes/community/issues/6144 for more details

MadhavJivrajani avatar Oct 11 '21 10:10 MadhavJivrajani

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 09 '22 11:01 k8s-triage-robot

/remove-lifecycle stale On Jan 9, 2022, 06:32 -0500, Kubernetes Triage Robot @.***>, wrote:

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:

• After 90d of inactivity, lifecycle/stale is applied • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

• Mark this issue or PR as fresh with /remove-lifecycle stale • Mark this issue or PR as rotten with /lifecycle rotten • Close this issue or PR with /close • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>

lauchokyip avatar Jan 09 '22 13:01 lauchokyip

/lifecycle frozen Considering this is a long term tracking issue :)

MadhavJivrajani avatar Feb 07 '22 17:02 MadhavJivrajani

/assign

I'll refactor label :)

jaehnri avatar Sep 17 '22 19:09 jaehnri

@KnVerey Have you started to refactor the describe command ?

PuneetPunamiya avatar Sep 21 '22 05:09 PuneetPunamiya

@soltysh Based on the slack conversation, I'm picking up the describe command, thanks!

cc @KnVerey

/assign

Refactoring describe command

PuneetPunamiya avatar Sep 24 '22 13:09 PuneetPunamiya

I'll refactor explain :)

PuneetPunamiya avatar Oct 03 '22 08:10 PuneetPunamiya

Will do diff next!

jaehnri avatar Oct 03 '22 17:10 jaehnri

Hey! I was wondering if you guys needed more help on this issue. I'm happy to pick up a command and start working on it.

varksvader avatar Oct 17 '22 21:10 varksvader

/assign

Talked to owner of issue. Grabbing drain to refactor.

varksvader avatar Oct 18 '22 14:10 varksvader

I'll refactor create /assign

harshitasao avatar Oct 21 '22 18:10 harshitasao

@harshitasao , I think I finished create a while ago (https://github.com/kubernetes/kubernetes/pull/101736), just waiting for review, would you be able to pick other command to refactor instead?

lauchokyip avatar Nov 20 '22 19:11 lauchokyip

@brunopecampos: GitHub didn't allow me to assign the following users: brunopecampos.

Note that only kubernetes members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide

In response to this:

/assign

I'll do diff

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.

k8s-ci-robot avatar Jan 18 '23 23:01 k8s-ci-robot