Skip to content

Conversation

@pietern
Copy link
Contributor

@pietern pietern commented Nov 27, 2024

Changes

The built-in template contains a reference to ${bundle.environment}.

This property has been deprecated in favor of ${bundle.target} a long time ago (#670), so we should no longer emit it. The environment field will continue to be usable until we cut a new major version in some far away future.

Tests

  • Unit tests
  • The test TestInterpolationWithTarget still covers correct interpolation of ${bundle.environment}

@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 1935
  • Commit SHA: 96feb14d467e8f4a9f87f8c78e84d9c1d3b465d8

Checks will be approved automatically on success.

@eng-dev-ecosystem-bot
Copy link
Collaborator

Test Details: go/deco-tests/12048444439

@pietern
Copy link
Contributor Author

pietern commented Nov 27, 2024

Existing test:

func TestInterpolationWithTarget(t *testing.T) {
b := loadTarget(t, "./interpolation_target", "development")
diags := bundle.Apply(context.Background(), b, mutator.ResolveVariableReferences(
"bundle",
"workspace",
))
require.NoError(t, diags.Error())
assert.Equal(t, "foo bar", b.Config.Bundle.Name)
assert.Equal(t, "foo bar | bar | development | development", b.Config.Resources.Jobs["my_job"].Name)
}

Configuration:

resources:
jobs:
my_job:
name: "${bundle.name} | ${workspace.profile} | ${bundle.environment} | ${bundle.target}"

@pietern pietern added this pull request to the merge queue Nov 27, 2024
Merged via the queue into main with commit fae1b67 Nov 27, 2024
10 checks passed
@pietern pietern deleted the template-target branch November 27, 2024 11:55
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.

4 participants