[SERVER-82015] Fix mongo-container login script issue where old expansion variable name is used as a bash variable name Created: 09/Oct/23  Updated: 21/Oct/23  Resolved: 09/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Bug Priority: Minor - P4
Reporter: Zack Winter Assignee: Zack Winter
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

In BF-30343:

  • Originally, the ${registry_username} was getting expanded to the value defined in the previous function since evergreen expansion is executed before bash interpretation
  • After the evergreen update in EVG-20276, the expansion the previous function defines registry_username is getting reset to an empty string
  • Even though bash would've properly interpreted ${registry_username}, since evergreen is expanding the variable before bash gets a chance to see, it's left with an empty string

Evergreen only expands variables wrapped in curly braces, so switching from ${registry_username} to $registry_username prevents evergreen from expanding registry_username and gives bash the chance to actually interpret it as a bash variable.


Generated at Thu Feb 08 06:47:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.