devfile / api

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

Provide Mock Interface for Devfile Downloads on devfile/library #1221

Closed kim-tsao closed 7 months ago

kim-tsao commented 11 months ago

/kind user-story

Which area this user story is related to?

/area library

User Story

As a devfile library client, I want to mock test devfile downloads from a private repo so I can test my client code properly.

From the investigation that was done in https://github.com/devfile/api/issues/1216#issuecomment-1677353799, we need to fix the DownloadInMemory function to:

  1. Error out when we receive an unsupported git vendor URL
  2. Convert the function to a method so tooling clients can write mock tests
  3. See what the impact is for the following scenarios:

    1. Setting the devfile content in context.Populate/PopulateURL - which would require mocking of these two methods as well
    2. Converting K8s URI to inline
    3. Reading the Kubernetes yaml for outerloop support, affecting our client usage.

Acceptance Criteria

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.

maysunfaisal commented 7 months ago

Error out when we receive an unsupported git vendor URL

Thought about this, but we should not error out in these situations and treat such git vendors as regular URLs and attempt a best case regular GET like other URLs