This project is mirrored from https://github.com/metabrainz/musicbrainz-server.
Pull mirroring updated .
- Mar 16, 2021
-
-
Nicolás Tamargo authored
-
Michael Wiencek authored
-
Nicolás Tamargo authored
-
Nicolás Tamargo authored
MBS-11448: Pass Place->new() call through to_json_object
-
- Mar 15, 2021
-
-
yvanzo authored
MBS-11446: Keep blank lines in annotation
-
Nicolás Tamargo authored
We did this in, if I counted right, five slightly different ways. Some didn't check for the entity_id at all before trying to use it (possibly triggering warnings about using an undef value as a hash key), some did, but only whether it was truthy, and some did and checked if it's defined. For extra safety, this always checks whether it's defined now. This stops passing the entity ID to Instrument->new, since we should still display something even if the id is missing anyway. Once we can generate types from the real edit data and are certain that a specific edit type always has an entity id, we might be able to improve how we do all this stuff (hopefully on the JS side).
-
Nicolás Tamargo authored
-
yvanzo authored
Blank line can be used to separate paragraphs and thus should be preserved (MBS-11446) but multiple blank lines are not needed. This patch merges consecutive blank lines together. Update tests accordingly.
-
Nicolás Tamargo authored
* beta: Update translations from Transifex MBS-11444: Pass Label->new() call through to_json_object MBS-11441: Beta: ISE on /account/applications Update POT files using the production database Update translations from Transifex MBS-11384: Ensure all country context names are translated MBS-11437: Beta: work-level rels not shown on release pages Alternative fix for MBS-11436 MBS-11436: Don't try to call method public on unblessed JSON MBS-11435: Don't modify data in build_display_data for EditReleaseLabel MBS-11434: Add explicit TO_JSON method to WikipediaExtract Update POT files using the production database Update translations from Transifex MBS-11431: /ws/js/check_duplicates is slow Pass the entity ID to missing entities in Edit::Alias::Add MBS-11423: Beginner editors report doesn't show any data Improve Perl consistency in build_display_data Unset allow_unknown, allow_blessed in Renderer.pm MBS-10866 / MBS-11409: Call TO_JSON explicitly in all cases Factor out data loading from inflate_rows Fix area type Flow type in AddArea.js Avoid infinite recursion in Entity::Role::Linkable::TO_JSON Further avoid infinite recursion in add_linked_entity Add to_json_array utility Add to_json_object utility MBS-11410: Remove row lock on editor table when creating edits MBS-11424: Unbreak seeding multiple RG types MBS-11420: "Paste Credits" doesn't apply credited name Comment duplicated code waiting for MBS-11428 MBS-10416: Remove invalid chars from annotation Remove spaces from the end of *every* line Fix trimming annotation field for edited release Refactor: Move annotation trimming code to utils Refactor: Remove line-formatting characters apart Improve tests for annotation trimming (MBS-4091) MBS-9871: Display all useful series relationships in RelatedSeries MBS-11433: Add Mp3tag to Products menu and main page tagger list MBS-11419: Show YouTube Music links on the sidebar MBS-11422: Block smart links: gate.fm MBS-11426: Use medium's position, not array position, to load it MBS-9581: Display relationship credits in EventLocations Fix key warning in FooterSwitch, make small tweaks MBS-10976: Allow some private use characters Update POT files using the production database Update translations from Transifex MBS-8621: Reset openedSingleQuote for every new guess MBS-10012: Treat http and https version of link as same for adding MBS-9836: Guess Case: stop uppercasing "the" in artist names MBS-11407: Make Controller->error use React errors MBS-10487: Allow adding instruments and areas from inline search MBS-11427: Improve seed-love-bug test/showcase MBS-9884: Use "Created" for character-type artist begin dates MBS-8232: Support more Unicode quotation marks in guess case Add Flow helper to check the exhaustiveness of switch statements MBS-9866: Add bubbles explaining what IPI and ISNI are on add forms Bump Flow to 0.146.0 MBS-9987: JSON-LD: Use "Concept URI" for Wikidata MBS-11402: Block smart links: many.link MBS-11405: Don't show ended URL rels in DeprecatedRelationship reports MBS-11408: Clarify Edit Note Author edit search options Fix typo (s/privileged/privileges/) compareDates / compareDatePeriods changes MBS-10076: Friendlier error when deleting attribute that has children MBS-10004: JSON-LD MBID URIs should be HTTP Fix component name in EditRelationship.js Upgrade Flow to 0.145.0 MBS-11403: Convert attribute in use page to React Fix spacing for copyright block MBS-11398: Add Qobuz links to sidebar
-
yvanzo authored
-
Nicolás Tamargo authored
-
Michael Wiencek authored
Adds the missing `to_json_object` call to `Entity::EditorOAuthToken`.
-
- Mar 11, 2021
-
-
Nicolás Tamargo authored
* master: Update POT files using the production database Update translations from Transifex MBS-11384: Ensure all country context names are translated Fix spacing for copyright block MBS-11398: Add Qobuz links to sidebar
-
Nicolás Tamargo authored
-
Nicolás Tamargo authored
-
Nicolás Tamargo authored
MBS-11398: Add Qobuz links to sidebar
-
Nicolás Tamargo authored
The existence of iso_3166_1 (not the area having the country type) is what matters for whether we make the area name available for translation. As such, that's also what we should be checking for.
-
Nicolás Tamargo authored
* beta: MBS-11437: Beta: work-level rels not shown on release pages Alternative fix for MBS-11436 MBS-11436: Don't try to call method public on unblessed JSON MBS-11435: Don't modify data in build_display_data for EditReleaseLabel MBS-11434: Add explicit TO_JSON method to WikipediaExtract
-
Michael Wiencek authored
68f8ae8a broke this for obvious reasons. Since I'm not comfortable reverting that (I did run into a case where infinite recursion was triggered -- just not sure where), I increased the max allowed depth instead.
-
Nicolás Tamargo authored
MBS-11436: Don't try to call method public on unblessed JSON
-
Michael Wiencek authored
This moves the private collection counting and entity filtering to SubscriptionsRole, rather than operating on component props after the fact.
-
Nicolás Tamargo authored
These used to be blessed collections but are now JSON, so {public} is JSON::true/false. Dereferencing it to see if true/false.
-
Nicolás Tamargo authored
This is causing the new modifications not to get converted to JSON, causing an ISE. There's also no good reason to do this at all, since we can easily pass only the data we need via build_display_data and we even limit the amount of bandwidth needed while at it.
-
Nicolás Tamargo authored
We're having an ISE when trying to load a cached extract after the changes in MBS-11409. Adding an explicit TO_JSON method to WikipediaExtract seems to solve the problem.
-
Nicolás Tamargo authored
* master: Update POT files using the production database Update translations from Transifex MBS-11431: /ws/js/check_duplicates is slow Pass the entity ID to missing entities in Edit::Alias::Add MBS-11423: Beginner editors report doesn't show any data Improve Perl consistency in build_display_data Unset allow_unknown, allow_blessed in Renderer.pm MBS-10866 / MBS-11409: Call TO_JSON explicitly in all cases Factor out data loading from inflate_rows Fix area type Flow type in AddArea.js Avoid infinite recursion in Entity::Role::Linkable::TO_JSON Further avoid infinite recursion in add_linked_entity Add to_json_array utility Add to_json_object utility MBS-11410: Remove row lock on editor table when creating edits MBS-11424: Unbreak seeding multiple RG types MBS-11420: "Paste Credits" doesn't apply credited name Comment duplicated code waiting for MBS-11428 MBS-10416: Remove invalid chars from annotation Remove spaces from the end of *every* line Fix trimming annotation field for edited release Refactor: Move annotation trimming code to utils Refactor: Remove line-formatting characters apart Improve tests for annotation trimming (MBS-4091) MBS-9871: Display all useful series relationships in RelatedSeries MBS-11433: Add Mp3tag to Products menu and main page tagger list MBS-11419: Show YouTube Music links on the sidebar MBS-11422: Block smart links: gate.fm MBS-11426: Use medium's position, not array position, to load it MBS-9581: Display relationship credits in EventLocations Fix key warning in FooterSwitch, make small tweaks MBS-10976: Allow some private use characters
-
Nicolás Tamargo authored
-
Nicolás Tamargo authored
-
Michael Wiencek authored
Adds the appropriate indexes needed by `Data::Role::Alias::search_by_names` and `Edit::Role::CheckDuplicates::is_disambiguation_needed`. As shown in the ticket, these queries take anywhere from 1.5 to 3 seconds for artists currently. After I created the new artist and artist_alias indexes on floyd, they took less than 1 ms. `artist_idx_lower_unaccent_name_comment` uses 70 MB on floyd; `artist_alias_idx_lower_unaccent_name` uses 10 MB. These would probably be the largest of the four entity types. I'm also dropping `artist_idx_lower_name` and `label_idx_lower_name` here, which are completely unused according to `pg_stat_all_indexes`. That should offset a bit of the space required.
-
- Mar 10, 2021
-
-
Michael Wiencek authored
MBS-10866 / MBS-11409: Call TO_JSON explicitly in all cases
-
Michael Wiencek authored
I'm not sure if this value is useful at present, but it's generally expected to exist by our Flow types.
-
Michael Wiencek authored
-
Michael Wiencek authored
* Removed all unnecessary -> operators. * Removed spaces inside $foo{ ... } accesses unless ... was a complex expression (in which case I kept or added spaces).
-
Michael Wiencek authored
We want to ensure there aren't any lingering cases where we're not explicitly calling TO_JSON. Die if we encounter any unknown or blessed objects from now on. See MBS-10866, MBS-11409, and related commits for context.
-
Michael Wiencek authored
Fixes MBS-10866 & MBS-11409. Prior to this patch, there was a longstanding issue whereby the encoding of the `$linked_entities` hash would cause modifications to it while it was being encoded. This would happen because in many cases, we've relied on convert_blessed to have the encoder call `TO_JSON` for us -- and any TO_JSON method could of course call add_linked_entity again. As the error message in MBS-11409 hints at, this caused undefined behavior. There was no guarantee that an entity added to `$linked_entities` mid-encoding would appear in the final encoded output. This caused mysterious bugs like MBS-10866. The use of `convert_blessed` was convenient because it meant we could pass in blessed entities without needing to worry about converting them to plain hash refs. Unfortunately, there's no safe way to guarantee that `$linked_entities` is fully populated -- and won't be modified during encoding -- without explicitly calling TO_JSON everywhere beforehand. This commit does that. (Since `$linked_entities` is now populated eagerly, we also have to make sure `encode_with_linked_entities` doesn't reset it; it's now set and unset at the beginning of each request.) This is an invasive change, because it affects so many different places across the site: * TO_JSON methods (entity layer) * component_props (controller layer) * React.embed props (TT) * build_display_data (edits) * inflate_rows (reports) * ??? I tested this by browsing as many pages on the site as I could: clicking on all tabs of every entity type, loading at least one edit of every type, performing various edit searches, etc. Further testing on test.mb and beta.mb is recommended.
-
yvanzo authored
MBS-10416: Remove invalid characters from edited annotations
-
Michael Wiencek authored
In a future commit, inflate_rows will return plain hash refs (to be serialized to JSON) instead of blessed entities. So overriding inflate_rows will not allow us to load additional data on the output -- we need something separate that runs beforehand.
-
Michael Wiencek authored
-
Michael Wiencek authored
It's technically possible to have cyclic references via relationships. Like artist1.relationships @> work1 and work1.relationships @> artist1. Until we start outputting relationship targets via `$linked_entities`, I think it's safer to limit relationship serialization to one level.
-
Michael Wiencek authored
In order to fix MBS-11409, I'll be removing allow_blessed and convert_blessed from the JSON encoder for the template renderer and making all TO_JSON calls explicit. This means that the `to_json_object` call inside `add_linked_entity` may lead to another invocation of `add_linked_entity`, possibly on the same entity! To avoid this situation, I'm changing the relevant condition to use `exists` instead of `defined` before deciding whether to proceed with the given entity ID, and then ensuring that that entry *exists* (by setting it to undef) before calling `to_json_object`.
-