Skip to content

Commit

Permalink
Fix AirflowVersionTwo variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Vandover committed Dec 7, 2020
1 parent 403a88f commit 9340512
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func getDeployment(deploymentId string, client *houston.Client) (*houston.Deploy
}

func meetsAirflowUpgradeReqs(airflowVersion string, desiredAirflowVersion string) error {
upgradeVersion := strconv.FormatUint(settings.NewAirflowVersion, 10)
upgradeVersion := strconv.FormatUint(settings.AirflowVersionTwo, 10)
minRequiredVersion := "1.10.14"
airflowUpgradeVersion, err := semver.NewVersion(upgradeVersion)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
settings Config

// Version 2.0.0
NewAirflowVersion uint64 = 2
AirflowVersionTwo uint64 = 2
)

// ConfigSettings is the main builder of the settings package
Expand Down Expand Up @@ -80,7 +80,7 @@ func AddVariables(id string, version uint64) {
if objectValidator(0, variable.VariableValue) {

baseCmd := "airflow variables "
if version >= NewAirflowVersion {
if version >= AirflowVersionTwo {
baseCmd += "set %s " // Airflow 2.0.0 command
} else {
baseCmd += "-s %s " // Airflow 1.0.0 command
Expand Down

0 comments on commit 9340512

Please sign in to comment.