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

odo describe component with Devfile: display remote source code location for each container component #6453

Closed
5 of 6 tasks
rm3l opened this issue Jan 4, 2023 · 1 comment · Fixed by #6497
Closed
5 of 6 tasks
Assignees
Labels
kind/user-story An issue of user-story kind priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). sprint demo Indicates an issue for which a demo should be recorded and presented at the end of the sprint.
Milestone

Comments

@rm3l
Copy link
Member

rm3l commented Jan 4, 2023

/kind user-story

User Story

As an IDE plugin developer or user, I want to know where the source code in the container is located, So that I can specify the mapping between source files on the local machine and the remote container.

Acceptance Criteria

  • odo describe component should display the source code location for each container container
  • odo describe component -o json should display the source code location for each container container
  • If the component is not running, it should get the information from the local Devfile. This depends on the values of the following container components fields :
    • mountSources (default value if not set is true)
    • sourceMapping (default value if not set is /projects)
  • It should not report that information if mountSources is false
  • odo describe component without Devfile: display remote source code location for each container component #6498
  • It should also work with components running on Podman

Examples

▶ odo describe component
Name: nodejs-starter
Display Name: Node.js Runtime
Project Type: Node.js
Language: JavaScript
Version: 2.1.1
Description: Stack with Node.js 16
Tags: Node.js, Express, ubi8

Running in: Dev

Forwarded ports:
 •  127.0.0.1:40001 -> runtime:3000
 •  127.0.0.1:40002 -> runtime:5858

Supported odo features:
 •  Dev: true
 •  Deploy: true
 •  Debug: false

Container components:
 •  runtime
    Project Source: /projects
 •  build
    Project Source: /project

▶ odo describe component -o json
{
	"devfilePath": "/Users/tkral/Code/odo-examples/nodejs-starter/devfile.yaml",
	"devfileData": {
		"devfile": {
			"schemaVersion": "2.2.0",
			"metadata": {
				"name": "nodejs-starter",
				"version": "2.1.1",
				"displayName": "Node.js Runtime",
				"description": "Stack with Node.js 16",
				"tags": [
					"Node.js",
					"Express",
					"ubi8"
				],
				"icon": "https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg",
				"projectType": "Node.js",
				"language": "JavaScript"
			},
			"components": [
				{
					"name": "runtime",
					"container": {
						"image": "registry.access.redhat.com/ubi8/nodejs-16:latest",
						"projectSource": "/projects"
...

Links

Related to #6419

/kind user-story

@openshift-ci openshift-ci bot added the kind/user-story An issue of user-story kind label Jan 4, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Jan 4, 2023
@rm3l rm3l added this to odo Project Jan 4, 2023
@rm3l rm3l added priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). and removed needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. labels Jan 4, 2023
@rm3l rm3l added this to the v3.6.0 🚀 milestone Jan 4, 2023
@rm3l rm3l changed the title odo describe component: display source code location for each container component odo describe component: display remote source code location for each container component Jan 4, 2023
@rm3l rm3l added the pair programming Issue that is a good candidate for pair programming label Jan 9, 2023
@valaparthvi
Copy link
Contributor

I am not sure how this will work for named components in a simple way. One way it can work out is if I exec inside the component's pod and get the value of $PROJECT_SOURCE, but then we'll need to discuss how it would look in the both the output.

@valaparthvi valaparthvi moved this to In Progress 🚧 in odo Project Jan 17, 2023
@rm3l rm3l changed the title odo describe component: display remote source code location for each container component odo describe component with Devfile: display remote source code location for each container component Jan 17, 2023
@valaparthvi valaparthvi removed the pair programming Issue that is a good candidate for pair programming label Jan 17, 2023
@rm3l rm3l moved this from In Progress 🚧 to In Review 👀 in odo Project Jan 18, 2023
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in odo Project Jan 19, 2023
@rm3l rm3l added the sprint demo Indicates an issue for which a demo should be recorded and presented at the end of the sprint. label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/user-story An issue of user-story kind priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). sprint demo Indicates an issue for which a demo should be recorded and presented at the end of the sprint.
Projects
Archived in project
2 participants