Skip to content

Add short_name helper function to bundle init templates - #1167

Merged
shreyas-goenka merged 4 commits into
mainfrom
add-short-name-helper
Feb 1, 2024
Merged

Add short_name helper function to bundle init templates#1167
shreyas-goenka merged 4 commits into
mainfrom
add-short-name-helper

Conversation

@shreyas-goenka

@shreyas-goenkashreyas-goenka commented Jan 31, 2024

Copy link
Copy Markdown
Contributor

Changes

Adds the short_name helper function. short_name is useful when templates do not want to print the full userName (typically email or service principal application-id) of the current user.

Tests

Integration test. Also adds integration tests for other helper functions that interact with the Databricks API.

@codecov-commenter

codecov-commenter commented Jan 31, 2024

Copy link
Copy Markdown

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (5fda017) 51.51% compared to head (f1998c5) 51.25%.
Report is 3 commits behind head on main.

FilesPatch %Lines
libs/template/helpers.go0.00%8 Missing ⚠️
bundle/config/mutator/populate_current_user.go0.00%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #1167 +/- ##
==========================================
- Coverage 51.51% 51.25% -0.26% 
==========================================
Files 292 293 +1 Lines 16322 16341 +19 ==========================================
- Hits 8408 8376 -32 - Misses 7308 7355 +47 - Partials 606 610 +4 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

return ctx, f, tmpdir
}

// TODO: add tests for the progress event output logs: https://github.com/databricks/cli/issues/447

@shreyas-goenkashreyas-goenkaJan 31, 2024

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue referenced here has been closed.

@shreyas-goenka
shreyas-goenka marked this pull request as ready for review January 31, 2024 17:45
@shreyas-goenka
shreyas-goenka added this pull request to the merge queueFeb 1, 2024
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Feb 1, 2024
@shreyas-goenka
shreyas-goenka added this pull request to the merge queueFeb 1, 2024
Merged via the queue into main with commit cb3ad73Feb 1, 2024
@shreyas-goenka
shreyas-goenka deleted the add-short-name-helper branch February 1, 2024 16:52
@pieternpietern mentioned this pull request Feb 5, 2024
18 tasks
andrewnester added a commit that referenced this pull request Feb 7, 2024
Bundles:
* Allow specifying executable in artifact section and skip bash from WSL ([#1169](#1169)).
* Added warning when trying to deploy bundle with `--fail-if-running` and running resources ([#1163](#1163)).
* Group bundle run flags by job and pipeline types ([#1174](#1174)).
* Make sure grouped flags are added to the command flag set ([#1180](#1180)).
* Add short_name helper function to bundle init templates ([#1167](#1167)).
Internal:
* Fix dynamic representation of zero values in maps and slices ([#1154](#1154)).
* Refactor library to artifact matching to not use pointers ([#1172](#1172)).
* Harden `dyn.Value` equality check ([#1173](#1173)).
* Ensure every variable reference is passed to lookup function ([#1176](#1176)).
* Empty struct should yield empty map in `convert.FromTyped` ([#1177](#1177)).
* Zero destination struct in `convert.ToTyped` ([#1178](#1178)).
* Fix integration test with invalid configuration ([#1182](#1182)).
* Use `acc.WorkspaceTest` helper from bundle integration tests ([#1181](#1181)).
@andrewnesterandrewnester mentioned this pull request Feb 7, 2024
github-merge-queueBot pushed a commit that referenced this pull request Feb 7, 2024
Bundles:
* Allow specifying executable in artifact section and skip bash from WSL
([#1169](#1169)).
* Added warning when trying to deploy bundle with `--fail-if-running`
and running resources
([#1163](#1163)).
* Group bundle run flags by job and pipeline types
([#1174](#1174)).
* Make sure grouped flags are added to the command flag set
([#1180](#1180)).
* Add short_name helper function to bundle init templates
([#1167](#1167)).
Internal:
* Fix dynamic representation of zero values in maps and slices
([#1154](#1154)).
* Refactor library to artifact matching to not use pointers
([#1172](#1172)).
* Harden `dyn.Value` equality check
([#1173](#1173)).
* Ensure every variable reference is passed to lookup function
([#1176](#1176)).
* Empty struct should yield empty map in `convert.FromTyped`
([#1177](#1177)).
* Zero destination struct in `convert.ToTyped`
([#1178](#1178)).
* Fix integration test with invalid configuration
([#1182](#1182)).
* Use `acc.WorkspaceTest` helper from bundle integration tests
([#1181](#1181)).
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
Adds the short_name helper function. short_name is useful when templates
do not want to print the full userName (typically email or service
principal application-id) of the current user.
## Tests
Integration test. Also adds integration tests for other helper functions
that interact with the Databricks API.
denik pushed a commit that referenced this pull request May 20, 2026
Bundles:
* Allow specifying executable in artifact section and skip bash from WSL
([#1169](#1169)).
* Added warning when trying to deploy bundle with `--fail-if-running`
and running resources
([#1163](#1163)).
* Group bundle run flags by job and pipeline types
([#1174](#1174)).
* Make sure grouped flags are added to the command flag set
([#1180](#1180)).
* Add short_name helper function to bundle init templates
([#1167](#1167)).
Internal:
* Fix dynamic representation of zero values in maps and slices
([#1154](#1154)).
* Refactor library to artifact matching to not use pointers
([#1172](#1172)).
* Harden `dyn.Value` equality check
([#1173](#1173)).
* Ensure every variable reference is passed to lookup function
([#1176](#1176)).
* Empty struct should yield empty map in `convert.FromTyped`
([#1177](#1177)).
* Zero destination struct in `convert.ToTyped`
([#1178](#1178)).
* Fix integration test with invalid configuration
([#1182](#1182)).
* Use `acc.WorkspaceTest` helper from bundle integration tests
([#1181](#1181)).
Sign up for freeto 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.

3 participants

@shreyas-goenka@codecov-commenter@andrewnester