remove deprecated resource fields from Allocation struct - #28486
Conversation
cc8636b to
d2ee6c7
Compare
d2ee6c7 to
4cbfdaf
Compare
4cbfdaf to
0f4c4d7
Compare
chrisroberts
left a comment
There was a problem hiding this comment.
I'm familiarizing myself with where these were still in use. All these adjustments look great to me so far. I did find that AllocatedResources.OldTaskResources() still exists but should probably be removed with this changeset.
Outside of that, I think the only other thing of note I've seen is the ent specific usage of TaskResources.
As part of the "client v2" effort for Nomad 0.9 we changed how allocated resources were tracked, but we ended up leaving the existing struct fields around. All consumers of these fields have been updated to handle the newer fields for a very long time. Remove the fields from the `nomad/structs` package version of the object, and formally deprecate them in the `api` package. This also requires removing the upgrade path in the client state database, but the state database is automatically updated on agent upgrades and Nomad clients older than 1.6 have been non-functional since 1.9. So this only impacts users trying to restore from pre-0.9 backups of their state stores, which seems safe.
0f4c4d7 to
ddef346
Compare
done!
gah! The quotas feature uses these pretty heavily in particular. I'll open an ENT PR that moves those uses to |
|
Working branch for the ENT code in https://github.com/hashicorp/nomad-enterprise/pull/4467. I'll pick that up next week. |
As part of the "client v2" effort for Nomad 0.9 we changed how allocated resources were tracked, but we ended up leaving the existing struct fields around. All consumers of these fields have been updated to handle the newer fields for a very long time.
Remove the fields from the
nomad/structspackage version of the object, and formally deprecate them in theapipackage. This also requires removing the upgrade path in the client state database, but the state database is automatically updated on agent upgrades and Nomad clients older than 1.6 have been non-functional since 1.9. So this only impacts users trying to restore from pre-0.9 backups of their state stores, which seems safe.Ref: #28447 (comment)
Contributor Checklist
changelog entry using the
make clcommand.ensure regressions will be caught.
Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.