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

Add a Special User Mode #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Nakaner
Copy link

@Nakaner Nakaner commented Nov 17, 2016

This pull request adds a mode I call "user mode". The redaction ID is 0 in this mode and no redactions (only reverts) are done. As an replacement, redact_changeset.rb writes a script which calls woodpeck's redaction.pl script.

In some cases you do not want to redact changes (or you lack the permissions) because their license is ok but you want to revert them. Reverts are difficult if later changes have been applied to the edited objects (you get conflicts). If you can solve the conflicts automatically (has some downsides), you can revert them easier. The script calling redaction.pl which is written as an output, can be used by a DWG member to redact the old versions later if the need to redact them arises.

I act resposibly. Therefor, I am still doing manual tests on the Dev API (my accounts are Nakaner-repair-dev and Nakaner-dev) before I will use redact_changeset.pl on the live database. This pull request just proposes a merge of the improvements I have done yet.

In user mode (when the redaction ID is 0) redact_changeset.rb does not
redact the objects. As an replacement, it writes a file of commands
which call woodpeck's redaction.pl script.
https://github.com/woodpeck/osm-revert-scripts

In some cases you do not want to redact changes because their license is
ok but you want to revert them. Reverts are difficult if later changes
have been applied to the edited objects (you get conflicts). If you can
solve the conflicts automatically (has some downsides), you can revert
them easier. The script calling redaction.pl which is written as an
output, can be used by a DWG member to redact the old versions later if
the need to redact them arises.
@Nakaner Nakaner force-pushed the revert_without_redact branch from 7da0d4c to 31f8e88 Compare November 17, 2016 21:11
@pnorman
Copy link
Collaborator

pnorman commented Jan 1, 2017

What would sample output look like?

@Nakaner
Copy link
Author

Nakaner commented Jan 30, 2017

Sorry for the late response. My master thesis was more important. :-)

The sample output would look like this (master dev API, changeset 98356):

#! /usr/bin/bash
perl redaction.pl apply node 4305620223 1
perl redaction.pl apply node 4305620224 1
perl redaction.pl apply node 4305620225 1
perl redaction.pl apply node 4305620226 1
perl redaction.pl apply node 4305620227 1
perl redaction.pl apply node 4305620228 1
perl redaction.pl apply node 4305620229 1
perl redaction.pl apply node 4305620230 1
perl redaction.pl apply way 4302651605 1
perl redaction.pl apply way 4302651606 1
perl redaction.pl apply relation 4302390060 1

@pnorman
Copy link
Collaborator

pnorman commented Jan 30, 2017

👎

If redaction is needed, this code can do so itself.

@Nakaner
Copy link
Author

Nakaner commented Jan 30, 2017

pnorman wrote:

If redaction is needed, this code can do so itself.

There are use cases when a quick revert is important to reduce the number of conflicts. After the revert the DWG can still decide wether the old versions should be redacted or not.

The redaction bot has the advantage of automatic conflict resolution. This makes it useable for reverts which do not need a redaction but have hundreds of conflicts. Of course, its user should know how the redaction bot solves conflicts. :-)

@pnorman
Copy link
Collaborator

pnorman commented Jan 30, 2017

I'm still not seeing the use. If a changeset has been reverted it doesn't stop a redaction from being done on the same changeset.

@pnorman
Copy link
Collaborator

pnorman commented Jan 30, 2017

Also, if outputting a list of object versions it should be in the edits blacklist format that the redaction code expects.

@woodpeck
Copy link
Contributor

@pnorman, you're right in saying that the link to the perl scripts is superfluous. However this change does have merit nonetheless, namely if someone wants to use the redaction bot's advanced conflict management to revert and not redact a number of changesets. If the user does not have moderator privileges on the API, the redaction bot will nonetheless issue a ton of "redact" requests against the API that will all fail. Having a switch that says "don't attempt redaction, just make the changes" is an improvement that supports this non-moderator use case.

@pnorman
Copy link
Collaborator

pnorman commented Aug 27, 2017

@pnorman, you're right in saying that the link to the perl scripts is superfluous. However this change does have merit nonetheless, namely if someone wants to use the redaction bot's advanced conflict management to revert and not redact a number of changesets. If the user does not have moderator privileges on the API, the redaction bot will nonetheless issue a ton of "redact" requests against the API that will all fail. Having a switch that says "don't attempt redaction, just make the changes" is an improvement that supports this non-moderator use case.

The point is that we have a format for a list of objects to redact - the output should be in the same format the bot reads.

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

Successfully merging this pull request may close these issues.

3 participants