devfile / api

Kube-native API for cloud development workspaces specification
Apache License 2.0
261 stars 63 forks source link

Create deployment scope detection mechanism for index generator #1197

Open michael-valdron opened 1 year ago

michael-valdron commented 1 year ago

Which area this feature is related to?

/area registry

Which functionality do you think we should add?

Why is this needed? Is your feature request related to a problem?

Allows index server to serve clients an index schema, /v2index response, which contains new field(s) for getting the deployment scope (innerloop/outerloop) of a stack.

Detailed description:

Since the release of devfile 2.2.0, more and more stack under the devfile registry have been adopting outerloop support within the newest versions. However, with there being certain stacks which have not adopted outerloop support yet along with legacy stack versions which would not either comes no guarantee that all devfile 2.2.0 stacks will support outerloop.

In addition, there can also exist new stacks going forward which only support outerloop as well.

With the introduction of new field(s) under the index schema which indicates the deployment scope of the stacks, this can make it easier for clients to filter to the scopes they need.

Describe the solution you'd like

  1. ~A new field or fields which indicate the deployment scope of stacks~ (tracking this in #1321)
  2. A function for checking if a Kubernetes or OpenShift deployment spec exists
  3. A function for detecting the deployment scope and to fill in this information during generation of the index
  4. Unit test cases for these functions

Innerloop Detection Example

hasInnerloopCommandGroups := commandGroups["run"] || commandGroups["debug"]
hasInnerloopComponents := false

for _, component := range components {
  if component.Container != nil {
    hasInnerloopComponents = true
    break
  }
}

if hasInnerloopComponents && hasInnerloopCommandGroups {
  deploymentScopes["innerloop"] = true
}

Describe alternatives you've considered

The alternative is to advise clients on how to perform deployment scope detection on the client side of the devfile response from the index server.

Additional context

Blocked by #1322 for detail on implementation of the detection mechanism and by #1321 for the new deployment scope field.

michael-valdron commented 1 year ago

https://github.com/devfile/api/issues/959 will include the addition of the deployment scope filter on completion of this issue.

michael-valdron commented 1 year ago

Complexity sizing: August 4, 2023 Time sizing: October 19, 2023

michael-valdron commented 1 year ago

Based on #1321 & #1322 refinement and sizing this issue will need to be resized to its current details and scope. Moved out of sprint and rescheduled for an upcoming refinement call.

michael-valdron commented 1 year ago

Previous points are 8 complexity based / 8 time based

michael-valdron commented 1 year ago

blocked by #959 to provide filtering before field implementation: https://github.com/devfile/api/issues/959#issuecomment-1792605675

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days.

michael-valdron commented 8 months ago

Still needed and waiting on #959 to be resolved.

michael-valdron commented 6 months ago

959 is resolved, and this issue is now unblocked.

michael-valdron commented 6 months ago

https://github.com/devfile/api/issues/1321 is still blocking this issue, need to replace effort towards resolving that one: https://github.com/devfile/api/issues/1321#issuecomment-2077989164

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days.