Code Monkey home page Code Monkey logo

Comments (9)

rmuslimov avatar rmuslimov commented on August 20, 2024

Can you please open in browser next url, and share result with me:

http://<JENKINS_URL>/job/<JOBNAME>/api/json?depth=1&tree=builds[id,timestamp,result,url,building,culprits[fullName]]

just replace two vars inside.

from jenkins.el.

glucas avatar glucas commented on August 20, 2024

Here's a response, with some strings replaced with placeholders to protect the innocent:

{"builds":[{"building":false,"id":"2015-10-27_02-05-28","result":"UNSTABLE","timestamp":1445925928909,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1596/","culprits":[]},{"building":false,"id":"2015-10-26_12-37-09","result":"SUCCESS","timestamp":1445877429000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1595/","culprits":[{"fullName":"<USER>"}]},{"building":false,"id":"2015-10-26_02-12-15","result":"SUCCESS","timestamp":1445839935000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1594/","culprits":[]},{"building":false,"id":"2015-10-25_02-05-21","result":"SUCCESS","timestamp":1445753121000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1593/","culprits":[]},{"building":false,"id":"2015-10-24_15-29-09","result":"SUCCESS","timestamp":1445714949000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1592/","culprits":[{"fullName":"<USER>"}]},{"building":false,"id":"2015-10-24_01-56-28","result":"SUCCESS","timestamp":1445666188000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1591/","culprits":[]},{"building":false,"id":"2015-10-23_02-04-25","result":"SUCCESS","timestamp":1445580265000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1590/","culprits":[]},{"building":false,"id":"2015-10-22_01-47-19","result":"SUCCESS","timestamp":1445492839000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1589/","culprits":[]},{"building":false,"id":"2015-10-21_19-09-46","result":"SUCCESS","timestamp":1445468986000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1588/","culprits":[{"fullName":"<USER>"}]},{"building":false,"id":"2015-10-21_16-57-30","result":"SUCCESS","timestamp":1445461050000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1587/","culprits":[{"fullName":"<USER>"}]}]}

from jenkins.el.

rmuslimov avatar rmuslimov commented on August 20, 2024

Sorry, i can't understand what might be broken on your side. For example, if we mock retrieving data and paste there json you've provided - it works fine:

(setq glucas-response "{\"builds\":[{\"building\":false,\"id\":\"2015-10-27_02-05-28\",\"result\":\"UNSTABLE\",\"timestamp\":1445925928909,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1596/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-26_12-37-09\",\"result\":\"SUCCESS\",\"timestamp\":1445877429000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1595/\",\"culprits\":[{\"fullName\":\"<USER>\"}]},{\"building\":false,\"id\":\"2015-10-26_02-12-15\",\"result\":\"SUCCESS\",\"timestamp\":1445839935000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1594/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-25_02-05-21\",\"result\":\"SUCCESS\",\"timestamp\":1445753121000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1593/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-24_15-29-09\",\"result\":\"SUCCESS\",\"timestamp\":1445714949000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1592/\",\"culprits\":[{\"fullName\":\"<USER>\"}]},{\"building\":false,\"id\":\"2015-10-24_01-56-28\",\"result\":\"SUCCESS\",\"timestamp\":1445666188000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1591/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-23_02-04-25\",\"result\":\"SUCCESS\",\"timestamp\":1445580265000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1590/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-22_01-47-19\",\"result\":\"SUCCESS\",\"timestamp\":1445492839000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1589/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-21_19-09-46\",\"result\":\"SUCCESS\",\"timestamp\":1445468986000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1588/\",\"culprits\":[{\"fullName\":\"<USER>\"}]},{\"building\":false,\"id\":\"2015-10-21_16-57-30\",\"result\":\"SUCCESS\",\"timestamp\":1445461050000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1587/\",\"culprits\":[{\"fullName\":\"<USER>\"}]}]}")

(flet ((jenkins--retrieve-page-as-json (url) (json-read-from-string glucas-response)))
  (jenkins-enter-job "airborne-dev"))

You can try to execute this code, just paste this to empty buffer and execute:

  M-x eval-buffer

from jenkins.el.

areina avatar areina commented on August 20, 2024

Hi,

I'm having the same error. Evaluating that data, I get this error: mapcar: Wrong type argument: sequencep, :json-false

Could it be related to emacs version? M-x emacs-version GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.2) of 2015-10-26

Will try to debug it

from jenkins.el.

areina avatar areina commented on August 20, 2024

For me, It's failing in https://github.com/rmuslimov/jenkins.el/blob/master/jenkins.el#L293

Debugging, the value of item is:

((building . :json-false) (id . "382") (result . "SUCCESS") (timestamp . 1447159882765) (url . "https://jenkins.3sca.net/job/cubert-pr/382/") (culprits . []))

Probably something changed in jenkins response, because in the code you're doing (let ((culprits (cdar item))) and that is :json-false (it's accessing to building property).

I'm using jenkins version 1.636

from jenkins.el.

glucas avatar glucas commented on August 20, 2024

It could be related to version -- I am also on GNU Emacs 25.0.50.1 (2015-10-05).

from jenkins.el.

rmuslimov avatar rmuslimov commented on August 20, 2024

Ah, you're it might be version issue - will check soon, thanks!

from jenkins.el.

rmuslimov avatar rmuslimov commented on August 20, 2024

Guys, can you please check and let me know if issue has been fixed with latest changes. I got the same bug on latest emacs, and now it fixed for me. Thanks!

from jenkins.el.

areina avatar areina commented on August 20, 2024

It's working well for me, thanks @rmuslimov

from jenkins.el.

Related Issues (20)

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.