Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Remove.wit.deployments.api.calls #3502

Merged

Conversation

corinnekrych
Copy link
Member

Related to fixes https://openshift.io/openshiftio/Openshift_io/plan/detail/1315

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/304/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/304/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/304

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/302/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/302/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/302

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@christianvogt
Copy link
Collaborator

@corinnekrych could you remove your package-lock files

@corinnekrych
Copy link
Member Author

@christianvogt done.
If we don't want to ckeck-in packages//package-lock.json we should add them to .gitignore, wdyt?

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/310/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/310/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/310

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/309/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/309/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/309

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/311/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/311/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/311

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@christianvogt
Copy link
Collaborator

Ya we should add exclusion to the packages for now. When I install & bootstrap I do not get the package-lock generated in the sub dir.

@@ -72,13 +67,13 @@ export class AddAppOverlayComponent implements OnInit, OnDestroy {
switchMap((space) => {
if (space) {
this.currentSpace = space;
return this.deploymentApiService.getApplications(space.id);
return observableEmpty();
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will now allow applications with the same name to be created. Is there any alternative way to do this?

this.context.space ? this.context.space.id : '',
);
getApplicationsInASpace(): Observable<any[]> {
return of([])
Copy link
Collaborator

Choose a reason for hiding this comment

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

@vikram-raj how is this used in launcher?

Copy link
Member

@vikram-raj vikram-raj Jan 27, 2019

Choose a reason for hiding this comment

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

@christianvogt It is use to validate the application name while creating the application. So, that user can not create multiple application with the same name.

Here it is used https://github.com/fabric8-launcher/ngx-launcher/blob/master/projects/ngx-launcher/src/lib/shared/project-name.validator.ts#L34

Copy link
Collaborator

Choose a reason for hiding this comment

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

@corinnekrych can we use the same workaround here to get the application names?

Copy link
Member Author

Choose a reason for hiding this comment

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

@vikram-raj @christianvogt is that check really needed? I mean we already check that in add-app-overlay

Copy link
Member

Choose a reason for hiding this comment

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

@corinnekrych getApplicationsInSpace is getting called in project-name.validator directive in ngx-launcher. https://github.com/fabric8-launcher/ngx-launcher/blob/master/projects/ngx-launcher/src/lib/shared/project-name.validator.ts#L34

Copy link
Member Author

Choose a reason for hiding this comment

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

@edewit do you know why we used project-name.validator given that we've already checked the name is not already in used in

this.applications.indexOf(this.projectName) === -1 ? true : false;
?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@corinnekrych Looks like the app launcher has two more areas after the initial screen where the user can change the application name:

image
image

Copy link
Member Author

Choose a reason for hiding this comment

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

gotcha indeed!

Copy link
Collaborator

@christianvogt christianvogt left a comment

Choose a reason for hiding this comment

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

There's some code that relied on the application list. Is there an alternative way to get this information to perform the necessary checks we have in place?

@corinnekrych
Copy link
Member Author

@christianvogt @vikram-raj using PipelinesService with BuildConfig information gives us the name of the application available on OS, so the validation is added back on app creation flow:
unspecified

@@ -216,15 +212,6 @@ describe('AddAppOverlayComponent', () => {
expect(component.applications).toEqual([]);
});

it('should retieve applications if the current space is defined', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we keep these test cases now that you've found a work around to the list of applications.

this.context.space ? this.context.space.id : '',
);
getApplicationsInASpace(): Observable<any[]> {
return of([])
Copy link
Collaborator

Choose a reason for hiding this comment

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

@corinnekrych can we use the same workaround here to get the application names?

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/314/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/314/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/314

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/316/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/316/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/316

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/317/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/317/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/317

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/315/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/315/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/315

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@sbose78
Copy link
Collaborator

sbose78 commented Jan 29, 2019

@corinnekrych , Using the buildconfig validation from PipelinesService looks good to me.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/321/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/321/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/321

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/323/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/323/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/323

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/324/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/324/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/324

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/322/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/322/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/322

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@corinnekrych
Copy link
Member Author

@christianvogt I put back the tests, unit tests are ok now but CI is failing with this:

FATAL: could not log in into vault
com.bettercloud.vault.VaultException: Vault responded with HTTP status code: 502
	at com.bettercloud.vault.api.Auth.loginByAppRole(Auth.java:386)
	at com.datapipe.jenkins.vault.credentials.VaultAppRoleCredential.authorizeWithVault(VaultAppRoleCredential.java:42)
Caused: com.datapipe.jenkins.vault.exception.VaultPluginException: could not log in into vault
	at com.datapipe.jenkins.vault.credentials.VaultAppRoleCredential.authorizeWithVault(VaultAppRoleCredential.java:44)
	at com.datapipe.jenkins.vault.VaultAccessor.auth(VaultAccessor.java:29)

🤔 #puzzled

@corinnekrych
Copy link
Member Author

[test]

@christianvogt
Copy link
Collaborator

Something is wrong now with local dev and login. I'm getting a 401 error on load calling endpoint /api/user/services which is then deleting the auth_token from localstorage before the app loads which then puts me back to the login button screen.

I cannot login to the dev app.

@christianvogt
Copy link
Collaborator

Looked into the login issue a bit further. This is caused by the add-app-overlay.component now requiring the pipeline service which is run immediately even though the add-app-overlay.component isn't even shown but it is initialized.

@vikram-raj @rohitkrai03 could one of you help @corinnekrych in addressing this issue. Maybe somehow move the init code to only when the modal is actually needed rather than on app load.

@rohitkrai03
Copy link
Collaborator

rohitkrai03 commented Jan 29, 2019

@christianvogt Will take a look at it in the morning.

@corinnekrych
Copy link
Member Author

@christianvogt @rohitkrai03 indeed testing with a new incognito browser I can see the issue :(
the injection of PipelinesService seems to be the root cause.
I'm 👀 too.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/327/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/327/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/327

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/329/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/329/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/329

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@corinnekrych
Copy link
Member Author

@vikram-raj
Copy link
Member

@corinnekrych /api/user/servicesAPI call should not trigger on the application load. I tried to move the pipelineService call on the modal show. But it doesn't help.

@christianvogt
Copy link
Collaborator

It's the initialization of the pipeline service through dependency injection that is the issue. Not the service call itself.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/330/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/330/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/330

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/332/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/332/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/332

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@corinnekrych
Copy link
Member Author

not to worry @edewit enjoy your ⛷ holidays, we got it sorted with, as Christian identified where it was used:
unspecified-3

@christianvogt ready for another review

@edewit
Copy link
Member

edewit commented Jan 30, 2019 via email

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/333/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/333/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/333

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/331/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/331/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/331

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'released' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-released/332/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/332/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-released/332

Please review the job results and re-run the job by commenting [e2e-test-released] if necessary.

@centos-ci
Copy link
Collaborator

The E2E smoke test with feature level set to 'beta' failed.

Link URL
job log https://ci.centos.org/job/devtools-fabric8-ui-e2e-smoketest-beta/334/console
failure message http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/334/failures.txt
artifacts http://artifacts.ci.centos.org/devtools/e2e/devtools-fabric8-ui-e2e-smoketest-beta/334

Please review the job results and re-run the job by commenting [e2e-test-beta] if necessary.

@christianvogt christianvogt merged commit 54bf181 into fabric8-ui:master Jan 30, 2019
@fabric8cd
Copy link
Contributor

🎉 This PR is included in version 5.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

karthikjeeyar pushed a commit to karthikjeeyar/fabric8-ui that referenced this pull request Feb 6, 2019
* clean(deployment): remove wit deployment api calls

* fix(test): to match removal of api deployment

* clean(build): remove package-lock files

* refactor(deployment): use build config to get OS application name

* refactor(add-app-overlay): add back unit test to check application name availability

* fix(auth): delay injection of PipelinesService to fix auth loop

* clean(app-launcher): put back name validation

* clean(app-launcher): remove instance variable and send the observable direclty

BREAKING CHANGE: all deployment code removed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants