Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Fixes & improvements to Expand behaviour #2789

Merged
merged 6 commits into from
Jan 31, 2023
Merged

Fixes & improvements to Expand behaviour #2789

merged 6 commits into from
Jan 31, 2023

Conversation

Porges
Copy link
Member

@Porges Porges commented Jan 31, 2023

  • Recursively expand Paths before canonicalization; fixes Expand fails to work recursively with some combinations #2387
  • Detect and error on infinitely-expanding variables (due to self-reference or mutual recursion); this fixes an existing problem with list expansion as well
  • Detect and report references to unknown replacements (e.g. typoes)
  • Detect and report references to known replacements which are not available

There is a behavioural change here which is that values which were previously unknown such as {x} were unexpanded; from now on these will be errors. It's possible that something somewhere is relying on this.

@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2023

Codecov Report

Merging #2789 (081aeb3) into main (f402304) will increase coverage by 0.37%.
The diff coverage is 94.88%.

@@            Coverage Diff             @@
##             main    #2789      +/-   ##
==========================================
+ Coverage   29.14%   29.52%   +0.37%     
==========================================
  Files         322      322              
  Lines       38607    38782     +175     
==========================================
+ Hits        11252    11449     +197     
+ Misses      27355    27333      -22     
Impacted Files Coverage Δ
...rc/agent/onefuzz-task/src/tasks/coverage/dotnet.rs 0.00% <0.00%> (ø)
...c/agent/onefuzz-task/src/tasks/coverage/generic.rs 0.00% <0.00%> (ø)
src/agent/onefuzz/src/expand.rs 82.28% <96.40%> (+13.80%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Porges Porges changed the title Fixes to Expand behaviour Fixes & improvements to Expand behaviour Jan 31, 2023
@Porges Porges enabled auto-merge (squash) January 31, 2023 23:42
@Porges Porges merged commit be43032 into main Jan 31, 2023
@Porges Porges deleted the expand-fixes branch February 1, 2023 01:51
@AdamL-Microsoft AdamL-Microsoft mentioned this pull request Feb 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand fails to work recursively with some combinations
3 participants