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

Make the file sync destination more consistent #3662

Conversation

johnmcollier
Copy link
Member

Signed-off-by: John Collier John.J.Collier@ibm.com

What type of PR is this?
/kind cleanup

What does does this PR do / why we need it:
This PR implements the changes to the file sync destination as described in #3630:

  1. If sourceMapping is set, the source code will be mounted (and synced) to that folder (as-is today)

  2. If sourceMapping is not set, and if the PROJECTS_ROOT env is set in a given container, the source code will be mounted and synced to that destination

  3. Else, the source code will be synced to /projects

Which issue(s) this PR fixes:

Fixes #3494

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
@codecov
Copy link

codecov bot commented Jul 31, 2020

Codecov Report

Merging #3662 into master will decrease coverage by 1.15%.
The diff coverage is 45.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3662      +/-   ##
==========================================
- Coverage   45.69%   44.54%   -1.16%     
==========================================
  Files         122      124       +2     
  Lines       12230    12518     +288     
==========================================
- Hits         5589     5576      -13     
- Misses       6090     6390     +300     
- Partials      551      552       +1     
Impacted Files Coverage Δ
pkg/devfile/adapters/kubernetes/utils/utils.go 52.22% <0.00%> (-0.59%) ⬇️
pkg/devfile/adapters/docker/component/utils.go 64.43% <33.33%> (-2.34%) ⬇️
pkg/devfile/adapters/common/utils.go 88.46% <100.00%> (+0.79%) ⬆️
pkg/sync/adapter.go 81.73% <100.00%> (+0.73%) ⬆️
pkg/odo/util/validation/validators.go 75.00% <0.00%> (-6.82%) ⬇️
pkg/service/service.go 36.44% <0.00%> (-4.68%) ⬇️
pkg/occlient/utils.go 7.35% <0.00%> (-3.76%) ⬇️
pkg/odo/cli/service/create.go 10.19% <0.00%> (-0.92%) ⬇️
pkg/odo/cli/service/delete.go 24.13% <0.00%> (-0.87%) ⬇️
pkg/component/component.go 25.79% <0.00%> (-0.41%) ⬇️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02b9e4d...de4442c. Read the comment docs.

Copy link
Contributor

@adisky adisky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dharmit
Copy link
Member

dharmit commented Jul 31, 2020

This PR implements the changes to the file sync destination as described in #3630:

  1. If sourceMapping is set, the source code will be mounted (and synced) to that folder (as-is today)

  2. If sourceMapping is not set, and if the PROJECTS_ROOT env is set in a given container, the source code will be mounted and synced to that destination

  3. Else, the source code will be synced to /projects

Above works for me along with this scenario I was wondering about #3630 (comment).

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dharmit

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Jul 31, 2020
@adisky
Copy link
Contributor

adisky commented Aug 3, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Aug 3, 2020
@adisky
Copy link
Contributor

adisky commented Aug 3, 2020

/retest

@openshift-merge-robot openshift-merge-robot merged commit c9bb483 into redhat-developer:master Aug 3, 2020
cdrage added a commit that referenced this pull request Aug 4, 2020
* Adds documentation on Devfile file reference (#3487)

**What type of PR is this?**
> Uncomment only one ` /kind` line, and delete the rest.
> For example, `> /kind bug` would simply become: `/kind bug`

> Documentation changes: Please include [skip ci] in your commit message as well
/kind documentation
[skip ci]

**What does does this PR do / why we need it**:

This PR adds documentation regarding each section of Devfile and what we
support / do not support

**Which issue(s) this PR fixes**:

N/A

**How to test changes / Special notes to the reviewer**:

N/A

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

* Update file reference documentation (#3675)

**What type of PR is this?**
> Uncomment only one ` /kind` line, and delete the rest.
> For example, `> /kind bug` would simply become: `/kind bug`

/kind documentation
[skip ci]

**What does does this PR do / why we need it**:

Updates the file reference documentation to not have the introductory
section and move unsupported features to the bottom.

**Which issue(s) this PR fixes**:

N/A

**PR acceptance criteria**:

N/A

**How to test changes / Special notes to the reviewer**:

N/A

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

* make odo delete work on s2i components in experimental mode (#3649)

* Fixes GetRunningPodNameByComponent for the CLI runners (#3666)

* increase ResponseHeaderTimeout (#3674)

* Make the file sync destination more consistent (#3662)

* Make the file sync destination more consistent

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Update tests to use PROJECTS_ROOT

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Fix workdir in tests

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Remove more references to nodejs-starter

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Update more sample devfiles

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* make odo catalog list components work outside of experimental mode (#3669)

* make odo catalog list components work outside of experimental mode

* moved the logic to cli

* Ignore error while checking for imagestream support

* rearranged the catalog list

* Validate exec subcommands in a composite (#3658)

* Validate exec subcommands in composite

* Add integration test

* added --s2i flag for `odo create` command

* corrected error messages

* Corrected flag description and validation

* added --s2i flag for `odo create` command

* Make Devfile the default deployment mechanism for odo

**What type of PR is this?**
> Uncomment only one ` /kind` line, and delete the rest.
> For example, `> /kind bug` would simply become: `/kind bug`

/kind feature

**What does does this PR do / why we need it**:

Makes Devfile the default deployment mechanism, removing S2I in favour
of Devfile deployment.

**Which issue(s) this PR fixes**:

Closes #3550

**How to test changes / Special notes to the reviewer**:

Run:

```sh
odo preference set experimental false
odo create --starter nodejs
odo push
```

Co-authored-by: Girish Ramnani <girishramnani95@gmail.com>
Co-authored-by: Mrinal Das <mrinald7@gmail.com>
Co-authored-by: Tomas Kral <tkral@redhat.com>
Co-authored-by: John Collier <John.J.Collier@ibm.com>
Co-authored-by: Devang Gaur <devang.gaur.7@gmail.com>
@rm3l rm3l added the area/refactoring Issues or PRs related to code refactoring label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. area/refactoring Issues or PRs related to code refactoring lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the sync directory more consistent
6 participants