Make the sync directory more consistent #3494
Labels
area/devfile-spec
Issues or PRs related to the Devfile specification and how odo handles and interprets it.
kind/user-story
An issue of user-story kind
Currently, odo uses the following logic for determining what folder to sync to:
/projects/<projectName>
/projects
sourceMapping
field is set, it syncs to the folder specified.The logic for 1 and 2 were in place because we wanted to maintain compatibility with Che devfiles initially, a number of which relied on the assumption that the code for a component would be under
/projects/<projectName>
. However, as it turned out, there would be a number of blockers that would prevent Che devfiles from working with odo. Additionally, this was before we had implemented support for source mapping, allowing the user to configure where the source gets synced to.The downside to this current approach is that the expected sync directory isn't consistent for somebody writing a devfile, and as they add or remove projects from the devfile, the sync directory will change, potentially breaking the commands in their devfile each time.
@elsony @maysunfaisal and I chatted last week about this, and decided that long term, it would be better if odo always synced to
/projects
, unless the sourceMapping field is set, in which case, it will sync to the sourceMapping folder. This will ensure the sync directory is much more consistent and not subject to unwritten rules in odo.The text was updated successfully, but these errors were encountered: