* Add unit test highliging the issue
* Fix 'delete' unit tests
* Pass the filesystem object where it is relevant
* Add a way for CLI commands to indicate whether of not they require a valid Devfile
For the 'analyze' command, this is not required,
so Devfile parsing will be ignored completely.
* Make the fake filesystem return an absolute current dir
Otherwise, some code will assume it is relative,
and try to prepend the current physical directory
* Custom address for port forwarding
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add integration tests
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Use private variables for custom address and ports
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Update pkg/util/util.go
Co-authored-by: Armel Soro <armel@rm3l.org>
* Assign custom address to HostIP for podman
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add validation for free port when --port-forward is provided in the Validate() method, add integration test for running parallel dev sessions on same platform, same port and different addresses
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix unit test failure
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Attempt at fixing windows failure
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add documentation
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Use default value for --address flag
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Changes from review
Co-authored-by: Armel Soro <asoro@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
---------
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
Co-authored-by: Armel Soro <asoro@redhat.com>
Due to regression on 6.1+ kernels [1], binding on 127.0.0.1:$port after some process
listens on 0.0.0.0:$port does pass, which is not expected.
Until this issue is fixed [2], a possible workaround is to try to bind on 0.0.0.0:$port.
This works correctly on Podman, and also on Kubernetes
(because we do port-forwarding on Kubernetes on 127.0.0.1:$port).
The unit test added should allow us to detect similar issues faster in the future,
should it happen again.
[1] https://lore.kernel.org/stable/e21bf153-80b0-9ec0-15ba-e04a4ad42c34@redhat.com/T/
[2] https://lore.kernel.org/netdev/20230312031904.4674-3-kuniyu@amazon.com/T/
* Support exec command for deploy
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Print log after timeout
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add helper function to form proper commandLine
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Mockgen kclient
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Enhance error message
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Attempt at fixing unit test failures
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Rename import v1 to batchv1
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Remove TODOs
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add integration tests and cleanup on user interrupt
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Temp changes
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Log tip to run odo logs after a minute
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* List components to delete even if there are no devfile resources
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix integration tests
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix deploy exec delete integration test
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Temp Change
* Fix delete command tests
* Fix mockgen client
* Fix validation errors
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix unit test failure
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Attemp at writing less flaky integration test
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Remove TODOs
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add tip after 1 minute and return the go routine if job finishes before that
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Use the container as it is so that container-overrides can be taken into account
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Move job spec code to a different helper function inside the libdevfile pkg
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Modify the Execute method to use the new helper function and refactoring
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Attempt at fixing integration and unit tests
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Move defer to print remaining resources to a separate function, fix func doc and gofmt the files
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix test failures
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Cleanup
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Cleanup unused functions
Signed-off-by: Parthvi Vala <pvala@redhat.com>
---------
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Set Go version in go.mod
go mod edit -go=1.19
* Fix formatting issues reported by gofmt
* Fix SA1019 check (usage of deprecated "io/ioutil"), reported by golangci-lint
SA1019: "io/ioutil" has been deprecated since Go 1.16:
As of Go 1.16, the same functionality is now provided by package io or package os,
and those implementations should be preferred in new code.
See the specific function documentation for details. (staticcheck)
* Use Go 1.19 in our Dockerfiles
* Use Go 1.19 in the rpm-prepare.sh script
* Update the tag for the IBM Cloud CI image
This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests [complete.
Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
defer func() {
if err := os.RemoveAll(dir); err != nil {
t.Fatal(err)
}
}
is also tedious, but `t.TempDir` handles this for us nicely.
Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* Update the Devfile library
* Add test for container-overrides and pod-overrides attributes
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Attempt at fixing CI failures
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix CI failure
* Attempt at fixing OC integration test failures
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Use random name in integration test
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Rebase and fix integration test failure
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Make integration test work for podman
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Temp attempt at fixing podman test for GH
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Another attempt at fixing CI test for podman
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* One more attempt at fixing integration test for podman
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix: odo dev unable to sync files with name containing special characters
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Cover in unit tests and refactor them
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add test for globEscape
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Refacto get first free port
* Use next free port for Podman
* Save used ports to reuse them
* Fix unit tests
* Do not rely on system for ports during tests
* Add utility functions allowing to report files generated by odo
The end goal is for 'odo delete component --files' to gather a list of
files that were initially generated by odo, so as to delete only those.
This way, we are less likely to delete the wrong files.
This list is collected in a '.odo/generated' file.
It will then be up to odo commands to call those methods
accordingly. For example, this is called:
- by odo init, odo dev, or odo deploy, when generating a new devfile.yaml
- by odo dev, when there is no .gitignore file and odo generated one
Note that it is quite impossible to cover all scenarios; for example,
if odo generates a new devfile.yaml file, but the user deletes it
manually and recreates it, 'odo delete component --files'
will still list it as a possible candidate for deletion
(because it would be listed in .odo/generated).
* Report files generated by commands like init, dev or deploy
* Implement 'odo delete component --files'
* Add integration tests for 'odo delete component --files'
* Document the `--files` flag
Co-authored-by: Philippe Martin <contact@elol.fr>
* Do not delete the .gitignore file
It is more likely to be modified by the user afterward (for another
usage).
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* fixup! Document the `--files` flag
* fixup! Implement 'odo delete component --files'
* Apply review suggestions on integration tests
Co-authored-by: Parthvi Vala <pvala@redhat.com>
* fixup! fixup! Document the `--files` flag
Co-authored-by: Philippe Martin <contact@elol.fr>
Co-authored-by: Philippe Martin <phmartin@redhat.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
* Update odo to use go 1.18
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Update golangci-lint version in Makefile
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Use go 1.18, not go 1.19
Erroneously I had used go 1.19 at various places.
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Rearrange imports; fix golangci-lint errors
Fixed a bunch of golangci-lint errors like below:
`File is not `gofmt`-ed with `-s``
using the command: `golangci-lint run --fix`
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Use go install instead of go get
This is because with go 1.18, `go get` behaves as `go get -d` by
default. Which means that it will only download, but not install.
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Remove GetApplication from LocalConfigProvider interface and all related stuff
* Remove GetName from LocalConfigProvider interface and all related stuff
* Remove GetContainers from LocalConfigProvider interface
* Remove Exists method from LocalConfigProvider interface and stop odo dev writing env.yaml file
* Remove GetDebugort method from LocalConfigProvider interface + fix#6056
* Remove unnecessary fields from EnvInfo structure
* Remove all references to env.yaml file
* Review
* Test for #6056
* Create auxialiary functions to find current deployment and pod name
* Create auxialiary function for pushing Kubernetes components to cluster
* Auxiliary function getPushDevfileCommands and remocve RunModeChanged flag as it is not possible anymore with long running dev command
+ move prelimiray tests at the beginning
* Create auxiliary function updatePVCsOwnerReferences + move isMainStorageEphemeral inside aux. function
* Watch for deployments in addition to watching for files during odo dev
* - Check the Deployment Generation to return earlier when generation changed
- Return earlier when pod is not ready
* Push receives a Status that it can update, to indicate the status of the component when the function returns. This status is passed from Start to Watch
* Use status to decide to sync files
* Simplify getting pod
* Status for PostStartEvents
* - Touch .gitignore earlier so it is not synced
- Add devstate.jso file to .gitignore
* Fix the integration tests.
* Make --no-watch work again
* Get smaller volumes for tests
* Quit when fail to exec port forwarding
* Exponential delay after an error
* Fix: get running pod
* Remove testing odo dev stops when the build command fails. odo dev now gives a change to the user to fix the problem
* Fix order or volumes and volume mounts in pod spec
* Use server side apply for updating PVC when supported
* Watch Devfile separately
* Adapt tests for devfile handled separately
* Update forwarded ports when necessary
* Display kubernetes resources created only when created/updated
* Do not set ResourceVersion when patching
* TEMP: Add more logs on failing integrattests
* Tests: select the *running* pod
* Use forward slashes for .gitignore content, even on Windows
* Rename GetOnePodFromSelector to GetRunningPodFromSelector
* Cleanup logs
* Fix 'odo log' integration test
* Add log "Waiting for Kubernetes resources"
* Fail if service bindings are not injected
* Rename sources related watcher, timer
* Fix delay after error
* Display info about Pod
* Disambiguate error messages
* Display events related to components pod
* Remove now unused functions used to wait for Deployment / Pod
* Typos + function renaming
* Do not watch devfile with --no-watch
* Use type switch for Kubernertes watch event
* Do not fail when watching Events is Forbidden
* Do not fail when servicebinding resources are forbidden
* Exit when build command fails on no-watch mode
* Sync devfile.yaml by default, workaround when commands change on devfile
* Rename to warningsWatcher
* Fix comment
* Change integration test expectations regarding composite run commands
* Add integration test supporting composite debug commands
* Rename in-container pid file from '.odo_devfile_cmd_<name>.pid' into '.odo_cmd_<name>.pid'
The implementation in kubeexec.go is indeed able to run any kind of commands,
not only Devfile-related.
* Pave the way to supporting composite run/debug commands
Drop validation rules that prevented from going further
with composite run or debug commands.
* Update logic for determining which containers should have their entrypoint overridden or env vars updated
The previous implementation was limited to Exec commands solely.
This now makes it easier to support other kind of commands.
For example, when handling a composite command, we are now recursively
determining the containers (a.k.a components) that would get used by this composite command.
* Store the process exit code in the pid file handled by kubeexec.go
This allows to more accurately determine how the process could be reported.
* Fix issue with util#DisplayLogs potentially not picking the last element of lines
* Make sure to execute the Build command only once when running a composite command
* Test that the Build command is executed once running a composite command
* Make sure not to retrieve the parent default command uselessly
* Log the command Id when it is about to be restarted
* Redirect build command logs to PID 1 process
This way, users would be able to display them (and follow them) with `odo logs` or `kubectl logs`
* Handle Errored case when logging information about the process that exited
* Make sure to override container entrypoint if needed for Build commands
Build commands (which could also be composite ones)
might be executed in a container different from the run or debug ones.
* Redirect output from commands handled by component.exec_handler to PID 1 process streams
This way, we can also have them displayed with `odo logs` or `kubectl logs`.
This includes Build and Devfile events commands.
* Make remotecmd#ExecuteCommand log stdout or stderr content only if there not empty
This reduces the clutter in case of an error with the command execution.
* Add integration test with more complex Devfile (composite build/run/debug commands running in different containers and with a shared volume)
* Update the 'Executing the application' spinner accordingly when the related command is done
* Preference(Timeout) int > time.Duration
* Fix odo preference --help for unset examples
* Preference(PushTimeout) int > time.Duration
* Change set, and unset messages
* Preference(RegistryCacheTime) int > time.Duration
* use cobra.ExactArgs for set, and unset
* mockgen
* Unit tests and integration tests
* Fix unit test failure
* Update k8s.io/utils pkg
* Philippe's review
* Fix error message
* Philippe's review
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add minimum acceptable value for preferences accepting time.Difference type
* Fix unit test failure
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add migration plan with a warning, add better error message for incompatible formats
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Introduce new 'pkg/remotecmd' package
This package allows to execute commands in remote packages
and exposes an interface for managing processes associated
to given Devfile commands.
* Rely on 'pkg/libdevfile' as much as possible for Devfile command execution
This requires passing a handler at the odo side,
which in turns uses the 'pkg/remotecmd' package to
run commands in remote containers.
* Switch to running without Supervisord as PID 1 in containers
To do this, the idea is to start the container component:
1- using the command/args defined in the Devfile
2- using whatever was defined in the container image
if there is no command/args defined in the Devfile
Then, once the container is started, we would execute the Devfile
commands directly in the container component, just like a simple
'kubectl exec' command would do.
Since this is a long-running command (and potentially never ending),
we would need to run it in the background, i.e. in a side goroutine.
Point 2) above requires implementing a temporary hack (as discussed in [1]),
without us having to wait for [2] to be merged on the Devfile side.
This temporary hack overrides the container entrypoint with "tail -f /dev/null"
if the component defines no command or args (in which case we should have
used whatever is defined in the image, per the specification).
[1] https://github.com/redhat-developer/odo/pull/5768#issuecomment-1147190409
[2] https://github.com/devfile/registry/pull/102
* Rename K8s adapter struct 'client' field into 'kubeClient', as suggested in review
* Rename sync adapter struct 'client' fields to better distinguish between them
* Make sure messages displayed to users running 'odo dev' are the same
* Update temporary hack log message
Co-authored-by: Philippe Martin <contact@elol.fr>
* Make sure to handle process output line by line, for performance purposes
* Handle remote process output and errors in the Devfile command handler
The implementation in kubeexec.go should remain
as generic as possible
* Keep retrying remote process status until timeout, rather than just waiting for 1 sec
Now that the command is run via a goroutine,
there might be some situations where we were checking
the status just before the goroutine had a chance to start.
* Handle remote process output and errors in the Devfile command handler
The implementation in kubeexec.go should remain
as generic as possible
* Update kubeexec StopProcessForCommand implementation such that it relies on /proc to kill the parent children processes
* Ignore missing children file in getProcessChildren
* Unit-test methods in kubexec.go
* Fix missing logs when build command does not pass when running 'odo dev'
Also add integration test case
* Fix spinner status when commands passed to exec_handler do not pass
* Make sure to check process status right after stopping it
The process just stopped might take longer to exit (it might have caught
the signal and is performing additional cleanup)
* Keep retrying remote process status until timeout, rather than just waiting for 1 sec
Now that the command is run via a goroutine,
there might be some situations where we were checking
the status just before the goroutine had a chance to start.
* Fix potential deadlock when reading output from remotecmd#ExecuteCommandAndGetOutput
Rely on the same logic in ExecuteCommand
* Add more unit tests
* Remove block that used to check debug port from env info
As commented out in [1], we don't store anymore the debug port value in the ENV file.
[1] https://github.com/redhat-developer/odo/pull/5768#discussion_r893163382
* Rename 'getCommandFromFlag' into 'getCommandByName', as suggested in review
* Make remotecmd package more generic
This package no longer depends on Devfile-related packages.
* Fix comments in libdevfile.go
* Move errorIfTimeout struct field as parameter of RetryWithSchedule
This boolean is tied to the given retry schedule,
so it makes sense for it to be passed with the schedule.
* Expose a single ExecuteCommand function that returns both stdout and stderr
Co-authored-by: Philippe Martin <contact@elol.fr>
* update go version to 1.17
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
* update go version to 1.17 and fix failure
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
* Document golangci-lint configuration options
* Do not limit the number of issues reported per linter
* Add check preventing the use of the deprecated 'github.com/pkg/errors' package
* Upgrade golangci-lint to 1.37.0, so we can use 'revive' Linter
- revive is a drop-in replacement for the deprecated golint Linter
- revive will allow to check for error strings
Note: We are purposely not using the latest golangci-lint (1.45.0)
but the minimum version from which revive is available.
This is because the latest 1.45.0 reports additional linting issues
(from govet and staticcheck for example). And fixing those side errors
is outside of the scope of this issue.
Also some of those issues are already fixed in #5497 (update to Go 1.17).
* Configure revive to check for error strings
More rules can be added later on if needed
* Fix issues reported by revive's error-strings rule
Some rules are purposely ignored when the
error messages represent top-level errors that are
displayed to be displayed as is to end users
* Fix more error-strings issues
For some reason, those were not reported by revive's error-strings rule,
but only by GoLand inspection tool.
* Fix missing `revive:disable:error-strings` comment directive
Also replace "fmt.Errorf" by "errors.New" when the error message is static
* First pass of port-forward for odo dev
* Supports forwarding multiple ports/endpoints
* Change message wording
* Port forwarding happens port 40001 onward
* Organize the code
* Integration tests
* Update the CLI help message
* Catch and check err
* Changes for failing unit tests
* Fix test and add newline to a message
* Remote label and use for loop
* Adds TODO to cleanup when port-forwarding fails
* Change messaging printed on the CLI
* Break Start method into multiple methods
* Set debug port while creating push parameters in dev
* Test after making a change to a file in pwd
* Refactoring to put things where they should be
* Notify user to run odo dev again if endpoints change
* Unit tests and rebase mistakes
* Add newline character for clear formatting
* Create business logic for reuse to find endpoints
* Fix unit and integration test failures
* Self review
* Changes based on Philippe's review
* Two more changes based on Philippe's review
* More changes based on PR review
* Changes based on PR feedback and more
- Renames all receivers in kclient package to `c`
- Adds mocks
* Removes unnecessary function
* Make function more generic for reuse
* Rename Options to DevOptions
* Address review comments by Tomas
* Fix failing unit test
* Modify message to restart odo dev
* Use helper.RunDevMode in odo dev tests
* Remove doubly imported log package
* Modifies clientset at CLI and business layer
- No need of KUBERNETES client for `odo dev` business layer.
- Added KUBERNETES client for `odo dev` CLI layer.
* Remove hardcoding of URL in tests
- It uses @feloy's work in PR #5570.
* Uses regexp to find strings.
* Makes FindAllMatchingStrings more generally usable
* Adds constant for localhost regex
* Replace matches with urls and remove unnecessary Sprintf
* Documents what urls is in RunDevMode function.
* Update tests/helper/helper_dev.go
Co-authored-by: Philippe Martin <contact@elol.fr>
* Update tests/helper/helper_dev.go
Co-authored-by: Philippe Martin <contact@elol.fr>
* Update tests/helper/helper_dev.go
Co-authored-by: Philippe Martin <contact@elol.fr>
* Update tests/helper/helper_dev.go
Co-authored-by: Philippe Martin <contact@elol.fr>
Co-authored-by: Philippe Martin <contact@elol.fr>
* Change errors.Wrapf
* Replace errors.Wrap
* Dont use pkg/errors (except error.Cause)
* Fix errors on Windows (do not test system underlying message)
* Replace errors.Cause
* Review
* Skeleton for odo dev and a unit test
* Update go mod for fsnotify
* Start method Pushes and then Watches
* More understandable code comments
* Client and interface for watch package
* Mocks for watch package
* Add CLI layer
* Fix infinite watch & push trigger
* Remove context flag from odo dev
* Add integration tests for odo dev
* Add klog to dev.go
* Replace errors.Wrap with fmt.Errorf
* Self review
* Removes `odo watch` command, but the business logic exists as it's
used by odo dev
* Removes integration tests for `odo watch`
* Removes errors.go and types.go from pkg/dev/ since they are empty
* Check if error is not nil
* Use real client in watch unit tests
* Uncomment AfterEach from tests
* Modify the logs printed to stdout
* Changes based on Philippe's review
* Remove unused clients
* Parthvi's PR review and unit test fixes
* Fix gofmt message, remove message to not expect
* Fix lint complains, add mistakenly deleted URL creation logic
* Remove or modify tests that rely on odo push output
* Remove unused variables based on golangci-lint
* Fixes based on Philippe's review
* Initialize first index after first run of odo dev
* Modify odo dev test, and uncomment a mistake
* Create a cmdline interface
The interface abstracts the cobra.Command
* Remove cobra relation from Context
* Remove cmd parameter to Run method
* Remove direct use of cobra.Command
* Add mock for cmdline interface
* First test
* Fix typo in rebase
* Restore SetClusterType
* Move constants to specific package to avoid import cycle
* Fix rebase
* refactor
* Make refactor work for existing devfile and --devfile
* Make refactor work for interactive and direct mode
* Pass tests
* Temp interface conversion
* Temp movement
* Add interface and methods
* Add rollback
* Fix failures
* Move create_refactor to create
* Attempt at fixing sonar cloud issues
* Final refactor
* Add changes requested by feloy; move conflict checks to struct methods
* Only delete devfile and .odo dir
* Send odo push telemetry data on user interrupt
* Add signal to contextual properties
* Add defer signal.Stop
* Changes requested by Philippe
* Move the signal watcher caller
* Replace an unused arg with _
* Fix arg name
* Renames the service name to include the app name
* Renames route names to include the app name instead of the component
* Fixes comments and modifies the error message for some service related errors