Skip to content

DownloadGitRepoResources function implementation should also handle variations of other devfile.yaml in its if-block #1362

Description

@maysunfaisal

Which area this feature is related to?

/kind bug

Which area this bug is related to?

/area library

What versions of software are you using?

Go project

Operating System and version:

Go Pkg Version:

Node.js project

Operating System and version:

Node.js version:

Yarn version:

Project.json:

Web browser

Operating System and version:

Browser name and version:

Bug Summary

Describe the bug:

The DownloadGitRepoResources function implementation checks for devfile.yaml,

if !gitUrl.IsFile || gitUrl.Revision == "" || !strings.Contains(gitUrl.Path, OutputDevfileYamlPath) {
	return fmt.Errorf("error getting devfile from url: failed to retrieve %s", url)
}

The function should also handle various other possibilities of devfile.yaml like devfile.yml, .devfile.yaml, .devfile.yml...

To Reproduce:

Expected behavior

Function should be able to handle various devfile naming conventions.

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable

Additional context

devfile.yaml has a few naming conventions that is accepted like .devfile.yaml and devfile.yml. They should be considered along side devfile.yaml

Any workaround?

Suggestion on how to fix the bug

Activity

  1. added
    kind/bugSomething isn't working
    area/libraryCommon devfile library for interacting with devfiles
    on Nov 27, 2023
  2. moved this to Refinement in Devfile Projecton Jan 3, 2024
  3. self-assigned this
    on Jan 23, 2024
  4. Jdubrick commented on Feb 1, 2024

    @Jdubrick
    Contributor

    Need to add acceptance criteria for determining if the function affected should be auto-detecting or if the user is passing a devfile url and we are trying to parse it.

  5. moved this from Refinement to Backlog in Devfile Projecton Feb 1, 2024
  6. moved this from Backlog to To Do 📝 in Devfile Projecton Feb 6, 2024
  7. moved this from To Do 📝 to In Progress 🚧 in Devfile Projecton Feb 20, 2024
  8. Jdubrick commented on Feb 20, 2024

    @Jdubrick
    Contributor

    Need to add acceptance criteria for determining if the function affected should be auto-detecting or if the user is passing a devfile url and we are trying to parse it.

    Looks like in the usage documentation at step 1 the entry point is devfilePkg.ParseDevfileAndValidate(parserArgs), this trickles down to the DownloadGitRepoResources function. I believe as a result this is going to take a user input for the devfile in an attempt to parse it.

  9. moved this from In Progress 🚧 to In Review 👀 in Devfile Projecton Feb 21, 2024
  10. moved this from In Review 👀 to Done ✅ in Devfile Projecton Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/libraryCommon devfile library for interacting with devfileskind/bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions