Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks
maysunfaisal opened this issue Jun 14, 2024 · 5 comments
Open
2 tasks

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

maysunfaisal opened this issue Jun 14, 2024 · 5 comments
Labels
area/library Common devfile library for interacting with devfiles area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working

Comments

@maysunfaisal
Copy link
Member

maysunfaisal commented Jun 14, 2024

/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

@openshift-ci openshift-ci bot added kind/bug Something isn't working area/library Common devfile library for interacting with devfiles area/registry Devfile registry for stacks and infrastructure labels Jun 14, 2024
@Horiodino
Copy link

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

@AObuchow
Copy link

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

@maysunfaisal
Copy link
Member Author

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

@Horiodino
Copy link

i think this is already in progress https://github.com/devfile/devworkspace-operator/pull/1282

@maysunfaisal
Copy link
Member Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/library Common devfile library for interacting with devfiles area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants