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 it possible to override values of the devfile by factory parameters #15220

Merged
merged 22 commits into from
Nov 29, 2019

Conversation

mshaposhnik
Copy link
Contributor

What does this PR do?

This PR allows to override values of the devfile using factory parameters, in cases when direct editing of the devfile is inaccessible.

The value referencing rules are:

  • If the referenced value is a JSON object, the new value will be applied;
  • If the referenced value is not yet exists, the new value will be created;
  • If the currently referenced value is in a JSON array, the reference string MUST contain either name or alias of the referenced object;
  • If the currently referenced value is in a JSON array, but no object with referenced name or alias found, error will be thrown.

Few examples:

  1. Override metadata.generateName:
    http://<che.host>/f?url=https://..../devfile.yaml&metadata.generateName=foo-

  2. Override project branch:
    http://<che.host>/f?url=https://..../devfile.yaml&projects.p_name.source.branch=foo

  3. Override component memory:
    http://<che.host>/f?url=https://..../devfile.yaml&components.c_alias.memoryLimit=500Mi

What issues does this PR fix or reference?

#13617

Docs PR

@che-bot che-bot added kind/enhancement A feature request - must adhere to the feature request template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. labels Nov 18, 2019
@mshaposhnik mshaposhnik requested a review from sparkoo November 18, 2019 13:55
@eclipse-che eclipse-che deleted a comment from che-bot Nov 19, 2019
@eclipse-che eclipse-che deleted a comment from che-bot Nov 19, 2019
@eclipse-che eclipse-che deleted a comment from che-bot Nov 19, 2019
@eclipse-che eclipse-che deleted a comment from che-bot Nov 19, 2019
@eclipse-che eclipse-che deleted a comment from che-bot Nov 19, 2019
@eclipse-che eclipse-che deleted a comment from che-bot Nov 19, 2019
@eclipse-che eclipse-che deleted a comment from che-bot Nov 19, 2019
@eclipse-che eclipse-che deleted a comment from che-bot Nov 19, 2019
Copy link
Member

@sparkoo sparkoo left a comment

Choose a reason for hiding this comment

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

It would be nice to simplify private JsonNode applyPropertiesOverride, but I'm not sure how. It seems like we can miss lot of corner cases there. Might be dangerous if devfile structure get more complicated.

@che-bot
Copy link
Contributor

che-bot commented Nov 27, 2019

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@skabashnyuk skabashnyuk added this to the 7.6.0 milestone Nov 27, 2019
@che-bot
Copy link
Contributor

che-bot commented Nov 27, 2019

E2E tests of Eclipse Che Multiuser on OCP has failed:

@dmytro-ndp
Copy link
Contributor

crw-ci-test

@che-bot
Copy link
Contributor

che-bot commented Nov 27, 2019

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@che-bot
Copy link
Contributor

che-bot commented Nov 28, 2019

E2E tests of Eclipse Che Multiuser on OCP has been successful:

@che-bot
Copy link
Contributor

che-bot commented Nov 28, 2019

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

Copy link
Contributor

@metlos metlos left a comment

Choose a reason for hiding this comment

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

Generally LGTM apart from some minor nitpicks.

@che-bot
Copy link
Contributor

che-bot commented Nov 28, 2019

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

⚠️ https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

ℹ️ Use comment "crw-ci-test" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Nov 28, 2019

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@che-bot
Copy link
Contributor

che-bot commented Nov 28, 2019

E2E tests of Eclipse Che Multiuser on OCP has failed:

@mshaposhnik
Copy link
Contributor Author

ci-test

@che-bot
Copy link
Contributor

che-bot commented Nov 28, 2019

E2E tests of Eclipse Che Multiuser on OCP has failed:

@mshaposhnik
Copy link
Contributor Author

ci-test

@che-bot
Copy link
Contributor

che-bot commented Nov 28, 2019

E2E tests of Eclipse Che Multiuser on OCP has failed:

@mshaposhnik
Copy link
Contributor Author

ci-test

@che-bot
Copy link
Contributor

che-bot commented Nov 28, 2019

E2E tests of Eclipse Che Multiuser on OCP has failed:

@mshaposhnik
Copy link
Contributor Author

ci-test

@che-bot
Copy link
Contributor

che-bot commented Nov 29, 2019

E2E tests of Eclipse Che Multiuser on OCP has been successful:

@mshaposhnik mshaposhnik merged commit ceec1d8 into master Nov 29, 2019
@mshaposhnik mshaposhnik deleted the overrids branch November 29, 2019 09:07
@che-bot che-bot removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants