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

wikibase: Better handling of the 'badtags' error #6552

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

Conversation

wetneb
Copy link
Sponsor Member

@wetneb wetneb commented Apr 22, 2024

This falls back on editing with a non-versioned openrefine tag instead of openrefine-${version} by default, and on editing without a tag if openrefine isn't available.

Closes #6551.

@github-actions github-actions bot added Type: Bug Issues related to software defects or unexpected behavior, which require resolution. wikibase Related to wikidata/wikibase integration labels Apr 22, 2024
@wetneb
Copy link
Sponsor Member Author

wetneb commented May 16, 2024

@sebastian-berlin-wmse and @Vesihiisi have tested it and it works, but in the case of media upload this has the bad side effect of uploading the file twice if the first upload fails because of a bad tag. It would be more efficient if we could avoid this double upload. Note that this would only happen for the first upload in a batch, because OpenRefine keeps using the latest tag that worked afterwards.

One approach would be to upload without tags and then apply the tags manually. Perhaps that would be a better architecture, although it might also have downsides:

  • the edit isn't tagged immediately, meaning that it might get consumed in this untagged state by eager consumers (recent changes pollers, or Wikimedia event stream listeners…)
  • in general, that would add one HTTP request to each edit made

Also Wikidata-Toolkit doesn't have a wrapper for applying tags to an edit so we'd need to make the request ourselves (but that wouldn't be the first time).

At least we should update the manifests so that new users get the right (unversioned) tag.

@wetneb
Copy link
Sponsor Member Author

wetneb commented May 16, 2024

Actually, the openrefine-${version} tag we were using so far doesn't seem to be hard-coded in the manifests, so we should be able to let users upgrade seamlessly to the new tag. This should solve the double upload problem for Commons and Wikidata.

This falls back on editing with a non-versioned 'openrefine' tag
instead of 'openrefine-${version}" by default, and on editing without
a tag if 'openrefine' isn't available.

Closes OpenRefine#6551.
@wetneb wetneb force-pushed the 6551-wikibase-tag-fallback branch from e71ed3f to 9e5c9f9 Compare May 16, 2024 21:02
@wetneb
Copy link
Sponsor Member Author

wetneb commented May 20, 2024

I'd merge this next week unless there are any concerns.

Copy link
Member

@tfmorris tfmorris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know enough about Wikibase to offer an opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues related to software defects or unexpected behavior, which require resolution. wikibase Related to wikidata/wikibase integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tag management of the Wikibase editing operation
2 participants