https://dagster.io/ logo
#ask-community
Title
# ask-community
h

Harrison Conlin

04/19/2023, 1:16 AM
on code versions for an asset. how are they determined? my asset calls an external program with a file containing a bunch of rules. when I change the params I call the program with, it gets a new code version but ideally I want my code version to change when I update my rules file. Right now I store the version number of that rules file as a variable `RULES_VERSION = '123abc'`I'm aware I can specify the code version param in the
@asset
however I don't trust myself to manually maintain this if I change the python code (the rules file doesnt change often, it has a checklist associated with updating it)
o

owen

04/19/2023, 5:41 PM
hi @Harrison Conlin! one option would be to model that rules file as an observable source asset. It's maybe a bit odd, as the rules file is more of a description of how an asset should work rather than an asset itself, but I think it still works in the model. In this world, the rules file becomes an observable part of the system -- you can observe it to see if it has changed, and if so, your downstream asset that uses these rules knows that it needs to update to incorporate those rule changes.
h

Harrison Conlin

04/19/2023, 11:46 PM
good enough for me! thanks
4 Views