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

Git Overrides don't work with multiple provides in the same datasource #277

Open
jeffkala opened this issue Dec 3, 2024 · 3 comments · May be fixed by #288
Open

Git Overrides don't work with multiple provides in the same datasource #277

jeffkala opened this issue Dec 3, 2024 · 3 comments · May be fixed by #288
Assignees
Labels
type: bug Something isn't working as expected

Comments

@jeffkala
Copy link
Contributor

jeffkala commented Dec 3, 2024

Environment

  • Python version: 3.9
  • Nautobot version: 2.3
  • nautobot-device-onboarding version: latest
  • ntc-templates version: 7.0.0

Expected Behavior

To be able to have a single git repo that has multiple proivdes methods including the onboarding command mapper overloads

Observed Behavior

The overload isn't actually taking affect unless a dedicated git repo in NB is created for the onboarding mappers overload and ONLY that single provides is used.

Steps to Reproduce

  1. Create git repo with multiple provides (config-context, onboarding mapping overrides)
  2. sync repo
  3. notice the overloaded yaml files arent actually taking into affect.
@gsnider2195 gsnider2195 added the type: bug Something isn't working as expected label Dec 6, 2024
@jdrew82
Copy link

jdrew82 commented Dec 9, 2024

I've tracked this down to being related to the check of GitRepository objects here. I think this should most likely be rewritten to be an icontains instead of looking for ONLY the command mapper ContentType. It might also be worth refactoring to allow for more than one GitRepo with that ContentType to be loaded.

@jeffkala
Copy link
Contributor Author

Multiple repos with that content-type would require quite a bit of effort, most likely introducing some kind of "weighting", otherwise if two repos provide the same template/command mapper how do you pick the winner?

@jeffkala jeffkala self-assigned this Dec 17, 2024
@jdrew82
Copy link

jdrew82 commented Dec 17, 2024

That's a fair point I hadn't thought of. I was thinking more of differing departments working on different command mappers. If they used the same Platform that would certainly be an issue.

@jeffkala jeffkala linked a pull request Dec 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants