Bug 902947 - Hint to the UI that the problem box is "Source Code" not "Public URL" if configure returns a Source Code error message.
Summary: Hint to the UI that the problem box is "Source Code" not "Public URL" if conf...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Rob Millner
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-22 19:16 UTC by Rob Millner
Modified: 2015-05-14 23:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-13 18:18:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 896364 0 medium CLOSED Unable to create new PHP-5.3 application on production 2021-02-22 00:41:40 UTC

Internal Links: 896364

Description Rob Millner 2013-01-22 19:16:10 UTC
Description of problem:

The configure hook will return an error message starting with "Source Code repository" if there is a problem with the external repository URL.  

The field for the message returned from the broker should hint to the UI that the dialogue box with incorrect information is Source Code and not Public Url.

According to Clayton, this is done by setting 'field' => 'initial_git_url'.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Log into the UI
2. Create an application with an external Source Code repository
3. Specify an invalid repository such as "https://github.com/openshift/nothing.git"
  
Actual results:

The error message is properly displayed but the "Public URL" dialogue box is highlighted.

Expected results:

The "Source Code" dialogue box is highlighted.

Additional info:

Comment 1 Dan McPherson 2013-01-22 19:55:01 UTC
We can't really do this unless the node communicates something back to the broker what value caused the problem.  Do we want to add a another directive like ERROR_FIELD:

Or is init_git_url special enough that we want to reserve an exit code for it?

Comment 2 Rob Millner 2013-01-22 20:31:27 UTC
Do we have a list of reserved exit codes?

I think it makes the most sense to have cartridge hooks and node calls set ERROR_FIELD based on the argument that they had a problem with.

The broker call can adjust the value of Message.field its returning based on how it translated arguments to make the mcollective call.

If there's agreement, I'll make the node changes for this ticket.

Comment 3 Dan McPherson 2013-01-29 00:25:03 UTC
There is only 1 reserved exit code from the node.  127 meaning the hook isn't found.

Thinking about this a little bit more we can add something more than :output from the agent.  We can define more fields like:

:error_field
:error_message

And anything at the agent (platform) level should be able to set these.

Comment 4 Rob Millner 2013-03-13 18:18:04 UTC
Moved to a new Trello card as this is really a new feature request.

https://trello.com/card/return-which-parameter-failed-back-to-the-broker/50fc6814d58223727e0074e4/3


Note You need to log in before you can comment on or make changes to this bug.