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
We have introduced a method to mark variables as deprecated and removal in our code like:
// Reva defines all available REVA client configuration.typeRevastruct {
Addressstring`yaml:"address" env:"OCIS_REVA_GATEWAY;REVA_GATEWAY" desc:"The CS3 gateway endpoint." deprecationVersion:"3.0" removalVersion:"4.0.0" deprecationInfo:"REVA_GATEWAY changing name for consistency" deprecationReplacement:"OCIS_REVA_GATEWAY"`TLSGRPCClientTLS`yaml:"tls"`
}
this came in handy when removing the variables for 4.0.0 (see #7099). I just realized that removing all the variables from the seperate config.go files is an effort that could be automated.
I suggest we write a small tool that will patch this code automatically
Workflow:
$> ./deprecation_helper <version>
This will remove all the variables and deprecation annotations from the code in the config.go files and will just leave us with the actual occurrences in the code, thus reducing the workload that is actually needed to remove those variables (pressing delete hundreds of time is just a waste of precious time). It would also be helpful to add an additional helper function to that tool that would point to locations where those variables are used directly through os.GetEnv() or occur in static strings etc.
Addiotional (needed) functionality:
Whenever a variable is removed, it needs to be written to a (text-)database
Upon startup ocis checks for the contents of the database, and checks if the variables are set
if one of the variables is still set, ocis will refuse to start up
deprecated variables should also be added to this database and create a log output if set upon startup
if there are deprecated or removed variables still set, admin (ui admin, not sysadmin) should see a toast in the ui hinting the person to contact the sysadmin to check the config
Note: These database(s) need to bee added to the git-repo and need to be bundled upon build!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.
We have introduced a method to mark variables as deprecated and removal in our code like:
this came in handy when removing the variables for
4.0.0
(see #7099). I just realized that removing all the variables from the seperateconfig.go
files is an effort that could be automated.I suggest we write a small tool that will patch this code automatically
Workflow:
This will remove all the variables and deprecation annotations from the code in the
config.go
files and will just leave us with the actual occurrences in the code, thus reducing the workload that is actually needed to remove those variables (pressing delete hundreds of time is just a waste of precious time). It would also be helpful to add an additional helper function to that tool that would point to locations where those variables are used directly throughos.GetEnv()
or occur in static strings etc.Addiotional (needed) functionality:
/cc @kobergj @mmattel
The text was updated successfully, but these errors were encountered: