Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field names deprecation in 0.4.0 #189

Closed
msrdic opened this issue Jan 18, 2014 · 3 comments
Closed

Field names deprecation in 0.4.0 #189

msrdic opened this issue Jan 18, 2014 · 3 comments
Milestone

Comments

@msrdic
Copy link
Contributor

msrdic commented Jan 18, 2014

Hi –

I read in 0.4.0 release notes that the username field for /cluster_admins and /db/:db/users calls is deprecated in favour of a more consistent name field. When I changed my library to work with these changes, tests failed. I discovered that I still get the username field, for both API calls. I have the latest brew package:

InfluxDB v0.4.0 (git: 012efd4)

Am I missing something, or is the deprecation still in preparation phase?

@jvshahid
Copy link
Contributor

Are you sure that this is the version that's currently running. You may have a stale process running a previous version. If this isn't the case, please provide the endpoint(s) with the expected output and the actual output. Cheers.

@msrdic
Copy link
Contributor Author

msrdic commented Jan 23, 2014

Hi @jvshahid

The line with the version in the previous message was pasted from the terminal after I ran influxdb -v, and influxdb is a symlink (/usr/local/bin/influxdb -> ../Cellar/influxdb/0.4.0/bin/influxdb). When I do it again, the output is the same. I restarted unfluxdb multiple times since I had trouble upgrading.

So now I did the following:

  • killed influxdb (with kill command)
  • starting it after this didn't work, server wouldn't start working again (at least the HTTP part didn't work)
  • deleted influxdb data folder
  • started influxdb (brew services start influxdb)

Now I have a nice and empty database. I run my tests, which create a bunch of cluster admins, and when I list cluster admins, I expect to see

[
{
name: "root"
},
{
name: "username_3834814c-f0bf-477e-82d7-b002ecc45726"
},
{
name: "username_a998667f-4049-4762-9236-b1fd71b2671d"
},
{
name: "username_98aa3880-c6f1-4e41-a00d-a80dc8f831ac"
},
{
name: "username_cef32344-b44e-476e-8610-346cb776d6f1"
},
{
name: "username_0f617561-81a0-4db4-af46-e2c9135e77a8"
},
{
name: "username_916a2831-53fb-4e88-9c0f-05d41b604d0c"
},
{
name: "username_89ee66b1-0247-4d94-a70e-7a19c891327c"
},
{
name: "username_14e68140-0e83-403d-b098-e0482de3f01b"
}
]

but what I get is

[
{
username: "root"
},
{
username: "username_3834814c-f0bf-477e-82d7-b002ecc45726"
},
{
username: "username_a998667f-4049-4762-9236-b1fd71b2671d"
},
{
username: "username_98aa3880-c6f1-4e41-a00d-a80dc8f831ac"
},
{
username: "username_cef32344-b44e-476e-8610-346cb776d6f1"
},
{
username: "username_0f617561-81a0-4db4-af46-e2c9135e77a8"
},
{
username: "username_916a2831-53fb-4e88-9c0f-05d41b604d0c"
},
{
username: "username_89ee66b1-0247-4d94-a70e-7a19c891327c"
},
{
username: "username_14e68140-0e83-403d-b098-e0482de3f01b"
}
]

My tests also create a bunch of random databases and users, so when I list users from one of them (/db/dc113a43-87d8-4afc-a1d2-00620affd68e/users), I expect to get

[
{
name: "username_9b483fa5-0ded-4a6f-bb6b-a7ee5c52d0e7"
},
{
name: "username_681e2b48-935a-4b3e-8be6-f1eb95dda8a2"
}
]

but instead I get

[
{
username: "username_9b483fa5-0ded-4a6f-bb6b-a7ee5c52d0e7"
},
{
username: "username_681e2b48-935a-4b3e-8be6-f1eb95dda8a2"
}
]

My tests shouldn't even pass after these changes, since I'm explicitly reading from a field named username. As soon as I get the chance, I'm gonna restart my machine and try reinstalling influxdb. It is most probably an isolated case, but if there's anything valuable here that you would like to know, I am open for assistance.

@jvshahid
Copy link
Contributor

Thanks @msrdic for your detailed explanation. It seems like we missed those two endpoints. They will get fixed in the next release.

jvshahid pushed a commit that referenced this issue Aug 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants