You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When there are existing jobs that were not created by jobs-as-code but follow the identifier convention, they need to be imported so that jobs-as-code does not mark them for deletion. Additionally, importing the job with linked_id does not help unmark it.
To Reproduce
Steps to reproduce the behavior:
Create a job named something like QAT - [[some_model_flow]]
From jobs-as-code, create a new test job without importing
Run a plan and see that the some_model_flow job will be deleted
Get an import of the existing job with linked_id - you will see that it has the linked_id, but if you run the plan again you will see that some_model_flow is still marked for deletion.
In order to get jobs-as-code to recognize the existing job with the import, you need to change the job's key (import_#:) to the identifier like some_model_flow:.
If you run plan again, you will see now that the job will not be deleted.
Expected behavior
I expect if there is a linked id, that no matter the job's named configuration key it will link with the existing job. This doesn't happen unless the key is the same as the identifier.
Desktop (please complete the following information):
OS [e.g. iOS]: Sequoia 15.2
dbt Core Version [e.g. 1.3.1]: dbt CLI
dbt-jobs-as-code Version [e.g. 1.0.0]: 1.0.2
The text was updated successfully, but these errors were encountered:
christineberger
changed the title
[Bug] linking ids to jobs does not mark existing jobs to not be deleted
[Bug] Linking ids to jobs does not mark existing jobs to not be deleted
Jan 24, 2025
Describe the bug
When there are existing jobs that were not created by jobs-as-code but follow the identifier convention, they need to be imported so that jobs-as-code does not mark them for deletion. Additionally, importing the job with linked_id does not help unmark it.
To Reproduce
Steps to reproduce the behavior:
QAT - [[some_model_flow]]
plan
and see that the some_model_flow job will be deletedimport_#:
) to the identifier likesome_model_flow:
.Expected behavior
I expect if there is a linked id, that no matter the job's named configuration key it will link with the existing job. This doesn't happen unless the key is the same as the identifier.
Desktop (please complete the following information):
dbt-jobs-as-code
Version [e.g. 1.0.0]: 1.0.2The text was updated successfully, but these errors were encountered: