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

Update devfiles to use PROJECT_SOURCE instead of PROJECTS_ROOT #21079

Closed
benoitf opened this issue Jan 27, 2022 · 4 comments
Closed

Update devfiles to use PROJECT_SOURCE instead of PROJECTS_ROOT #21079

benoitf opened this issue Jan 27, 2022 · 4 comments
Assignees
Labels
area/devfile-registry area/editor/jetbrains/intellij Issues related to the IntelliJ-based IDE for Eclipse Che area/editor/theia Issues related to the che-theia IDE of Che area/editor/vscode Issues related to the Code OSS editor of Che area/ux Issues related to User Experience Design kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system. sprint/current

Comments

@benoitf
Copy link
Contributor

benoitf commented Jan 27, 2022

Is your enhancement related to a problem? Please describe

most of our devfiles are single-project based.

so we should try to avoid to use PROJECTS_ROOT variable that is pointing to the parent folder of the project but use instead PROJECT_SOURCE variable that is pointing to the first project of the devfile.

Issue when using PROJECTS_ROOT is that if someone fork a repository and rename the repository name, devfile has still pointer to the previous project's name.

Describe the solution you'd like

  • remove PROJECTS_ROOT in devfiles
  • use PROJECT_SOURCE only if really needed as default working directory of commands should be PROJECT_SOURCE

so devfiles could be simplified

Describe alternatives you've considered

No response

Additional context

I've added editor area to be sure that when we execute commands, default directory if not specified is using PROJECT_SOURCE environment variable and not something else.

@benoitf benoitf added kind/enhancement A feature request - must adhere to the feature request template. area/editor/theia Issues related to the che-theia IDE of Che area/devfile-registry area/editor/jetbrains/intellij Issues related to the IntelliJ-based IDE for Eclipse Che area/editor/vscode Issues related to the Code OSS editor of Che labels Jan 27, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jan 27, 2022
@dmytro-ndp dmytro-ndp added severity/P1 Has a major impact to usage or development of the system. area/ux Issues related to User Experience Design and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jan 27, 2022
@vzhukovs
Copy link
Contributor

Hi! If user omitted the workingDir parameter in Devfile, would it be added automatically in to the Flattened Devfile?

@vzhukovs
Copy link
Contributor

And if Devfile didn't contain workingDir in the command, would the environment variable PROJECT_SOURCE point to the first project?

@benoitf
Copy link
Contributor Author

benoitf commented Jan 29, 2022

yes that's correct

@vitaliy-guliy
Copy link
Contributor

vitaliy-guliy commented Feb 7, 2022

List of samples to be updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-registry area/editor/jetbrains/intellij Issues related to the IntelliJ-based IDE for Eclipse Che area/editor/theia Issues related to the che-theia IDE of Che area/editor/vscode Issues related to the Code OSS editor of Che area/ux Issues related to User Experience Design kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system. sprint/current
Projects
None yet
Development

No branches or pull requests

6 participants