Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

How to force a rebuild of the namespaces/repositories list? #1870

Closed
marc0s opened this issue Jul 1, 2018 · 11 comments
Closed

How to force a rebuild of the namespaces/repositories list? #1870

marc0s opened this issue Jul 1, 2018 · 11 comments

Comments

@marc0s
Copy link

marc0s commented Jul 1, 2018

I have portus:head running with docker compose and after pulling a new version of the image, running rake db:migrate and restarting, I have no namespaces nor repositories available in the UI. I expected to have them back available by forcing the background service to run with strategy: update-delete, but nothing appeared.

Is there some command to be run to force such syncing that I may have missed? Is this a bug instead?

Thanks!

@marc0s
Copy link
Author

marc0s commented Jul 9, 2018

I think that the problem is not the missing data.

Further checks revealed that data is in the DB (tags, namespaces, ...) and that the UI behaved errant: couldn't log out, couldn't check the list of issued application tokens, ...

The browser's console spits out an error on missing jQuery.

rails.js:555 Uncaught ReferenceError: jQuery is not defined
    at Object.<anonymous> (rails.js:555)
    at t (bootstrap 63e01a5…:19)
    at Object.<anonymous> (application-9581569e…a254.js? [sm]:39679)
    at t (bootstrap 63e01a5…:19)
    at bootstrap 63e01a5…:65
    at bootstrap 63e01a5…:65

Could it be related to https://github.com/SUSE/Portus/pull/1811/files ? Any workaround you can think of in the meantime?

Thanks!

@vitoravelino
Copy link
Contributor

The docker images [0] are not being built for a while and it's possible that we got a broken image for head. I can ensure you that master is working as expected [1].

You could try 2.3 tag or build the image on your own based on the master branch until the docker images build is fixed.

[0] https://hub.docker.com/r/opensuse/portus/builds/
[1]
screenshot-20180709103022-985x258

@marc0s
Copy link
Author

marc0s commented Jul 9, 2018

Thanks for the feedback @vitoravelino.

Will try to build it by myself. Wouldn't I succeed, is downgrade supported or at least expected to work?

@vitoravelino
Copy link
Contributor

Well, it's supposed to work. If something is not working, we should fix it and release a new patch version. Let us know.

@marc0s
Copy link
Author

marc0s commented Jul 9, 2018

I have built a Docker image from this repository's ./docker/Dockerfile by cloning this repo and running docker build . (from ./docker). And I'm hitting the exact same error as above.

I updated my docker-compose.yml file to use the image generated by that Dockerfile and run:

$ docker-compose stop portus background
$ docker-compose up -d --force-recreate portus background

Any extra step should I run?

@marc0s
Copy link
Author

marc0s commented Jul 9, 2018

By downgrading to 2.3 I almost have it working. Everything seems to work OK except listing tags inside repository browsing. Portus logs show:

portus_1      | 2018-07-09T15:31:31.480281956Z caught error of type NoMethodError in after callback inside Grape::Middleware::Formatter : API::Entities::Tags missing attribute `vulnerabilities' on #<Tag:0x0000000005a44fe8>
portus_1      | 2018-07-09T15:31:31.480299794Z caught error of type NoMethodError in after callback inside Grape::Middleware::Formatter : API::Entities::Tags missing attribute `vulnerabilities' on #<Tag:0x0000000005a762c8>

Any migration step to run apart from rake db:migrate?

@vitoravelino
Copy link
Contributor

What I've done in the past was copying docker[-compose] files to the root folder and running docker build -t opensuse/portus:head ..

@vitoravelino
Copy link
Contributor

About the vulnerabilities error, I recommend you to restart everything. That error should not happen because this attribute is available for both 2.3 and head.

Also, be aware that if you've downgraded to 2.3 with an existent db from head that might break things.

@marc0s
Copy link
Author

marc0s commented Jul 9, 2018

I think I'd need some guidance on getting the image built. The image I build from docker/Dockerfile still shows the error about the missing jquery.

I'm not a SUSE guy, so I barely understand that the portus package gets installed in the docker image (I checked that the downloaded one is 2.4.0-dev...) but I don't know the extra steps to get assets ready (where I suppose jQuery should be available from).

Tried docker-compose exec portus portusctl exec 'rake portus:assets:compile' but it complains about missing font-awesome... I'm probably doing something plain wrong.

Any help would be appreciated :)

@marc0s
Copy link
Author

marc0s commented Jul 13, 2018

Can anyone give me some pointers to build a Docker image for head? Thanks!

@marc0s
Copy link
Author

marc0s commented Jul 24, 2018

I started over with 2.3 and did an import of the current docker registry. Will wait for 2.4 to get ready instead of playing around with head.

Thanks!

@marc0s marc0s closed this as completed Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants