Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go »
No member browsing this thread
Thread Status: Active
Total posts in this thread: 13
Posts: 13   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 4596 times and has 12 replies Next Thread
adriverhoef
Master Cruncher
The Netherlands
Joined: Apr 3, 2009
Post Count: 2346
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Runtime, points and results all zero in device-api ending in /{id} [SOLVED]

Using the device-api GET /api/v3/ms/devices I get a number of personal "items" (devices) and they have each a fair amount of runtime, points and results, as expected. One of them is e.g. an Android device:
{
"runtimeInSeconds": 215810359,
"points": 2233722,
"results": 5169,

"id": 3465409,
"name": "android_c09803ec",
"os": "Android",
"type": "B",
"registrationDate": "2016-01-12T11:16:51+0000",
"lastResult": "2021-10-10T19:58:33+0000",
"venue": "school"
}

So I can take the "id" and "type" values and fill them out in the device-api GET /api/v3/ms/devices/{id} underneath it, where I'd expect the same results. However, runtime, points and results turn out to be all zero:
{
"runtimeInSeconds": 0,
"points": 0,
"results": 0,
"id": 3465409,
"name": "android_c09803ec",
"os": "Android",
"type": "B",
"registrationDate": "2016-01-12T11:16:51+0000",
"lastResult": "2021-10-10T19:58:33+0000",
"venue": "school"
}

(Note: if you try this out yourself, be sure to use the values for your own devices.)

My assumption is that the correct values are erroneously missing in the device-api with the {id} at the end.


Adri
EDIT: changed 'ttps' into 'https'
----------------------------------------
[Edit 2 times, last edit by adriverhoef at Oct 13, 2021 11:21:29 AM]
[Oct 10, 2021 11:47:58 PM]   Link   Report threatening or abusive post: please login first  Go to top 
alanb1951
Veteran Cruncher
Joined: Jan 20, 2006
Post Count: 1317
Status: Recently Active
Project Badges:
Reply to this Post  Reply with Quote 
Re: Runtime, points and results all zero in device-api ending in /{id}

Adri,

Just to confirm that I've tried this from a remote Python script and it is broken there as well!!! (So it isn't just the Swagger page that has a problem...)

As we can get the data for an individual device by digging it out of the "all devices" stuff, it's a [low prioirity?] nuisance rather than a show-stopper, but hopefully it'll get fixed at some point.

Cheers - Al.
[Oct 11, 2021 4:24:10 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Runtime, points and results all zero in device-api ending in /{id}

The WCG result status page xml extract (see help) still works fine as does the one for the My Contribution page, but the autologin scrape scripts to include the ones to access the device profiles and to quiz the results status pages result distribution details without ever touching a browser are all broken, for me. Not got the energy or will to muster an attempt at fixing... what was that was, 1 step forward, 2 back.

edit: some missed words inserted.
----------------------------------------
[Edit 1 times, last edit by Former Member at Oct 11, 2021 3:53:49 PM]
[Oct 11, 2021 3:52:39 PM]   Link   Report threatening or abusive post: please login first  Go to top 
adriverhoef
Master Cruncher
The Netherlands
Joined: Apr 3, 2009
Post Count: 2346
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Runtime, points and results all zero in device-api ending in /{id}

but the autologin scrape scripts to include the ones to access the device profiles and to quiz the results status pages result distribution details without ever touching a browser are all broken, for me.


It took me a total of 2 weeks to rewrite all the scripts(*) and then 1 week to fine-tune them after the website was changed.

(*) Actually, only 2 scripts needed rewriting ('wcgformat' and 'wcgstats') and it was fun to add some functionality to 1 script ('wcgresults').
----------------------------------------
[Edit 1 times, last edit by adriverhoef at Oct 11, 2021 5:27:24 PM]
[Oct 11, 2021 5:26:53 PM]   Link   Report threatening or abusive post: please login first  Go to top 
BobbyB
Veteran Cruncher
Canada
Joined: Apr 25, 2020
Post Count: 638
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Runtime, points and results all zero in device-api ending in /{id}

I think you miss the point people are making in this of other threads and that you should not have to go around creating kludges to fix stuff which was working before.
In many threads all around the forums I sense people's frustration and then kludges are offered.

Take the thread below, in which you replied, you offer 3 scripts which took you 2 weeks to rewrite. They are Linux. My WCG machines are all Linux but this and my other computers are Windows.

Don't know the officials stats of WCG but would bet that the percentages of Windows/Linux/Mac users are about that of the world percentages. You know what they are.

Yes I could look at the scripts and rewrite them in some language which could work in Windows or maybe turning on WSL but to quote lavaflow "Not got the energy or will to muster an attempt at fixing... what was that was, 1 step forward, 2 back"
In the thread below the guy NawlinsGuy80 just wants his ranking. (Can you not feel the frustration? I can) It was there before on the overview page. Now it's try this kludge or that kludge.
https://www.worldcommunitygrid.org/forums/wcg/viewpostinthread?post=667239
[Oct 12, 2021 5:33:55 AM]   Link   Report threatening or abusive post: please login first  Go to top 
adriverhoef
Master Cruncher
The Netherlands
Joined: Apr 3, 2009
Post Count: 2346
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Runtime, points and results all zero in device-api ending in /{id}

I think you miss the point people are making in this of other threads and that you should not have to go around creating kludges to fix stuff which was working before.

Calling writing computer programs (which is my job) 'creating kludges' is an insult in my eyes. wink I can deal with that, although it's not fair.

Two things.
The programs and websites that people are offering have been produced because people wanted to create something, based on the available data and on their view how data should be represented.
The helpful hints that people are offering have been given because they want to help others.

When technology behind a website changes, things can't always remain the same. The choice can't always be 'keep everything working like the way it used to'. Like evolution, we have to adapt to 'survive'. If you don't, your website or program stops working or will fail in some way.

As for me, I have been writing programs - using the available data - to be able to look at things in a certain way. I have been offering programs to others. In certain circumstances they are useful. So, to me, calling them 'kludges', well, it is disappointing, because, for me it is creativity, trying to solve the puzzle, battling the changes. And when I finally, at last, succeed in that, blushing victory! And with a victorious feeling I sometimes fail to see the big frustration, when I want to help. But that's me.


And hey, if they don't want the help that I'm offering, maybe they should try to find a solution for their problem somewhere else. tongue That's not my problem, I don't get paid for it, you see. Besides, they make their own choice how they solve their problem. It's up to them.

Take the thread below, in which you replied, you offer 3 scripts ...
Not only that, I also mentioned at least two other solutions (with links). devilish

----------------------------------------
[Edit 1 times, last edit by adriverhoef at Oct 12, 2021 9:52:39 AM]
[Oct 12, 2021 9:50:02 AM]   Link   Report threatening or abusive post: please login first  Go to top 
KerSamson
Master Cruncher
Switzerland
Joined: Jan 29, 2007
Post Count: 1684
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Runtime, points and results all zero in device-api ending in /{id}

@ BobbyB,
I dislike your remark since it implies that the work done by Adri is not valuable (maybe because you do not share similar needs).
Several of us try to monitor relatively closely the work performed by our machines, at least for debugging and optimising purpose, what is finally beneficial for all contributors.
Because of an accurate monitoring, I was several times able to report problems relatively early and with sufficient details.
The pity of this not nice looking new web site is that several things - e.g. API - which worked very reliably in the past are now (partially) broken, without any anticipated warning and announcement. Honestly I do not see the reason to change so many things behind the interface look and feel. It was possible to elaborate a "lifting" of the web site (if necessary) without broking robust mechanisms used by multiple people.
I do not understand as well your discussion point "Linux vs. Windows". Even if Adri's script is designed to run in a Linux environment, it reports the activities of all contributor's machines: windows like Linux, MacOS, and Android.
If you take the time to read and understand Adr's scripts, you will notice that the tool is far away of a kludge. It is well designed and reflects a couple of years of work based on enhanced needs.
Cheers,
Yves
----------------------------------------
[Oct 12, 2021 1:14:01 PM]   Link   Report threatening or abusive post: please login first  Go to top 
adriverhoef
Master Cruncher
The Netherlands
Joined: Apr 3, 2009
Post Count: 2346
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
rose Re: Runtime, points and results all zero in device-api ending in /{id} [SOLVED]

In my first post in this thread I wrote:
Using the device-api GET /api/v3/ms/devices I get a number of personal "items" (devices) and they have each a fair amount of runtime, points and results, as expected. One of them is e.g. an Android device:
{
"runtimeInSeconds": 215810359,
"points": 2233722,
"results": 5169,

"id": 3465409,
"name": "android_c09803ec",
"os": "Android",
"type": "B",
"registrationDate": "2016-01-12T11:16:51+0000",
"lastResult": "2021-10-10T19:58:33+0000",
"venue": "school"
}

So I can take the "id" and "type" values and fill them out in the device-api GET /api/v3/ms/devices/{id} underneath it, where I'd expect the same results.
[...]
(Note: if you try this out yourself, be sure to use the values for your own devices.)

The outcome then was that the amounts of runtime, points and results didn't match, in fact they were represented as being zero at that time in the '{id}' case.

I've just checked it again and the values are now showing the correct values in the device-api with the {id} at the end.

Bravo and thanks, techs!

Adri
[Oct 13, 2021 11:31:31 AM]   Link   Report threatening or abusive post: please login first  Go to top 
BobbyB
Veteran Cruncher
Canada
Joined: Apr 25, 2020
Post Count: 638
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Runtime, points and results all zero in device-api ending in /{id} [SOLVED]

Wow did I hit a nerve here.

Definition of kludge from Webster:
a haphazard or makeshift solution to a problem and especially to a computer or programming problem.
That is not derogatory. It means being resourceful [able to meet situations : capable of devising ways and means] - Webster

I do the same kind of stuff both of you describe here. Maybe not for WCG. And yes it is creativity or even an art form.
And when I finally, at last, succeed in that, victory!
I know the feeling. It's a gotcha moment. But I still call my "gotcha moments" kludges. "This doesn't work or was not to do that and I made it do it anyway"

The whole Internet is a kludge if you dig deep down. Making disparate systems work with one another when they weren't meant to.

KerSamson:
I dislike your remark since it implies that the work done by Adri is not valuable
I never said that, never even implied it, not even slightly. I'm an ex-IT guy so I don't do that. I looked at it. But you are right I do not have that exact need, and if I did, I would have done what he did and invented something. I may not have shared it though. It's even got documentation in the code. Whoa

The pity of this not nice looking new web site is that several things etc etc
Yes exactly. That sure is not the IBM I knew and worked with. The IBM I knew understood backward compatibility. When a new version of an OS (mainframe) came out you could be sure your stuff would work unless you modified the source code. Yes they supplied the source code then.

I do not understand as well your discussion point "Linux vs. Windows"
Yes Linux rules the server world. This is the simple fact that most people use Window for their desktop/laptop and the scripts would not run and I'm not sure most people would want to play with WSL. I suspect there are more *nix users here than the worldwide stats but...
----------------------------------------
[Edit 2 times, last edit by BobbyB at Oct 13, 2021 4:26:54 PM]
[Oct 13, 2021 4:17:39 PM]   Link   Report threatening or abusive post: please login first  Go to top 
adriverhoef
Master Cruncher
The Netherlands
Joined: Apr 3, 2009
Post Count: 2346
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Runtime, points and results all zero in device-api ending in /{id} [SOLVED]

Wow did I hit a nerve here.

Yes, you did. devilish

Definition of kludge from Webster:
a haphazard or makeshift solution to a problem and especially to a computer or programming problem.
That is not derogatory. It means being resourceful [able to meet situations : capable of devising ways and means] - Webster

Wikipedia describes it as: "A kludge or kluge is a workaround or quick-and-dirty solution that is clumsy, inelegant, inefficient, difficult to extend and hard to maintain."
I've always known the Wikipedia meaning of the word since I learnt English.

Oxford ODE: "/klʌdʒ, kluːdʒ/ informal ▶noun · an ill-assorted collection of parts assembled to fulfil a particular purpose. ■Computing a machine, system, or program that has been badly put together, especially a clumsy but temporarily effective solution to a particular fault or problem. ▶verb [with obj.] · improvise or put together from an ill-assorted collection of parts. Hugh had to kludge something together. – origin 1960s: invented word, perhaps influenced by bodge and fudge."

I do the same kind of stuff both of you describe here. Maybe not for WCG. And yes it is creativity or even an art form.

Glad that you look at it that way, too, Bobby.

I know the feeling. It's a gotcha moment. But I still call my "gotcha moments" kludges. "This doesn't work or was not to do that and I made it do it anyway"

I believe that's not the way how I work. If something doesn't work and I don't get it to work, I will search for a solution, and then when I get it to work, I want to understand what was wrong about it, because I want to learn from my mistake and hope to remember it. biggrin


Adri
[Oct 13, 2021 5:54:40 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Posts: 13   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread