Code Monkey home page Code Monkey logo

servicebook-web's Introduction

Service Book

License CircleCI Travis CI Coverage Dependabot

Small dashboard that lists all QA projects, and displays their Swagger documentation and everything we have about them.

Hacking on Service Book

By default Service Book will use http://localhost:5000/api/ as the endpoint. If you want to use something else, you can set the SERVICEBOOK environment variable. For example, set this to http://servicebook.dev.mozaws.net/api/ to use the development environment. For convenience, you can store this locally in a .env file.

To install the development environment and start Service Book locally:

$ pipenv install --dev
$ pipenv run servicebook

Running the tests

To run the tests:

$ tox

Run with Docker

There's a full deployment in Docker image.

To build it:

$ make docker-build

Then, to run it:

$ make docker-run

This will expose the Service Book on http://localhost:5000

servicebook-web's People

Contributors

ckolos avatar davehunt avatar dependabot-support avatar pyup-bot avatar rbillings avatar stephendonner avatar tarekziade avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

servicebook-web's Issues

Set up Groups

with mozilla/servicebook@9ee5aae

Groups:

  • ops
  • qa
  • dev
  • community

Allow a user to be in one of the group
use group filtering for the project forms, and for accessing non public data (community)

problem with cache propagation

the cache fails to work properly on form changes (we get older versions after relation change)

could be related to timestamp refresh issue in servicebook

add tags/languages/etc managment pages

We need to add a global page to remove/edit tags across all projects.

That page should warn the user when a tag being removed is still being used in a project

search engine

using woosh - index projects and users at the SA model level.

HTTP 500 exception thrown after hitting 404 error

STR:

Load https://servicebook.stage.mozaws.net/groups/Servicesa (notice the typo of the additional character "a" after "/Services"

Actual:

HTTP 500 exception thrown:

ResourceError: ResourceError
HTTP Status 404
(b'{"errors": [{"code": null, "detail": "no resource of type group with ID Serv'
b'icesa", "id": null, "links": null, "meta": null, "source": null, "status": 4'
b'04, "title": null}], "jsonapi": {"version": "1.0"}}')

File "flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "flask/_compat.py", line 33, in reraise
raise value
File "flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "serviceweb/views/groups.py", line 10, in group_view
group = g.db.get_entry('group', name)
File "restjson/client.py", line 298, in get_entry
return objdict(self._get(endpoint)['data'])
File "restjson/client.py", line 105, in _get
raise ResourceError(resp.status_code, resp.content)

servicebook-500

Sentry: https://sentry.prod.mozaws.net/operations/servicebook/issues/649655/

circleci testing is actually failing/not working as expected for container tests

When running the container build on circleci, there is a test section here:
https://github.com/mozilla/servicebook-web/blob/master/circle.yml#L24-L27

As it turns out, this is actually failing:

curl --retry 10 --retry-delay 5 -v 'http://localhost:5000/__version__'

* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 5000 (#0)
> GET /__version__ HTTP/1.1

> User-Agent: curl/7.35.0

> Host: localhost:5000

> Accept: */*

> 

< HTTP/1.1 500 Internal Server Error

< Connection: close
.
.
.

* Closing connection 10
Internal Server ErrorInternal Server ErrorInternal Server ErrorInternal Server ErrorInternal Server ErrorInternal Server ErrorInternal Server ErrorInternal Server ErrorInternal Server ErrorInternal Server ErrorInternal Server Error

but I suspect it's passing b/c curl is generating some output and that makes circle happy enough.

If I run the container interactively, I get the following message when starting the uwsgi process:

<snip>
Traceback (most recent call last):
  File "./wsgiapp-web.py", line 9, in <module>
    application = create_app(ini_file=ini)
  File "/usr/local/lib/python3.5/site-packages/serviceweb/server.py", line 36, in create_app
    oidc = OIDConnect(app, **app.config['oidc'])
KeyError: 'oidc'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***

I suspect that if these vars are not supplied, which they shouldn't/wouldn't be in circle, the container will not start normally. This should be fixed in some way so that we can do the minimum amount of testing required to know the container is good.

Active checkbox makes project inactive

When editing, all projects have the Active checkbox de-selected, and yet some have an Active status and others do not. Checking and saving the active checkbox makes the project Inactive, instead of Active.

Allow nginx to be disabled via ENV setting

For deployments, cloudops runs a local nginx process that conflicts with the nginx process included in the container. I am able to get around this in deployment by templating the supervisor.conf and replacing it via a docker volume config, but long term, it's probably better to have an option to disable the in-container nginx in favor of an external web server, if not remove nginx from the container entirely.

serve the __version__ route from the application not via a nginx config

In the app, the __version__ endpoint is being served via a nginx config mapping the __version__ location to the file /app/version.json. While this is fine when the container is running nginx, as mentioned in #35, if the containers nginx process isn't running or being used, the __version__ endpoint is no longer available.

project languages

Indicate languages used (Python, JavaScript, etc) and versions (Python 2.7 for example) 

change name link

Name link is also logout link (I thought it would take me to my user page)

Update dependencies

Dependabot has opened several pull requests to update dependencies, however most of these are failing. We need to investigate and resolve these issues so that we can use the latest stable dependencies.

mozillians auth

looks like the key os not working anymore

when this happens, mozillians returns

{'detail': 'Authentication credentials were not provided.'}

we should fix the code so the user view don't crash

@karlht until this is fixed, if you get an error on someone's user page, edit the user and remove their mozillians field

security

  • add cross site forgery protection for all forms
  • secure all redirects with a white list

Static assets not being served

Logged in, did Auth0 OIDC dance, was logged in correctly.

Attempted to edit description for Lockbox (project 48), hit Submit, and got "Oops, something went wrong"

Sentry Event ID: 6caf9c4603304bd3b68e7defb836ce37

auto-creation with github

When creating users on first github login we might end up with duplicated users. Maybe we can do something about that in the UI (bitbucket has a conflict resolution screen)

tags

Allow arbitrary tags, which could be used to indicate skills or tools such as selenium or loads

Auth0+Mozilla LDAP Access broken / needs an extra loop to person-api

The Auth0 - Mozilla LDAP integration has been changed

we need to do an extra call to https://github.com/mozilla-iam/person-api to get the user email.

oidc2 gets a single key 'sub', with 'ad|Mozilla-LDAP|<user>'

and we need to call

curl --request GET --url https://person-api.sso.allizom.org/v1/profile/ad|Mozilla-LDAP|\<user>

to get the mozilla email and match it in the servicebook database.

that service needs an oauth2 dance as well. I wonder if I can pass along those we get from the initial Auth0 dance. @gdestuynder ?

cc @ckolos

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.