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

Report attempted mappings update on failure #224

Merged

Conversation

J4bbi
Copy link
Contributor

@J4bbi J4bbi commented Jan 31, 2024

Description

dictdiffer.diff returns a generator and so raise NotAllowedMappingUpdate(list(changes)) would always show an empty list.

Moreover dictdiffer.diff returns a list of tuples with the first tuple value showing whether the change is 'change', 'add' or 'remove'. This makes me think that all([change == "add" for change in changes]) would always return False so I am not sure how this was working to begin with ?

I am updating the error reporting to include a brief explanation and summary of what is wrong and including the full change printout.

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Third-party code

If you've added third-party code (copy/pasted or new dependencies), please reach out to an architect.

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

@utnapischtim
Copy link
Contributor

@slint should we close that?

@slint
Copy link
Member

slint commented Mar 5, 2024

A bit of a shame we didn't merge this to begin with, I'm sorry @J4bbi 😅

I like the new error message you've added, so I've actually resolved the merge conflict and will keep it for squash-merging this PR.

@slint slint merged commit 77de9ef into inveniosoftware:master Aug 2, 2024
4 checks passed
slint added a commit to zenodo/zenodo-rdm that referenced this pull request Aug 2, 2024
📁 invenio-accounts (5.0.1 -> 5.1.0 🌈)

    release: v5.1.0
    feat(cli): add command for group creation

    * add opensearch, necessary for the invenio-users-resources package
    cli: add command for domain create

📁 invenio-records-permissions (0.19.2 -> 0.20.0 🌈)

    📦 release: v0.20.0
    record: add create_or_update_many permission

    * closes inveniosoftware/invenio-vocabularies#353

📁 invenio-records-resources (6.1.0 -> 6.2.0 🌈)

    📦 release: v6.2.0
    ci: use reusable workflows
    service: add ServiceBulkListResult

    * Adds ServiceBulkListResult and ServiceBulkItemResult
    service: add create update many

    * closes inveniosoftware/invenio-vocabularies#353
    📦 release: v6.1.1
    services: clean up the code

    * closes inveniosoftware/invenio-app-rdm#2685

📁 invenio-requests (4.5.1 -> 4.6.0 🌈)

    release: v4.6.0
    comments: fix jumping cursor

    * these changes depending on thins PR: inveniosoftware/react-invenio-forms#244
    * align porperty naming as RichEditior wrongly named value instead of initialValue
    * change onchange to onEditorChange as recommended in the tinymce docs.
    * Change the prop value to inputValue, as the name value seems to conflict with other elements, causing the input text in edit mode to behave oddly.
    ui: [#855] add community membership request label type

📁 invenio-search (2.3.1 -> 2.4.0 🌈)

    📦 release: v2.4.0
    cli: add "--check/--no-check" flag for mapping updates
    ci: use reusable workflows
    ext: report attempted mappings update on failure (inveniosoftware/invenio-search#224)

📁 invenio-theme (3.2.0 -> 3.3.0 🌈)

    📦 release: v3.3.0
    templates: add meta robot tags

    * Generate robots meta tags from the `THEME_META_ROBOT_TAGS` config or
      exlicitly set via the `meta_robot_tags` Jinja variable.
    header:  increase invenio menu z-index

📁 invenio-users-resources (5.3.0 -> 5.3.1 🐛)

    release: v5.3.1
    config: Update records_html link

    * The records_html link in the UsersServiceConfig class has been updated to include the "parent.access.owned_by.user" query parameter.
    * Add tests for admin links
    * Add tests for admin visibility links
    moderation: fix admin record / draft links

    * Fix admin user lists show no results
    * Closes inveniosoftware/invenio-app-rdm#2721
    * No need to change moderation links as they are functional
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