Skip to content

devfile special envs cannot be defined last in the env list #1601

Closed
devfile/library
#220

Description

@maysunfaisal

/kind bug

Which area is this bug related to?

/area library
/area registry

Bug Summary

Describe the bug:

Devfile has special Envs like PROJECTS_ROOT. These special Envs can be referenced by the container Envs.. Since they are dependent Envs, PROJECTS_ROOT cannot be defined in the end of the container Envs.

Check https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/ for reference

  • Update ENV list for all special/reserved ENVs in devfiles as per the above note, seems to here
  • Ensure that the bug is not due to bad references in devfiles that might contribute to ENV not being expanded

To Reproduce:

Expected behavior

Envs referencing PROJECTS_ROOT and similar other special Envs should be expanded without issues

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

Slack conversation on #forum-devfile 06/13

Additional context

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
    area/registryDevfile registry for stacks and infrastructure
    on Jun 14, 2024
  2. moved this to Refinement in Devfile Projecton Jun 14, 2024
  3. moved this from Refinement to Backlog in Devfile Projecton Jun 19, 2024
  4. Horiodino commented on Jul 14, 2024

    @Horiodino

    hey @maysunfaisal if anyone's not working on it i would like to work on this issue

  5. AObuchow commented on Jul 14, 2024

    @AObuchow

    FWIW, we encountered this in DevWorkspace Operator: devfile/devworkspace-operator#1282

  6. maysunfaisal commented on Jul 15, 2024

    @maysunfaisal
    MemberAuthor

    @Horiodino sure, please feel free to assign yourself the issue and mark it as in progress, thank you!

  7. Horiodino commented on Jul 16, 2024

    @Horiodino
  8. maysunfaisal commented on Jul 16, 2024

    @maysunfaisal
    MemberAuthor

    @Horiodino devfile/devworkspace-operator#1282 is fixing the repo https://github.com/devfile/devworkspace-operator.

    I think this issue could be used to fix https://github.com/devfile/library/blob/main/pkg/devfile/generator/utils.go#L156-L160.

    The devworkspace-operator team does not use this repo https://github.com/devfile/api/issues for their issue tracking.

  9. moved this from Backlog to Done ✅ in Devfile Projecton Aug 21, 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 devfilesarea/registryDevfile registry for stacks and infrastructurekind/bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions