Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:56

    dependabot-preview[bot] on npm_and_yarn

    (compare)

  • 08:56

    dependabot-preview[bot] on master

    Bump mocha from 9.0.0 to 9.0.1 … (compare)

  • 08:56
    dependabot-preview[bot] closed #197
  • 08:53
    dependabot-preview[bot] commented #196
  • 08:52
    dependabot-preview[bot] labeled #197
  • 08:52
    dependabot-preview[bot] commented #195
  • 08:52
    dependabot-preview[bot] opened #197
  • 08:52

    dependabot-preview[bot] on npm_and_yarn

    Bump mocha from 9.0.0 to 9.0.1 … (compare)

  • 08:52

    dependabot-preview[bot] on npm_and_yarn

    (compare)

  • 08:52
    dependabot-preview[bot] closed #194
  • 08:52
    dependabot-preview[bot] commented #194
  • 08:52
    dependabot-preview[bot] labeled #196
  • 08:52
    dependabot-preview[bot] opened #196
  • 08:52

    dependabot-preview[bot] on npm_and_yarn

    Bump @types/node from 15.6.1 to… (compare)

  • 08:52

    dependabot-preview[bot] on npm_and_yarn

    (compare)

  • 08:52
    dependabot-preview[bot] closed #185
  • 08:52
    dependabot-preview[bot] commented #185
  • 08:52
    dependabot-preview[bot] labeled #195
  • 08:52
    dependabot-preview[bot] opened #195
  • 08:52

    dependabot-preview[bot] on npm_and_yarn

    Bump typescript from 4.0.3 to 4… (compare)

bengwie
@bengwie
This is the test log from the unmodified source files.
Dylan Staley
@dstaley:matrix.org
[m]
@bengwie: does the ini config you're using for your server contain this plugin? https://github.com/Kinto/kinto-http.py/blob/master/kinto_http/tests/config/kinto.ini#L7
bengwie
@bengwie
@dstaley:matrix.org , thanks for the reply. I didn't modify anything on the server's side. Below is whatever I have:
kinto.includes = kinto.plugins.default_bucket
kinto.plugins.admin
kinto.plugins.accounts

kinto.plugins.history

kinto.plugins.quotas

Let me add kinto.plugins.flush and give it another test shot.
Dylan Staley
@dstaley:matrix.org
[m]
By default kinto-http.py uses its own config. You'll probably want to run the server using the config file I linked
bengwie
@bengwie
Thanks @dstaley:matrix.org . Just curious, is this step mentioned anywhere in the documentation? I may have missed it.
Test run still shows no luck though: ================= 104 failed, 229 passed, 94 errors in 56.87s ==================
Dylan Staley
@dstaley:matrix.org
[m]
No, but to be fair, it's not really a typical use case to run the kinto-http.py unit tests against a modified instance of Kinto.
wait, what exactly are you trying to do? are you making changes to kinto-http.py or to kinto?
bengwie
@bengwie
Well, firstly I need to just get the latest source code kinto-http.py and run its tests against kinto server. This is where I am currently struggling.
Dylan Staley
@dstaley:matrix.org
[m]
kinto-http.py will spawn an instance of kinto with the correct config by default
you shouldn't run the tests against a server you manually launched/initialized
are you following these steps? https://github.com/Kinto/kinto-http.py#run-tests
bengwie
@bengwie
Apparently I didn't follow all the steps, but part of it yes.
Let me clean it up
bengwie
@bengwie
@dstaley:matrix.org , TADA.... ============================= 333 passed in 50.89s =============================
Thanks for your clarification. Earlier I was under impression that unit tests can be run against any locally deployed server.
Dylan Staley
@dstaley:matrix.org
[m]
woohoo!!
bengwie
@bengwie
Time to contribute ;)
Dylan Staley
@dstaley:matrix.org
[m]
So they technically can, provided the server is using the same config as the one from the library
The libraries do some funky stuff that you usually don't end up doing in production
so they use specific configs
I'm glad you got it working!
Mathieu Leplatre
@leplatrem
Thanks @dstaley:matrix.org and congrats @bengwie
:)
bengwie
@bengwie
Another question.... While working on kinto-http.py, I am trying to do "from kinto.core.utils import decode_header".... To test my code locally using python3 interactive mode, I do:
import sys
sys.path.append("./.venv")
import kinto_http
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'cornice' distribution was not found and is required by the application
Could someone please help me resolve this? Thanks.
bengwie
@bengwie
I sort of got a lead on this.... I activated the venv before opening python interactive mode: source ./.venv/bin/activate .... Now, I am hitting another issue.
bengwie
@bengwie
Why is my kinto/.venv/lib/python3.9/site-packages/kinto/core/utils.py's content different than https://github.com/Kinto/kinto/blob/b0d34333f4aef8f0210838602f6b5aff1558056a/kinto/core/utils.py ?
Dylan Staley
@dstaley:matrix.org
[m]
What's the output of pip show kinto
bengwie
@bengwie
WARNING: Package(s) not found: kinto
Dylan Staley
@dstaley:matrix.org
[m]
Is your venv active?
bengwie
@bengwie
Sorry, I did it on wrong terminal window.
pip show kinto
Name: kinto
Version: 14.2.0
Summary: Kinto Web Service - Store, Sync, Share, and Self-Host.
Home-page: https://github.com/Kinto/kinto
Author: Mozilla Services
Author-email: storage-team@mozilla.com
License: Apache License (2.0)
Dylan Staley
@dstaley:matrix.org
[m]
decode_header isn't present in the current version https://www.github.com/Kinto/kinto/tree/master/kinto%2Fcore%2Futils.py
The commit you linked to is from four years ago
bengwie
@bengwie
Ahhh.... I haven't selected the master branch on drop down. My bad, sorry I am a noob in open source contrib, please bear with me :D
Dylan Staley
@dstaley:matrix.org
[m]
No worries!
Ezequiel Schwartzman
@Zequez

Hi! I'm hitting a wall here trying to run Kinto locally. I'm running the server at localhost:8888 and the front-end at localhost:3000. CORS is enabled, but when I try to make any call the browser rejects the request with "(Reason: header ‘authorization’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response)"

But I cannot seem to find ANY mention of setting the ‘Access-Control-Allow-Headers setting anywhere, so maybe I'm doing something wrong on the configuration?

Here is the configuration I'm using https://gist.github.com/Zequez/423989c8cadc30700ef76c535a6e389d

When I use the public server it runs without issues. Locally I already created the admin account, and from the admin panel I can browse without issues too.
Ezequiel Schwartzman
@Zequez
Update: I finally figured it out! It turns out I was using the URL http://localhost:8888/ for the server which was missing the version number, I had to use http://localhost:8888/v1. The Elm implementation didn't warn about it, but when I tried to use the Kinto JS implementation it did warned me and that's when I realized. Would be nice to make a pull request for that.
Dylan Staley
@dstaley:matrix.org
[m]
Glad you figured it out! And yes, please do make a pull request. I'm not sure who's maintaining the elm client, but I'm sure they'd appreciate it.
Ezequiel Schwartzman
@Zequez

I'm wondering something. I've made a deployment based on the kinto-scalingo package. I couldn't figure out how to successfully configure it to use paste.deploy on runapp.pyto run the app locally (I'm not a Python mastermind; and the server was just refusing to respond or log anything when ran from runapp.py). But I figured I could just replace the runapp.py with runapp.sh with the CLI Kinto command and change the Procfile to use that.

Afterwards I could run it locally and I also successfully deployed it. Am I missing something here? What's the point of the overhead of running it from Python rather than just using a CLI command? Does Paste Deployment adds anything of value here?

Dylan Staley
@dstaley:matrix.org
[m]
@Zequez if you ran run the app with the CLI that's totally fine, but most production deployments use WSGI instead of the built-in server (which is what the CLI uses)
Sergey Maranchuk
@slav0nic
@leplatrem is here any integration tests example with real kinto instance and requests without mocking?
h4xhor
@h4xhor
Hi, just want to update that I'm no longer going to write a Kinto package for Flutter. Sorry.