r/AskProgramming • u/jeeraas • Jul 18 '26
Architecture Our staging environment is basically unusable because of management decisions. How would you handle this?
Hello, I'm a software developer working for a hospital. I'd like to share a bit about my current situation, vent some frustrations, and hopefully get some advice.
As anyone would expect, we have three different environments: DEV, STG, and PRD; the predicament we currently face, however, lies in how the staging environment is managed. Its natural purpose would be to prepare deployments for production, but that's not what's happening. Due to several top-down decisions—including the fact that our clients actually use the STG environment as if it were production—we do not have direct access to it. As a result, we cannot modify the staging database schema ourselves and must go through a ticket process that takes up to 24 hours whenever we need to run a script of our own. This, of course, has significantly delayed our deployments. Since we have a lot—and I mean it—of stored procedures to alter with each new feature we add, some things are bound to go wrong on the first try. Under normal circumstances, fixing them would be as simple as adding missing objects or removing incorrect ones. Instead, every issue our QA team finds can cost us another 24 hours while we wait for the corresponding ticket to be processed. Our deployment scripts are typically huge (10k+ lines of SQL), and we have to manually cherry-pick which changes belong in each release. We have already requested access to the staging environment, and we were outright ignored; we also proposed creating a separate environment where we could properly prepare and validate our deployments, and we were rejected. Upper management has shown little willingness to address our concerns, yet they're starting to put increasing pressure on us to deliver.
We came up with two possible solutions:
- Migrate our entire database from SQL Server to Oracle; this would be a long-term solution, and would cost us hundreds of development hours. As I've already mentioned, our project is huge. Don't ask me why, but if we were using Oracle instead of SQL Server, we'd have write access to the staging database. I've given up trying to understand upper management's reasoning. It's just your typical executive bullshit;
- Get rid of the stored procedures and rewrite everything in code; as it so happens, it's much easier for us to deploy code changes to the staging enviroment, and it can be done in an hour or so. You might then pose a question of your own: "Why did you put everything in stored procedures in the first place?" The answer to that—and to the choice of SQL Server over Oracle—is the same: the people in charge at the time decided that's how it should be. None of those people are even on the project anymore.
I've never been in such an unorthodox position, and I've run out of ideas. I'd love to hear your thoughts on my current ordeal.
Thanks in advance.