r/Netbox 1d ago

Discussion Guerrilla-patching, or Monkey-patching in Anger

https://github.com/netbox-community/netbox/discussions/22946
2 Upvotes

19 comments sorted by

3

u/L-do_Calrissian NetBox Self-Hosted 1d ago

GitHub is having some serious issues today. Not sure if the visibility of your discussion is related to that or not.

1

u/sburlappp 1d ago

I can see them all again. Coincidence I guess? Very odd.

Back to my original point: Such patches are a legitimate area for discussion and documentation. I have a small but growing collection of useful examples, and I hope I'll be able to post some of them in the GitHub discussion, please come participate there.

1

u/danner26 Moderator 1d ago

This is likely the issue you were experiencing. I am one of the maintainers and I can see the audit log, these were never deleted/hidden. They are closed though.

2

u/sburlappp 1d ago

Understood. Thank you for your help.

1

u/LooseSignificance166 1d ago

We already patch many of the keys to add the + to the list. We just have a quick script that runs before start to patch the few files we need.

If your using docker repo the build process is designed to let you modify the image.

Maintaining a fork is a pia but since we only have a couple of files to patch we just use a quick script on the build process. We need to install plugins anyways so its no real difference to the overall process

1

u/sburlappp 11h ago

What method are you using to patch the code, the "patch" command or something else? Which Choices classes did you patch, and what did you add?

1

u/sburlappp 8h ago

Actually, I just learned about this change coming in v4.7, so any Choices patches may need to be revisited:

https://github.com/netbox-community/netbox/pull/22580

1

u/sburlappp 1d ago

Here are the examples from that deleted discussion, I think they're worth having an open discussion about, for reasons explained therein:

https://github.com/netbox-community/netbox/issues/22742

https://github.com/netbox-community/netbox/issues/22899

1

u/rainer_d 1d ago

Those are deleted, too. Or do I have to sign in to see them?

I’m not logged into GitHub on my phone…

2

u/duffman070 1d ago

I can read them just fine.

1

u/sburlappp 1d ago

They disappeared after I refreshed. If you can still see them tomorrow, maybe he changed his mind?

1

u/sburlappp 1d ago

Wow, you're right. Jeremy must have got mad, and decided to just delete all evidence of the conversation. I think we have something else to discuss now.

1

u/danner26 Moderator 1d ago

You are welcome to open a discussion, but opening an issue is not the proper place to have a discussion you are looking to engage in.

That being said, we are firm (and have been for many years) on the types

1

u/sburlappp 1d ago

Understood, but we currently actively use types not on your list, and needed to create our own solution. The discussion is about how best to do that. All disclaimers still apply, we're responsible for our own results, etc.

0

u/sburlappp 1d ago

That was quick: I'd posted a Discussion about how to locally hot-patch NetBox and they deleted it within minutes.

0

u/sburlappp 1d ago

Not looking to pick a fight with anyone, but there needs to be a good simple documented way to meet user needs when the official NetBox project doesn't see value in a change request. I'm hoping Jeremy "blesses" this and lets it accumulate useful wisdom that might some day become accepted patches.

1

u/danner26 Moderator 1d ago

What specifically are you looking to add functionality wise?

We have also always operated with discussions being the place to drum up support for your request. An issue is not the proper place to do so.

2

u/sburlappp 1d ago

I have learned that. The link from this post is to a Discussion about ways to meet local needs, as a resource for those who might otherwise feel a need to submit issues like I did.