Skip to content

[Feature request] 2-way sync of source code between developer machine and container #6567

Open
@rm3l

Description

@rm3l

/kind feature

Which functionality do you think we should add?

Applications might update or generate files in the project, at build or run time. Some of those files (like yarn.lock) are usually under version control.
Not sure if it is easily doable, but I was thinking it could be useful for files to be synced not only from the local machine to the container, but both ways.
Or perhaps odo could provide a side command that allows syncing files back from the container in dev mode.

Why is this needed?

Applications might update or generate files at any time (at build time, run time, test time, ...). With commands being executed from within the dev container, there is currently no easy way to retrieve those updated/generated files. As a workaround, users can copy those files back using kubectl cp or oc cp, but they need to know the remote paths.

Example:
After adding a devfile.yaml for the odo website (#6564), local changes are correctly pushed to the container, but I was wondering about a change in the package.json file while iterating locally. I can happily work with odo and my new changes are taken into account, but when I'm done with the Dev session, I'd need to manually install and run yarn locally to generate an updated yarn.lock and commit/push it to the repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue as a feature request. For PRs, that means that the PR is the implementationlifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.needs-triageIndicates an issue or PR lacks a `triage/*` and requires one.priority/LowNice to have issue. It's not immediately on the project roadmap to get it done.

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions