Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Cannot create application: GitHub account not linked #4743

Open
ppitonak opened this issue Jan 30, 2019 · 21 comments
Open

Cannot create application: GitHub account not linked #4743

ppitonak opened this issue Jan 30, 2019 · 21 comments

Comments

@ppitonak
Copy link
Collaborator

ppitonak commented Jan 30, 2019

Issue Overview

It's not possible to create a new application in new space because UI looks like GitHub account is not linked

Expected Behaviour

User with linked GitHub account sees his account in Launcher's step "Authorize Git Provider'

Current Behaviour

crt_create_app

Steps To Reproduce
  1. create space
  2. create new SpringBoot HTTP application
Additional Information

Observed in these three jobs
https://ci.centos.org/job/devtools-test-e2e-openshift.io-smoketest-us-east-1b-released/1506/console
https://ci.centos.org/job/devtools-test-e2e-openshift.io-smoketest-us-east-1a-beta/2378/console
https://ci.centos.org/job/devtools-test-e2e-openshift.io-smoketest-us-east-2a-released/1505/console

Although one job contains slightly different screenshot, all failed on the same line in test.

Browser logs contain this:

[15:08:47.186] SEVERE https://forge.api.openshift.io/api/services/git/user - Failed to load resource: the server responded with a status of 504 (Gateway Time-out)
[15:08:47.187] SEVERE https://forge.api.openshift.io/api/services/git/user - Failed to load resource: the server responded with a status of 504 (Gateway Time-out)
[15:08:47.187] SEVERE https://openshift.io/osio-ci-e2e-007/e2e-0129-1507-4295/applauncher/createapp/e2e-0129-1507-4295 - Access to XMLHttpRequest at 'https://forge.api.openshift.io/api/services/git/user' from origin 'https://openshift.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

In all three cases the GitHub account was linked to the OSIO account because the following Jenkins jobs passed this point.

@gastaldi
Copy link
Member

@ppitonak seems to have been caused by instabilities in the cluster? Can you tell if this is still happening ?

@ppitonak
Copy link
Collaborator Author

  1. It doesn't matter if it was caused by instabilities of the cluster. You need to find the root cause and handle errors in your code properly. UX is not good enough right now.
  2. Yes, it's still happening

@gastaldi
Copy link
Member

There is not much we can do when a Gateway Timeout happens since in this case the Backend is never reached. The UI must handle and fail properly when this happens

@ppitonak
Copy link
Collaborator Author

I understand, please sync with UI team.

@gastaldi
Copy link
Member

gastaldi commented Feb 1, 2019

@ppitonak issue fabric8-launcher/ngx-launcher#566 created. @sbose78 can you please assign to someone in the UI team to work on it?

@ppitonak
Copy link
Collaborator Author

ppitonak commented Feb 1, 2019

@vikram-raj vikram-raj self-assigned this Feb 1, 2019
@ppitonak
Copy link
Collaborator Author

ppitonak commented Feb 4, 2019

@christianvogt
Copy link
Collaborator

@vikram-raj what changes did you do here? The latest screenshot failure looks the same as the original screenshot in the description.

@vikram-raj
Copy link
Member

@christianvogt Initially it was failing because of the timeout error from the backend and error was not handled in the UI. The changes that I did was handle the error in the UI and added a loader which would be shown up while fetching the user data. My changes were verified by @gastaldi here fabric8-launcher/ngx-launcher#566.
I added a loader as per the UX recommendation here #4640

@ppitonak
Copy link
Collaborator Author

@vikram-raj actually, it's not implemented according to the design... it was supposed to show username and loader when account is linked but I see this:

crt_github

@ppitonak
Copy link
Collaborator Author

@vikram-raj
Copy link
Member

It is because request is still failing with 504 Gateway Time-out [14:32:30.169] req_id:1000000477.244 [RESPONSE] 504 Gateway Time-out https://forge.api.prod-preview.openshift.io/api/services/git/user.

@gastaldi
Copy link
Member

@vikram-raj since this request delegates the call to GitHub (which may occasionally fail), what happens if you retry the request for a limited number of times before failing completely?

@gastaldi
Copy link
Member

Also is there any way to reproduce this issue? What was the user used in this request?

@gastaldi
Copy link
Member

Perhaps fabric8-launcher/launcher-application@a2eb145 may be a hint of what's causing this.

@vikram-raj
Copy link
Member

Also is there any way to reproduce this issue?

@gastaldi I am not able to reproduce this issue loacally or on prod-preview or on prod. It is only failling on e2e tests.

@vikram-raj
Copy link
Member

What was the user used in this request?

This is request used to fetch only user detail and their GitHub orgs and repositories.

@vikram-raj
Copy link
Member

@gastaldi I raised a PR with retry implementation fabric8-ui/fabric8-ui#3520. Let's see if it fix work.

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

No branches or pull requests

5 participants