Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Fix a bug of updating URI when adding a route to an existing app#25

Closed
liuhewei wants to merge 1 commit into
cloudfoundry-attic:masterfrom
HuaweiTech:hw-issue-5
Closed

Fix a bug of updating URI when adding a route to an existing app#25
liuhewei wants to merge 1 commit into
cloudfoundry-attic:masterfrom
HuaweiTech:hw-issue-5

Conversation

@liuhewei
Copy link
Copy Markdown

The steps below can re-produce the problem:

  • Drag and drop a local project into the application viewer, using the name (for example 'phpdemo') which exists in another account.
    bugfix20140922_pushappwithnameusedbyotheruser
    Then it shows the name has been token:
    bugfix20140922_showhostistaken
  • Select the application which just failed to push, press the 'edit' icon in the 'General' section, and add a new route through the jump-out dialog.
    bugfix20140922_addnewuri
    bugfix20140922_addnewuri02
  • Now the new route is connected to the selected application
    bugfix20140922_addnewuri03
    It also shows the target application is bound with the new route via CFCLI:
    bugfix20140922_addnewuri04
  • Press 'Start' button for the first time, and an error dialog shows the application has no mapped url. (Here is the bug existing)
    bugfix20140922_start1stshowerror
  • If close the error dialog, press 'Start' button again, then the application can be pushed successfully because the URI has been updated when error above happens. So we can fix the bug by adding one line code to update app info immediately after setting URI.
    bugfix20140922_start2ndpushsuccessfully

@cfdreddbot
Copy link
Copy Markdown

Hey liuhewei!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you've already signed the CLA.

@nierajsingh
Copy link
Copy Markdown
Contributor

Thanks for submitting this fix. We have a related bug open in our internal tracker, and although the one-line fix above addresses the issue, it still does not address an underlying problem with updating mapped application URLs after an application has been deployed. For this reason, we'll postpone merging this PR, as fixing the underlying issue will also fix the issue in this PR. We will have a fix in for version 1.7.3.

We'll leave this open for now until we have pushed our fix, and we'll update this PR when the fix is available.

@nierajsingh
Copy link
Copy Markdown
Contributor

Hi,

We have an alternate solution to the updated CloudApplication with new URLs not mapped correctly to the CloudFoundryApplicationModule after changes have been made to the mapped URLs.

We have a fix available here:

https://github.com/nierajsingh/eclipse-integration-cloudfoundry/tree/81819722_change_URL_failed_app

It contains various other code clean-up, but essentially, what the fix does is that it triggers a module refresh after mapped URLs are changed. That way, if you change the mapped URL of a failed app, when you click "Start" to re-publish, the mapping to the most recent CloudApplication with the updated URLs should already have been done.

It also fixes another related bug, where changes to mapped URLs are not immediately saved to manifest.yml if a user selects to save to the manifest file.

If you can please verify if the fix in the branch above solves your issue, we'll merge it into master.

Thank you.

@nierajsingh
Copy link
Copy Markdown
Contributor

Hi,

We have merged a PR with a related fix into master:

#28

It should fix the issue that you encountered. Please let us know if the problem is now fixed, and we'll close this PR. Thanks.

@liuhewei
Copy link
Copy Markdown
Author

@nierajsingh The patch fixes the issue and works well in our environment. Thanks.

@nierajsingh
Copy link
Copy Markdown
Contributor

Closing this PR as it has been fixed in CF 1.7.3 release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants