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

Make node aliases not nullable #10437 #11600

Merged
merged 6 commits into from
Nov 5, 2024

Conversation

jacobtylerwalls
Copy link
Member

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

Nodes with missing aliases weren't subject to the unique-per-graph constraint, making them unable to be usefully queried in #11596.

Now, the save() method ensures that an alias isn't missing, and a migration runs that very code on upgrade.

For instance, the arches-lingo project currently has a missing alias on the Person model. After running this migration, the alias is generated.

Issues Solved

Closes #10437

Checklist

  • I targeted one of these branches:
    • dev/8.0.x (under development): features, bugfixes not covered below
    • dev/7.6.x (main support): regressions, crashing bugs, security issues, major bugs in new features
    • dev/6.2.x (extended support): major security issues, data loss issues
  • I added a changelog in arches/releases
  • I submitted a PR to arches-docs (if appropriate)
  • Unit tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • My test fails on the target branch

Copy link
Member

@johnatawnclementawn johnatawnclementawn left a comment

Choose a reason for hiding this comment

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

I can null out a node alias and try to run the migration with failures - In create_node_alias, should add a check for node.alias.

That change should prevent users from updating their node aliases with an empty string, which is something else I noticed during testing.

Edit: addressed by: 1183311

@johnatawnclementawn
Copy link
Member

LGTM 👍🏼

@johnatawnclementawn
Copy link
Member

Confirmed in standup on 2024-11-05 that this change was desirable 👍🏼

@johnatawnclementawn johnatawnclementawn merged commit 7298732 into dev/8.0.x Nov 5, 2024
7 checks passed
@johnatawnclementawn johnatawnclementawn deleted the jtw/node-aliases-not-nullable branch November 5, 2024 18:51
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.

Make node aliases not nullable
2 participants