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

Add branch parameter to generate intended config view #871

Merged
merged 7 commits into from
Feb 3, 2025

Conversation

gsnider2195
Copy link
Contributor

@gsnider2195 gsnider2195 commented Jan 30, 2025

Closes: #828

This cannot be released until Nautobot v2.4.2 is released with nautobot/nautobot#6746

What's Changed

This PR implements the FR in #828 to add the branch parameter to the generate intended config UI. It also implements one of the UI enhancements requested in #862 Render the graphql data tab when the graphql query select2 changes.

Screen.Recording.2025-01-29.114118.mp4

To Do

  • Explanation of Change(s)
  • Attached Screenshots, Payload Example
  • Unit, Integration Tests
  • Documentation Updates (when adding/changing features)
  • Outline Remaining Work, Constraints from Design

…m:nautobot/nautobot-app-golden-config into u/gas-828-generate-intended-config-branch
if not filesystem_path.is_file():
msg = f"Jinja template {filesystem_path} not found in git repository {git_repository}"
msg = f"Jinja template {rendered_path} not found in git repository {git_repository}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this change, should be easier for the user to understand.

Copy link
Contributor

@smk4664 smk4664 left a comment

Choose a reason for hiding this comment

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

This looks good to me, I am unsure why there was so much introduced javascript code in the html file, but the code looks necessary.

Copy link
Contributor

@jeffkala jeffkala left a comment

Choose a reason for hiding this comment

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

Approving, I couldn't quite tell from the code but do the checkout of the branch happen in the GIT_ROOT? Or some temp location? I want to make sure there is no race condition if the intended job happens to be ran during the execution of the helper intended functionality.

@gsnider2195
Copy link
Contributor Author

Approving, I couldn't quite tell from the code but do the checkout of the branch happen in the GIT_ROOT? Or some temp location? I want to make sure there is no race condition if the intended job happens to be ran during the execution of the helper intended functionality.

The jinja templates repo is checked out to a temp location. It works off of the core feature that they're releasing in v2.4.2.

@jeffkala
Copy link
Contributor

jeffkala commented Feb 3, 2025

Approving, I couldn't quite tell from the code but do the checkout of the branch happen in the GIT_ROOT? Or some temp location? I want to make sure there is no race condition if the intended job happens to be ran during the execution of the helper intended functionality.

The jinja templates repo is checked out to a temp location. It works off of the core feature that they're releasing in v2.4.2.

Perfect, I assumed so. I'm good with this PR.

@gsnider2195 gsnider2195 merged commit e04e6c1 into develop Feb 3, 2025
15 checks passed
@gsnider2195 gsnider2195 deleted the u/gas-828-generate-intended-config-branch branch February 3, 2025 17:45
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.

Add branch to generate-intended-config API
4 participants