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

Create, list and edit services using "--app" and "--project" flags (without a context) #2001

Merged
merged 3 commits into from
Aug 13, 2019

Conversation

dharmit
Copy link
Member

@dharmit dharmit commented Aug 9, 2019

What is the purpose of this change? What does it change?

So far, odo service create has either worked only from within a component directory or by using a --context flag (#1997) that points to a valid component directory. This PR makes it possible to create and delete (as listing a service was already taken care of by #1920) a service from outside a component directory using --app and --project flags in the stead.

Was the change discussed in an issue?

fixes #1810

How to test changes?

  1. Build the binary
  2. Executing below commands should work:
    # make sure that we are not working from a component directory
    $ ls .odo
    ls: cannot access '.odo': No such file or directory 
    
    $ odo service create dh-postgresql-apb --plan dev -p postgresql_user=luke -p postgresql_password=secret -p postgresql_database=my_data -p postgresql_version=9.6 --app myapp --project myproject
    $ odo service list  --app myapp --project myproject
    $ odo service delete  --app myapp --project myproject

Copy link
Contributor

@mohammedzee1000 mohammedzee1000 left a comment

Choose a reason for hiding this comment

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

/approve

@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 Aug 9, 2019
@dharmit
Copy link
Member Author

dharmit commented Aug 12, 2019

@dharmit: The following test failed, say /retest to rerun them all:
Test name Commit Details Rerun command
ci/prow/integration ceba648 link /test integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.


Container test exited with code 2, reason Error
---
from git  ...
[odo]  ✓  Triggering build from git [71ms]
[odo]  •  Waiting for build to finish  ...
[odo]  ✓  Waiting for build to finish [49s]
[odo]  ✗  Failed To Update Config To Component Deployed
[odo]  ✗  Applying configuration [49s]
Deleting project: ttlohjrohc

/test integration

@@ -161,6 +161,10 @@ func getValidConfig(command *cobra.Command) (*config.LocalConfigInfo, error) {
if fcc.Name() == "logout" {
return lci, nil
}
// Case 8: Check if fss is service and command is create or delete. Allow it if that's the case
Copy link
Contributor

Choose a reason for hiding this comment

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

fss => fcc

@girishramnani
Copy link
Contributor

/approve

@girishramnani
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Aug 13, 2019
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: girishramnani, mohammedzee1000

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-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

10 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

cdrage added a commit to cdrage/odo that referenced this pull request Sep 3, 2019
- Lists all URLs even if they are undeployed or not
(redhat-developer#2034)

- Added json output for `odo project delete -o json`
(redhat-developer#2037)

- Fixed service integration test that was previously failing
(redhat-developer#2022)

- `odo push` will now only push changed files
(redhat-developer#2030)
- We now use relative paths within the file indexer
(redhat-developer#2003)
- You can now create list and edit services using --app and --project
(redhat-developer#2001)
- Deleted files will now propagate to the OpenShift container
(redhat-developer#1999)
- Added `odo service create --context` functionality
(redhat-developer#1997)
- Making cross-compile independant of gox vendor package
(redhat-developer#2047)
- `odo-supervisord-image` has been renamed to `odo-init-image`
(redhat-developer#2027)
- Releases now use .tar.gz (redhat-developer#2009)
- If there is an error creating a service, it will fail quicker
(redhat-developer#2008)

- We now have a Google Group!
(redhat-developer#2007)
- Added documentation on how to manage environment
variables(redhat-developer#2026)
- Badges added to the README
(redhat-developer#2060)
- Updated documentation on uninstallation
(redhat-developer#2053)
- Added documentation for default parameters
(redhat-developer#2038)
- Minor update to help output
(redhat-developer#2006)
- Updated documentation regarding bootstrapper image
(redhat-developer#1991)
@cdrage cdrage mentioned this pull request Sep 3, 2019
openshift-merge-robot pushed a commit that referenced this pull request Sep 3, 2019
- Lists all URLs even if they are undeployed or not
(#2034)

- Added json output for `odo project delete -o json`
(#2037)

- Fixed service integration test that was previously failing
(#2022)

- `odo push` will now only push changed files
(#2030)
- We now use relative paths within the file indexer
(#2003)
- You can now create list and edit services using --app and --project
(#2001)
- Deleted files will now propagate to the OpenShift container
(#1999)
- Added `odo service create --context` functionality
(#1997)
- Making cross-compile independant of gox vendor package
(#2047)
- `odo-supervisord-image` has been renamed to `odo-init-image`
(#2027)
- Releases now use .tar.gz (#2009)
- If there is an error creating a service, it will fail quicker
(#2008)

- We now have a Google Group!
(#2007)
- Added documentation on how to manage environment
variables(#2026)
- Badges added to the README
(#2060)
- Updated documentation on uninstallation
(#2053)
- Added documentation for default parameters
(#2038)
- Minor update to help output
(#2006)
- Updated documentation regarding bootstrapper image
(#1991)
@rm3l rm3l added the estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person label Jun 18, 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. estimated-size/S (5-10) Rough sizing for Epics. Less then one sprint of work for one person 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.

service create shouldn't require existing component
7 participants