Forum Discussion
Git Branching with active Schedules
- 11 months ago
Hi Anonymous,
Haha, yes it does feel like someone has gone git happy 😄 I wish they'd focus on Lakehouse git version integration instead.
Yes, we've gone for a similar solution. In the develop branch, which is the branch we all pull from, we have the committed versions of the schedules turned off, but then turn them back on in the workspace. So unfortuantly we have to live with the uncommited icon noficiations in the workspace, which is annoying, but we can live with.
Only our Dev workspace is backed by git, the develop branch. The code is pushed into other workspaces by our DevOps deployment pipelines. Or you can use the Fabric deployment pipelines too. So turning on/off schedules in Dev workspace does not affect the test and production workspaces.
scheduling in dev or test purely comes down to the SDLC process and naming conventions, I am having a similar issue though
I have scheduled a pipeline in my production environment, but because the schedule itself is tracked by git, it wants to enable that schedule on my dev workspace which I obviously don't want to do
I can disable it in the dev workspace but this is entirely manual (without adding extra steps to our devops pipelines to do this for us when dev branch is updated via PR) AND if I do this, my dev workspace now reports a diff between the workspace and git which is very annoying because future features added to dev may cause issues when calling the gitSync API endpoint in the DevOps pipeline if the workspace believes there to be a conflict
It fundamentally doesn't make sense to track schedules in git this way when you are not going to want every item to be scheduled in every feature, dev or test/UAT workspace, I can't think of any git based workflow that tracking if the schedule is enabled would work that doesn't cause the above issues, even the simplest trunk based workflow with feature PRs directly into main/prod would still cause either:
schedules for everything enabled in every feature workspace OR
diffs reported in main/production workspace by adding schedules outside of git
just feels like someone has gone git-happy by adding this without actually considering the impact on different workflows
Also, I have added *.schedules and **.schedules to my git ignore and this doesn't prevent the workspace from reporting a diff
Hi Anonymous,
Thank you for sharing your experience. Yes tracking schedules in git can cause unexpected diffs in Dev/feature workspaces. The best way to avoid this is to keep schedules disabled in Dev and enable them only in Test/Prod via deployment pipelines or automation. This keeps git clean and makes sure schedules only run where they should run.
Thanks and regards,
Anjan Kumar Chippa
- Anonymous11 months agoNot applicable
How can disabling the schedule in dev/feature workspaces avoid a diff when this is exactly what causes the diff in the first place?
Or are you suggesting that you keep all schedules disabled in the source code, and enable them in Test/Prod as part of the deployment process? This would also cause a diff but now its on Test/Prod instead of Dev/feature because git thinks the schedule is disabled but the workspace has it enabled?
- v-achippa11 months ago
Community Support
Yes enabling or disabling schedules directly in the workspace can cause diffs. The best way is that keep all schedules disabled in git across all branches. Then after deploying to Test/Prod via a deployment pipeline, enable the schedules at runtime in the workspace without committing that change back to git.
This way Dev/feature branches remain clean and only the Test/Prod runs the schedules, avoiding unwanted diffs.Thanks and regards,
Anjan Kumar Chippa