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

fix edge glob bug #1857

Merged
merged 3 commits into from
Mar 7, 2024
Merged

Conversation

alixander
Copy link
Collaborator

@alixander alixander commented Mar 6, 2024

also fixes some d2oracle functions when globs are present

also upgrades go version 1.20 -> 1.22

@alixander alixander marked this pull request as draft March 6, 2024 20:23
@alixander alixander marked this pull request as ready for review March 7, 2024 00:47
@@ -1094,7 +1094,7 @@ func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, gctx *globContext, ea *[
}
gctx.appliedEdges[ks] = struct{}{}
}
*ea = append(*ea, ea2...)
*ea = append(*ea, e)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this bug was causing globs to be applied multiple times

@@ -413,6 +413,7 @@ func (c *compiler) ampersandFilterMap(dst *Map, ast, scopeAST *d2ast.Map) bool {
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(dst)))
}
delete(gctx.appliedFields, ks)
delete(gctx.appliedEdges, ks)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this bug was causing filters on edges to not try to be applied again. which only surfaced because the other bug was fixed that errantly applied multiple times

@alixander alixander merged commit 808f5c3 into terrastruct:master Mar 7, 2024
3 checks passed
@alixander alixander deleted the delete-connection-glob branch March 7, 2024 07:08
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.

1 participant