-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Spec for Cloning Branch Configurations #254
Conversation
Initial proposal for cloning branch configurations. Updates for design and API experience to come.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the clear writing used, it's easy to follow.
My approach would perhaps be slightly different.
Build configurations
I'd extract it from branches altogether and make it its own feature.
- I'd have a new tab in the main menu called "Build configurations". Perhaps as a child route of Build.
- This page shows a list of configurations that have been created and labelled by the user (first visit would show a default).
- These configurations will hold the same values as what's currently a branch configuration (env vars, auto increment build nr, signing, etc).
The nice thing about this approach, is that you can update 1 config which then applies to all branches.
But the real reason this is cooler is that you can set a default build configuration, so you don't have to configure anything after the first time. This is useful for feature branches and requires no cloning.
Additional
If it would be possible to then add a "matcher" for builds, it would be near perfect. For example, a new build config option could be:
Use this config for: and then a dropdown select with two options:
- Branches (opens a new picker that allows you to pick branches)
- Pattern (opens a text input that allows you to supply a pattern. E.g.
feat/*
)
Conclusion
There's no way I'm going to say your proposal is bad. I'd love to have this feature.
However, I do think this would end up actually copying configurations to other branches, making it harder to change in the future due to duplicate data and no way to tell which configs are the same. So while this approach might be a bit more involved, I also think it might work better.
Either way, you get my 👍
|
||
This proposal details the approach the App Center team will take to address a heavily voiced frustration regarding branch configurations. We expect to start work on implementing this feature in the second quarter of 2019. | ||
|
||
## Problem Statement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call it a challenge and stay positive 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂Appreciate the kind words.
Wholeheartedly agree with @RWOverdijk. Real-life example to hit the point home:
currently solution:copy all the build config options by hand.... 😒 initially proposed solution of this PRcopy build config ... every time ... a new depfu PR is created... 😐 @RWOverdijk solutionoh depfu branch? |
|
||
## Goal | ||
|
||
Given that at least one branch is already configured for a specific app, one can clone a configured branch’s configuration and apply it to a non-configured branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be helpful also override a specific configuration. I believe that this will be available by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fair point. 👍 With Azure DevOps backing our build service this might be a bit tricky for us when it comes to the way we manage secrets. Cloning a configuration is an API call, but overwriting a config with new secrets without losing build logs is a more difficult challenge. @nrajpurkar and @dennispan will take a look and circle back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this is an obvious improvement over the current implementation I don't understand the limitation of one configuration per branch. Why isn't the branch a property of the configuration rather than the other way around? I would expect there to be an unlimited number of configurations with the ability to duplicate and delete any of them. I would choose the branch to be associated with each configuration just like I choose the version of Xcode, the scheme, etc. The way that configurations disappear in a cloud of smoke when I delete a release branch now is odd. I would like to have a release configuration that I use on any release branch as well as others. Some would run tests others wouldn't. The current design doesn't make much sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Environment variables – Variable names and values will be cloned. This includes encrypted environment variables. | ||
* Signing credentials – Stored signing credentials will be cloned along with passwords for the credentials. | ||
* Build scripts – Build script settings will be cloned and applied. If the build script no longer exists in the repo, the build may fail. | ||
* Distribution settings – Distribution to users, group, or store destinations will be cloned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this. Usually we only distribute the master builds to app store etc. We should be able to select which configurations we want to clone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SandroMachado from what I understand, everything will be copied, saved, and then you will have the ability to edit/remove any of the settings that you didn't want applied.
So in your situation, if you don't want the distribution settings to be copied, you would clone the configuration, save, then navigate to distribution settings on your cloned branch and turn them off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's our thought here. You can always follow up an API call with another to adjust distribution settings and/or modify them through the portal UI directly.
Totally agree it'd be great to have templates @RWOverdijk. We are looking at making multiple improvements to build over the course of the year with this one being part of the discussion. Realistically it'd be easier to enable multiple configs per branch, allow you to set one as the default and automatically apply that policy to new branches with things like branch name filters. Something like that would be more straight forward to look at in the future. How does that solution sound? |
@patniko That sounds like what I suggested so I do think that sounds good! |
[EDIT Missed your comment to @RWOverdijk from 21 hours ago, which covers my question] @patniko Thanks for the open process around this feature (and others). Has there been any discussion around a default build config for the repo, which all new branches would inherit? It's a pretty common use case to regularly generate lots of topic branches. It would be great if we could set App Center to treat them all the same way by default. Then if we need to, we can tweak them on an individual basis. |
@wzph-10e it's definitely come up before. Cloning and templating aren't very dissimilar at the end of the day, but there are other options for templates like yml configs. We'll more than likely follow a path mentioned in my previous comment because of the general demand for multiple branch configs. If the best experience ends up being templates we will definitely take a look at going down that path. |
There are two flows for cloning build configurations from the UI. These images outline the steps for cloning a configuration to an unconfigured branch.
Initial proposal for cloning branch configurations in response to #22. Updates for design and API experience to come. Also related to #106.