My mistake. I think I know what the problem is. You're missing 2 parameters in the URL path. The entry in the urls.py looks as follows:
url(r'^submitjob/(%s)/(%s)/(%s)/(%s)' % ((slug_pattern,) * 4), ci.submit_job),
So your URL should look sth like: localhost:5000/api/submitjob/group-slug/project-slug/<your version string>/<your environment name>/
Please check the docs for more details: https://squad.readthedocs.io/en/latest/ci.html#ci-job-ref-label
milosz
On Tue, 12 Mar 2019 at 10:38, Fabiano Ferronato fabiferro@hotmail.com wrote:
Hi Miloz, Thank you for answering!
Yes, the names are correct. I tried creating and using other names as well but the answer is always the same,
Not Found: /api/submitjob/fabsluggroup/fabproj/
Searching for projects I'm receiving this:
curl localhost:5000/api/projects/ {"count":2,"next":null,"previous":null,"results":[{"url":"http://localhost:5000/api/projects/2/%22,%22builds%22:%22http://localhost:50...
If I try just submitjob:
curl 0.0.0.0:5000/api/submitjob/ [2019-03-12 10:33:56 +0000] [WARNING] Not Found: /api/submitjob/
Em seg, 11 de mar de 2019 às 19:05, Milosz Wasilewski milosz.wasilewski@linaro.org escreveu:
On Mon, 11 Mar 2019 at 17:10, Fabiano Ferronato fabiferro@hotmail.com wrote:
Hello all,
I'm installing Squad to integrate with Lava server that's already working on production.
Followed instructions from the links below but the first basic test is failing.
It is basically saying that submitjob is not found.
If I go to Squad's /api there is no submitjob there. I can see others (groups,usergroups,projects,builds,testjobs,testruns,tests,suites,environments,backends,emailtemplates,knownissues,patchsources,suitemetadata,annotations,metricthresholds,reports)
Could somebody point me what is missing here? Appreciate any help! Thanks.
Installation links: https://squad.readthedocs.io/en/latest/install.html https://squad.readthedocs.io/en/latest/lava_usecase.html ____________________________________ Test ERROR:
$ curl localhost:5000/api/submitjob/group-slug/project-slug/ \ --header "Auth-Token: XXXXXXXX" \ --form "backend=lava_swtest" \ --form "definition=@qemu-pipeline-first-job.yaml"
[2019-03-11 15:48:41 +0000] [WARNING] Not Found: /api/submitjob/group-slug/project-slug/
do you have a group with slug 'group-slug' and project 'project-slug' in this group? If not, that's what's giving you 404. submitjob API is not one of the listed in the /api path.
milosz
*** Bellow are the info when starting squad, worker etc:*** _____________________________________ $ squad --bind 0.0.0.0:5000 &
Operations to perform: Apply all migrations: admin, auth, authtoken, ci, contenttypes, core, sessions Running migrations: No migrations to apply. [2019-03-11 15:16:30 +0000] [3429] [INFO] Starting gunicorn 19.9.0 [2019-03-11 15:16:30 +0000] [3429] [INFO] Listening at: http://0.0.0.0:5000 (3429) [2019-03-11 15:16:30 +0000] [3429] [INFO] Using worker: sync [2019-03-11 15:16:30 +0000] [3471] [INFO] Booting worker with pid: 3471 [2019-03-11 15:17:00 +0000] [WARNING] Task squad.ci.tasks.poll() consumed 1MB of memory [2019-03-11 15:17:24 +0000] [3429] [CRITICAL] WORKER TIMEOUT (pid:3471) [2019-03-11 15:17:24 +0000] [3471] [INFO] Worker exiting (pid: 3471) [2019-03-11 15:17:24 +0000] [3521] [INFO] Booting worker with pid: 3521
$ celery -A squad worker
-------------- celery@0938574e5ae7 v4.2.1 (windowlicker) ---- **** ----- --- * *** * -- Linux-4.9.0-8-amd64-x86_64-with-debian-9.7 2019-03-11 13:30:40 -- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: squad:0x7fd9e5554d68
- ** ---------- .> transport: amqp://guest:**@localhost:5672//
- ** ---------- .> results: disabled://
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .> celery exchange=celery(direct) key=celery
$ celery -A squad beat
LocalTime -> 2019-03-11 13:31:18 Configuration -> . broker -> amqp://guest:**@localhost:5672// . loader -> celery.loaders.app.AppLoader . scheduler -> celery.beat.PersistentScheduler . db -> celerybeat-schedule . logfile -> [stderr]@%WARNING . maxinterval -> 5.00 minutes (300s)
$ squad-admin listen
[2019-03-11 13:31:35 +0000] [INFO] Backend lava_swtest starting [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connecting to tcp:// company.net:5500 [2019-03-11 13:31:35 +0000] [DEBUG] lava_swtest: connected to tcp:// company.net:5500 _______________________________________________ Squad-dev mailing list Squad-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/squad-dev