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 dev fails with projectType: .NET #6234

Closed
kadel opened this issue Oct 19, 2022 · 1 comment · Fixed by #6284
Closed

odo dev fails with projectType: .NET #6234

kadel opened this issue Oct 19, 2022 · 1 comment · Fixed by #6284
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Milestone

Comments

@kadel
Copy link
Member

kadel commented Oct 19, 2022

/kind bug

▶ odo init --devfile-path https://raw.githubusercontent.com/devfile/registry/269dc7a2f0e8b19fbd53250e858a895f6aa93c62/stacks/dotnet60/devfile.yaml --starter dotnet60-example --name dotnet60-example


▶ odo dev
  __
 /  \__     Developing using the "dotnet60-example" Devfile
 \__/  \    Namespace: default
 /  \__/    odo version: v3.1.0
 \__/

↪ Deploying to the cluster in developer mode
 •  Waiting for Kubernetes resources  ...
 ✗  unable to create or update component: unable to create PVC: unable to create PVC: PersistentVolumeClaim "odo-projects-dotnet60-example-app" is invalid: metadata.labels: Invalid value: ".NET": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
Cleaning resources, please wait

the devfile.yaml has projectType: .NET and odo is generating k8s rousrces with app.openshift.io/runtime label with value that is that same as projectType

odo should clean projectType value first to make sure that it can be used as in labels.

/priority high

@openshift-ci openshift-ci bot added kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). labels Oct 19, 2022
@rm3l rm3l added this to odo Project Oct 19, 2022
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Oct 19, 2022
@kadel kadel changed the title odo dev fails if odo dev fails with projectType: .NET Oct 19, 2022
@rm3l rm3l removed the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Oct 20, 2022
@valaparthvi
Copy link
Contributor

If the string starts with a '.', cleanup should change it to 'dot' or 'DOT'.
This might break the icons on Dev console, but that's a risk we're willing to take, better than breaking odo.

Do the same anywhere we are using Devfile fields(such as language and projectType) for labels.

Validation checks:

  • a valid label must be an empty string or consist of alphanumeric characters, '-', '' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9])?')
  • length check <=63

@rm3l rm3l added this to the v3.3.0 🚀 milestone Oct 27, 2022
@rm3l rm3l self-assigned this Nov 2, 2022
@rm3l rm3l moved this to In Review 👀 in odo Project Nov 4, 2022
Repository owner moved this from In Review 👀 to Done ✅ in odo Project Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants