Open
Conversation
Rebased version of PR #32 from ryanmerolle. Adds j2lint dependency and standardizes Jinja2 template formatting across all templates: - Consistent whitespace control with hyphens - Use built-in Jinja2 filters instead of .split("/")[0] - Standardized indentation and block formatting Original author: Ryan Merolle <ryan.merolle@gmail.com>
Contributor
Author
|
FYI this is the replacement PR @ryanmerolle |
PR #34 added manufacturer to DcimDeviceType human_friendly_id but did not update the object YAML files that reference device types. All device_type relationship fields now use [Manufacturer, Name] format to match the two-part HFID.
Deploying infrahub-demo with
|
| Latest commit: |
b51a9c0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://85bd7e62.infrahub-demo.pages.dev |
| Branch Preview URL: | https://j2lint-rebased.infrahub-demo.pages.dev |
The j2lint PR replaced .split('/')[0] with ipaddress_interface(attr='ip')
but this filter does not exist in Infrahub's Jinja2 environment, causing
TransformError during artifact generation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
j2lintas a dev dependency for Jinja2 template linting.split("/")[0]Rebased version of #32 by @ryanmerolle — the original branch was stale (pinned to infrahub-testcontainers 1.6.1 vs 1.7.7 on main), which caused the integration test to fail with
CoreGraphQLQueryGroupID mismatches during proposed change merge.Test plan
test_13_merge_proposed_changepasses (was failing on add j2lint & cleanup jinja templates #32)j2lintruns cleanly against all templates