https://flyte.org logo
#announcements
Title
# announcements
m

Matheus Moreno

07/27/2022, 5:45 PM
Hi, everyone. Quick question: is the
--force
flag on
flytectl register files
working? When I use it, the CLI logs "AlreadyExists", which makes it look like it didn't actually rewrite anything. Is this normal? If so, shouldn't the logs print another message, such as "Overwritten" or something? I'm using FlyteCTL 0.5.6, by the way.
y

Yee

07/27/2022, 7:50 PM
not quite sure i understand. i didn’t think there was a force flag
--files.force
?
i don’t think that’s what that means. maybe @Prafulla Mahindrakar can clarify when he gets back on tonight. Flyte admin will never overwrite something like that, at least it’s certainly not supposed to
immutable.
m

Matheus Moreno

07/27/2022, 7:51 PM
No, apparently there's a force flag specifically for "register flles"
Copy code
--force                         Force use of version number on entities registered with flyte.
y

Yee

07/27/2022, 7:52 PM
what that flag might be for is that it will ignore the version that’s in the files
and use what you pass it instead.
m

Matheus Moreno

07/27/2022, 7:52 PM
ohhh ok, that makes sense
y

Yee

07/27/2022, 7:52 PM
which has a tasktemplate which has an id which has a version
yeah
i think
p

Prafulla Mahindrakar

07/28/2022, 5:07 AM
force flag will just force to use the version passed in the command line params and not use what there in the serialized version of the file, but that doesn’t prevent admin from throwing an already exist error if the version being passed already exists. As yee mentioned flyte objects are immutable. So if you want to avoid getting ALreadyexists error then you would need to pass in a new version
3 Views