func()

in astro/execution.go [81:109]


func (e *execution) ID() string {
	// For boundExecutions, the ID should be:
	// {modulename}-{variableValue1}-{variableValue2}-{and so on...}
	// Where variableValues are the values of the runtime variables.

	values := []string{}

	// Since runtime variables may have values that don't directly
	// pertain to this module/execution, we need to extract only the
	// variable names that are relevant to this module.
	keys := []string{}
	for _, v := range e.ModuleConfig().Variables {
		keys = append(keys, v.Name)
	}

	sort.Strings(keys)

	for _, key := range keys {
		values = append(values, e.variables[key])
	}

	// construct the ID
	id := e.ModuleConfig().Name
	if len(values) > 0 {
		id = fmt.Sprintf("%s-%s", id, strings.Join(values, "-"))
	}

	return id
}