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

OPLOG =True is not working currently, #1074

Closed
cst4049 opened this issue Oct 17, 2017 · 7 comments
Closed

OPLOG =True is not working currently, #1074

cst4049 opened this issue Oct 17, 2017 · 7 comments
Milestone

Comments

@cst4049
Copy link

@cst4049 cst4049 commented Oct 17, 2017

eve/methods/common.py
in v0.8
if not config.OPLOG
or op not in config.OPLOG_METHODS
or resource in config.URLS[resource]:
return
in v0.7 and preview
if not config.OPLOG or op not in config.OPLOG_METHODS:
return
it works in v0.7,and not work in v0.8

@Amedeo91
Copy link

@Amedeo91 Amedeo91 commented Oct 17, 2017

Share your configuration please

@cst4049
Copy link
Author

@cst4049 cst4049 commented Oct 17, 2017

oplog

OPLOG = True
OPLOG_ENDPOINT = 'oplog'
I found common.py is different between branch v0.6 to branch v0.8

@zhangtemplar
Copy link
Contributor

@zhangtemplar zhangtemplar commented Nov 3, 2017

I have the same problem.

OPLOG = True
OPLOG_METHODS = ['GET', 'DELETE', 'POST', 'PATCH', 'PUT']

this configuration doesn't work either.

What is resource in config.URLS[resource] targeted for?

@cst4049
Copy link
Author

@cst4049 cst4049 commented Nov 3, 2017

oplog might be not record the GET method,
and your can try config.URLS[resource] not contain the resouce,
like this:
resource = "people" and the url must be not contain people
you can use url like "human" and "aaa" something others just avoid "people"
the point is the url can't contain the resource name

@zhangtemplar
Copy link
Contributor

@zhangtemplar zhangtemplar commented Nov 4, 2017

@cst4049 I have commented out resource in config.URLS[resource] but still doesn't work.

@josemifv
Copy link

@josemifv josemifv commented Nov 8, 2017

Hi all,

I am currently working with Eve 0.7.4 and I have the same issue. After setting OPLOG=TRUE and OPLOG_ENDPOINT='oplog', the endpoint is created, but it is not populated.

After checking the source code, I noticed that the commit a7350d fixed the issue, but the commit 662924 changed the condition to the above-mentioned resource in config.URLs[resource] and the oplog_push does nothing as the initial condition always is True.

I changed the condition as coded in a7350d and the OPLOG is working again in 0.7.4.

I hope it helps you :)

@zhangtemplar I have checked eve/methods/get.py and oplog for GET method is not supported.

@nicolaiarocci nicolaiarocci added this to the 0.8 milestone Nov 8, 2017
@cst4049 cst4049 closed this Nov 9, 2017
@zhangtemplar
Copy link
Contributor

@zhangtemplar zhangtemplar commented Nov 9, 2017

@josemifv Yes, I whitelist the get methods for oplog. But I find none of the methods, e.g., post, get, is ever logged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants