Skip to content

Refactor library to artifact matching to not use pointers - #1172

Merged
pietern merged 2 commits into
mainfrom
artifacts-no-pointers
Feb 5, 2024
Merged

Refactor library to artifact matching to not use pointers#1172
pietern merged 2 commits into
mainfrom
artifacts-no-pointers

Conversation

@pietern

Copy link
Copy Markdown
Contributor

Changes

The approach to do this was:

  1. Iterate over all libraries in all job tasks
  2. Find references to local libraries
  3. Store pointer to compute.Library in the matching artifact file to signal it should be uploaded

This breaks down when introducing #1098 because we can no longer track unexported state across mutators. The approach in this PR performs the path matching twice; once in the matching mutator where we check if each referenced file has an artifacts section, and once during artifact upload to rewrite the library path from a local file reference to an absolute Databricks path.

Tests

Integration tests pass.

@pietern
pietern added this pull request to the merge queueFeb 5, 2024
Merged via the queue into main with commit 33c446dFeb 5, 2024
@pietern
pietern deleted the artifacts-no-pointers branch February 5, 2024 15:35
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
The approach to do this was:
1. Iterate over all libraries in all job tasks
2. Find references to local libraries
3. Store pointer to `compute.Library` in the matching artifact file to
signal it should be uploaded
This breaks down when introducing #1098 because we can no longer track
unexported state across mutators. The approach in this PR performs the
path matching twice; once in the matching mutator where we check if each
referenced file has an artifacts section, and once during artifact
upload to rewrite the library path from a local file reference to an
absolute Databricks path.
## Tests
Integration tests pass.
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.

2 participants

@pietern@andrewnester