fix: sandbox tag are unique (and monotone).#97
Conversation
|
/kind bug |
|
Generally LGTM with this approach but still unclear why this will lead to outdated code. Is that a bug with hash[:7] which leads to tag conflicts? |
| return age | ||
|
|
||
|
|
||
| def now_us() -> str: |
There was a problem hiding this comment.
I would suggest to add a git hash as well, you never know when we need the hash, it will look like "1772722212345678-a1b2c3d", use the first 7 characters of the hash. WDYT?
There was a problem hiding this comment.
The dashboard already contains all the source code. I think it includes the .git directory. Either way, if we want the git commit, then we should make it part of the metadata visible from the dashboard.
If we add it how does one know it's the git commit and not the random tag appended to (most) runs? Do we need to add -dirty? Should we hash the non-tracked files ourselves? What about git ignored files?
Personally, I like that there's only one variation. If it's buggy it affects everyone equally and therefore gets spotted more reliably.
There was a problem hiding this comment.
I think I don't see the benefit; but I also don't see a real negative of adding it. So if it's a big plus for you, we can add it.
There was a problem hiding this comment.
I forgot the fact that the code is not related to the git anymore, since you won't commit the change, forget the suggestion then.
I think the steps are:
|
|
/lgtm |
Some software stacks using
dockerwill look at the version and assume that if the version is the same it must point to the same image. This is a fallacy because tags aren't immutable. Unfortunately, it's the default for gcloud/k8s. Therefore, the current choice leads to outdated code running in the sandbox.Since the sandbox version tag has no real meaning and users are unlikely to push at the exact same time, we can use a simple timestamp.