-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Upgrade to v4.3-beta1 fails if FIELD_CHOICES is in use #19224
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
Comments
It could potentially be a subset of your choices. We're using various status choices for Circuit/Device/Prefix/Site/etc. The only other non-status is Journal kind choices. Full and explicit substitution of choices, e.g. below
Migrations okay from v4.2.7. Only other notable possibly is Python3.11 |
here is our section:
|
I can't exhaustively test it, but it might be something in When I added those choices to mine, I ran in to the same exception. I'm not using Rack status.
If I add a native status, upgrade.sh seems to run okay. I used Planned and Active. 3 tests; using Active+Planned, then just Active and finally just Planned. All three of those ran successfully.
My choices include native statuses. Perhaps you can try the same? |
I reverted Rack statuses to default ones, deleted my custom statuses from configuration.py, but it still reports the same errors (this time without message "� Enum type RackStatusEnum must define one or more values." ). |
So you get some other If so, perhaps if you have any choices in use, they still require at least one native choice. Maybe not limited to Regardless, this issue is assigned and problem could possibly already identified. Not sure if my contribution is just noise at this stage. |
Regarding your first message in this topic, you might be right. Now I've added this line:
whenever I try to access any section of the main menu that is not related to the Field_choices sections. For example, I get an error when going to Racks → Rack Roles, but I don’t get an error when navigating to Racks → Racks (since I have an entry for racks in the Field_choices). |
Fixes #19224: Fix GraphQL API support for custom field choices
Uh oh!
There was an error while loading. Please reload this page.
Deployment Type
Self-hosted
NetBox Version
v4.2.7
Python Version
3.12
Steps to Reproduce
FIELD_CHOICES (in configuration.py) have been in use for a long time to define custom status values for racks, devices, circuits, and prefixes.
Perform an upgrade following the steps from the documentation:
sudo git fetch --tags
sudo git checkout v4.3.0-beta1
sudo ./upgrade.sh
NOTICE: When the same upgrade steps are performed without any use of FIELD_CHOICES, the upgrade completes without issues.
Expected Behavior
Upgrade should complete successfully or at least provide clear migration guidance for deprecated or removed constants like FIELD_CHOICES.
Observed Behavior
The text was updated successfully, but these errors were encountered: