What's new with managing app dev in San Diego - Creator Toolbox
[Music] hello and welcome to creator toolbox this is the show where we the people on this screen give you tools for your servicenow developer toolbox and we have a very special guest with us someone you may recognize let's go around and do the introductions oh thank you chuck hello i'm andrew barnes i am a product success manager here at servicenow i've been developing on the platform for over seven years now i was at a couple of customers an implementation partner and my job before this one was on the developer advocacy team uh so it's exciting to be back with you today um happy to to bring new san diego things today it's great to have you back with us andrew hi everyone i'm earl gk i am the newest developer advocate i've been with the team for about six months now i came from higher education higher education and it was really uh started from the bottom and now we're here uh situation uh rising from help desk all the way to senior dev my name is brad tilton i'm a senior developer advocate with the dev program here i've been developing on the platform for 13 and a half years let's give it give it a half and uh yeah i'm excited to be here check to you hey my name is chuck tomasi senior developer advocate a little bit of a sore throat today so i apologize uh i guess that goes right up there with the age and experience and everything else about the same amount of time on the platform as brad and uh been with servicenow since mid-2010 so we have some great content for you i think three of us are color commentary and andrew's got the heavy lifting today so turn it over to you andrew to tell us what you're going to be doing today oh thank you chuck uh it's always a fun time getting to come and share new things uh for a new family release of servicenow and in san diego is chock full of good stuff for developers um so i'm here to talk about some of those things today so we're going to talk about the enhancements for managing your servicenow development on the platform and the enhancements to improving that so thank you for doing the screen share there for me so we're going to be working in servicenow today as developers and take a look at enhancements to developing on the platform so the first thing that i want to talk about is an enhancement to global application bundles so if you're familiar with scopes in servicenow you might be aware that there is this thing called the global scope within that global scope there is the ability to create global app bundles so what that looks like in the servicenow space is is if you come over here to studio and you switch your application and say create application you'll get this option for global app bundle this is uh behind a system property um i don't remember what that is off the top of my head but now that you know that it's behind a system property if you don't see it there you can go look for that system property and when i select this so we're going to create a brand new one right now so we're going to create this uh ctb somebody can tell us the sys property name in the chat i bet i'm sure someone can so i'm going to create this new global app bundle and what this has done is created a shell for me to decide what global files i'd like to work together on this application so i'm going to treat these things as if they are a scope and the reason to do this is so that it enables studio and all of the capabilities from studio like deploying to the app repo or source control with this global app bundle does that make sense any questions there before i show what with added from san diego that's a good run there also so previously the way to add files here is clicking this add existing files and i had this interface that i could do a search for a table or name or update set and select things and the enhancement is so that's all existing functionality pre-san diego the enhancement is in the main platform ui i've now gone to the update set table and we've added some ui actions here on the update set table so that you can do this a little more more in a bulk fashion so as an example if i had an incident application that i wanted to grab all of the application files for this incident application and put them together i've already likely got a collection of update sets that already contain those files i need and so i'll come to my local update set i'll search for the ones i need so let's look at ones for that i added today so let's narrow this down to global and i'm sure i put in uh some today i don't remember which ones uh bulk global that sounds like the thing i was looking for that sounds right so if i go up here um i can see in my ui action picker that i can have a new thing called migrate to global application i can select multiple update sets here if i'd like and when i select that migrate i get this new modal that says pick the uh to create a brand new global app bundle or pick from an existing one so if i were where did you where did you pick that i missed that somewhere how did that work good question chuck so i'll go back so i selected yeah i want and then in the top right i went to my ui action list view picker oh okay okay so it's not creating file like it would be for scoped app right it's migrate to global application gotcha so this is a brand new ui action and so now i can select my existing global app bundle that i just created cgb global example and i can hit migrate what this is going to do is grab all of the entries from that update set so all those customer update entries they're going to grab and claim those application files for as you can see here i didn't have any application files here in studio and now i do so these have been claimed by this global application bundle does that make make sense yep and now that they're in studio in this global application bundle you could do source control right yep i so now i have access to all of the things in studio um so i can link this to source control i can publish this to the app repo which then opens up all of those uh ci cd apis for me to leverage with this global app bundle so there was re there was recently uh an enhancement where your update set history would show as commit history does this does that also take this into account or is that separate so that's separate so this is just the claiming process okay um so this is just associating those application files with this global app bundle so the other ui action that was added so that was the update set level one and that works for multiple update sets for batches so it's very flexible there but you can also go directly to the customer update xml table and you have the same ui action available there so that's why this is for whatever reason your drop down isn't showing yeah i think it may be a stream yard thing oh my drop down's not showing i'm so sorry so yeah i'm clicking on this uh actions on selected rows and it's presenting uh the ui action selection list and the name of it is migrate to global application now we know what to look for [Laughter] so that is then present the same exact interface for those three updates as it does for the update set is that enter app name field is that a reference or no sir that is that will create a brand new app so this will create a brand new app global app bundle i wanted to say incident oh okay okay so because it says new i didn't see new and existing for a second okay but if you said existing it must change changes to a reference it changes to a reference once i do that so if i hit right here this creates a new global app bundle yep and existing allows me from any of those existing ones i have we may have done a demo of that in here before demo global app all right so that is the bulk ad to global that was added here in san diego so any other questions about the you know the global application bundle while we're here um i know there's always uh lots of interest in this because it's it's a relatively new thing for people to actually use and the main reason is like i said allowing you to use studio um to work on those application files and then use and leverage source control and app repo which then unlocks all of those cicd pipeline apis so that you can use the same mechanism for scopes as you do for global so the big the big enhancement was that it's just easier to do now right so you can i can select a bunch of update sets you know if i have if i've kind of governed my development really well and i have really well named update sets so they're all associated with you know stories and releases it should be really easy for me to go in there and find a good set of update sets that could then turn into an app file or into an app that's exactly right brad so it is just lowering that bar for claiming those apps into your global app bundle so just trying to make this easier we've gotten feedback from customers who are trying to do this and they said we think you could make this a little easier and here's our uh you know our next pass at making this easier to claim those application files awesome so uh speaking of applications and leveraging uh the you know ci cd capabilities one of the things that happens is if you have existing apps so we're going to dive into some structure of how apps are stored and listed in servicenow here but when you create a brand new app in a dev instance it creates an entry into the sysap table and when you use update sets to promote this app between your instances what you'll end up with is in your production instance so let's drop over to my production instance here you'll also have a sys app entry for that um application in your production instance so what does that limit me from being able to do i bet somebody on this call knows that in the context of ci cd stuff publishing uh it it doesn't limit me from publishing but the reverse of it it prevents me from using the app repo to deploy updates to to this instance so we were we were very close there so in my production instance if i wanted to start using the application repository to publish applications and then get those updates into my production instance unfortunately the sysapp record doesn't allow you to do that so what you have to do is convert that to a sys store app entry and that is what it is uh deployed from your app repo or the store those get stored in that table and then that's how they get updates from the app repo is from that table so your sys app entries can't get updates from the app repo so i've got a scoped app right here this app 2.2 that's deployed in the dev mode essentially so it's in the sysapp table and what we've added here is let me go ahead and switch to this scope so previously you'd have to contact support and tell them hey i'd like to switch from using update sets to manage this app to using the app repo and i don't like calling support do you like i don't want to call support if i could do it myself i feel like so what we've added is the ability to use a ui action on this record to convert it so i this isn't in a module so you should be able to see this one but let me blow up the text a little bit so you can actually read it so there's a new ui action here that's called convert to update for map repo very descriptive name uh and and this is what we're looking for so this is the newly added san diego feature that will convert this from a sys app entry to assist store app entry which allows it to then consume updates from the application repository um i could run this here um and i might um but the only difference you'll see is that the table in which this app record is stored is different um let's give it if i remember andrew that you don't want to run that on dev correct then you do get to call support that is that is absolutely correct uh chuck you definitely don't want to run this on dab because that will prevent it from being in dev mode and you won't be able to publish to the app repo anymore yeah and you're you don't want that you won't be able to make many changes on it at all yeah there's a few different things that happen when it's on store app mode where you know your runtime access tracking uh changes and you know protection policies get enforced and things like that so type it correctly so we should be able to now find uh does anybody remember what that app was called yeah 1.2 2.2 the scope had a two there we go okay it was literally yeah i really appreciate that thank you for remembering because i didn't remember the name of the app and app 2.2 is not a very uh a sticky name for me so now this app exists in a consumable way from the app repo so i can go to my dev instance publish a new version to the app repo and now retrieve that in my production instance so there's not a lot more to do or see here this is a fairly straightforward change it just allows you to convert from using update sets to app repo on an individual app by app basis as you so choose ready for the next one or any questions on that one no that's i mean that's so nice to have everyone's have to deal with this at one point so this is finally great i'm sure that the support team appreciates this too yeah i like these first two you know enhancements are really just like hey we're telling people to use app repo source control sets here's some ways to make that easier awesome so the next thing i'm going to do is stop over here into flow designer i love flow designer i'm a big big advocate of flow designer it's so good um so what has been added in san diego in in this context of managing app development for us here is the ability to install from source control the very first time an app that you have in source control so previously uh to get an app installed for the first time on an instance you would need to go and go into studio and say import from source control um so let's drop into studio and see what that looks like so when i go to switch i get this interface hopefully you can see it um and i think the instance is uh being a little slow for me import from source control um i set it up here right so this is a manual step right and and we don't like manual steps when we're talking about automating the application deployment pipeline right so i don't want this manual step and what we've done in san diego is the ability to remove this manual step and automate it with an api right make sense let's go see it in action so would this mostly apply to like a test instance where so like in dev you're going to be probably going to do it manual manually but your test instance you might want to like auto deploy that one right so if i'm creating a brand new app and connecting it to source control that that's a that's a manual step that i have to do the first time once the app lives in source control deploying it from source control to another dev instance or to a test instance can now be automated with the api and that's the use case is i've got a pipeline set up i've got an app loaded in dev i hit one of those triggers for my application pipeline deployment which says hey take this app with this version and deploy it to the test instance and i don't hit a bottleneck going oh well this app hasn't been installed for the first time so therefore i need to go do a manual step it makes it consistent whether or not the app is installed or not already on that instance get it to have that app with that uh version from source control loaded as a matter of practice would you want to install to test from source control or the app repo that's an excellent question chuck and the answer is it depends on how your pipeline is set up so the reason to use source control as opposed to app repo for those scenarios where you want to test to end test is if uh your app isn't yet ready in a publishable state so i only typically commit the application repository when i have an app in a version that i think is production ready it means you still need to test that if you're if you're not testing it in test as it's tested in production you're not really testing it because if you're deploying it via source control to test that's a different process you may you may miss things you get things that are not in the app repo version uh absolutely but as i'm developing one of the things i can do is run tests in an instance i'm not directly developing on and get feedback sooner and i may know that i'm not production ready but i want to get that test results back okay so that i can enhance it right then and i don't want to use the app repo for that because it i know that it's not a production ready um so it's not the universal configuration that way that is the scenario in which you would use source control to deploy to the the test instance gotcha thanks for the clarification good discussion certainly so i'm going to narrow this down to the cicd application so i told you there was an api for this and all of the apis in the ci cd rest setup also have corresponding spoke uh actions and subflows and so if you're doing any of this stuff in a servicenow instance i encourage you to use the subflow as opposed to trying to use the action directly or the api directly because the subflow's already set up to do some nice checking and housekeeping for you so i start by looking at the subflow first very nice and the one i want is import application from source control or install applications let's just narrow it down to control see if the name jumps out yeah so apply changes is the one that existed previously and this new one with san diego is import application with repo url so let's take a look at that so we're going to load this subflow now and it takes some inputs as you can you can guess and these are very much aligned to the rest api inputs so you can head over to developer.servicenow.com go to the rest apis for ci cd and check out the inputs and outputs expected for that rest api there and so let's see us use this subflow but we want to inspect it first so the the first thing it does is calls that action um and then it's got some logic uh to decide what to do and in the case in which it's starting to do the import it's got this other subflow that checks in on the tracker because it's you know this isn't an immediate operation that's done immediately so what happens is you tell the other instance install this from source control and then it gives you back an execution tracker to say all right i'm going to get it right on that but i'm not done yet use this tracking id to figure out when i'm done and so that's what this subflow does is it checks back in and until it's complete it will then move on do our log assign our outputs and let us move forward with our pipeline questions before i test and for me i just want to i'm excited to see how all the stuff you get to track through it all right so uh i've got a application that's never been loaded on this instance um repo url the branch name oh let's use the mass branch instance url uh pick one i don't care which one it is dev test prop i can do it on this one i can do it on a remote one it doesn't make any difference earl no so i need to provide a credential alias so i'm going to choose pipeline admin this is something that you are going to need which is you need a credential on that instance that has permissions to this repo url does that make sense yeah yeah so um you know all of our source control integrations need you to be able to have right access to the repository um and so it needs a credential and so this cis id if it's different between your instances which it very well might be needs to be the cis id for the remote instance in this case that's not resolved by the alias though ah because that is the uh alias for authenticating my rest message to the instance okay not the credentials to get the alias is on your current instance and that sys id is the cis id of the credential on your remote that's the point of aliases is so you can have them across multiple instances and they'll still resolve but this is not the authentication to the instance this is the authentication to source control right so this cis id is on the remote system for this repo and this credential alias is the connection for this instance url right to change the label of that field yeah i was thinking it seems like maybe we could label that better because i would never have figured that out [Laughter] so that's why i wanted to be very clear on what it is because it was not uh super obvious to me uh either uh so that but i think i called it out all the right ways uh so let's uh one hello everyone from google yeah let's take a look at sis app how many uh applications we have 32 here um and then we we will expect if this works we will have 33. i always like to know what victory looks like ahead of time so i like to decide what it should be prior to seeing it so we're running this subflow it's going to return us our execution uh fairly soon and there won't be much in here because right now it should just be oh importing failed oh no oh no let's see why we failed uh authentication so i may have grabbed this id from the wrong instance and so let's go validate that so we'll go to our credential table we will grab this cis id and then we will go validate that here and see if it's different it is not uh let's change this then i didn't actually see which credential was bad it was probably this one hopefully this this one works i i've got faith that this one will work this time no but even then look at um paige is pointing out look at those sweet sweet logs that we don't usually so import failed oh no it's uh the credential so let's uh let's check this credential record and that's going to open a pop-up let me go directly to the table ventral alias and yeah this one i think it's the right one did i choose the wrong one let's check let's see i want this one yeah i think that's the one you chose [Music] what are my choices really really would be nice if you worked uh everything else looks fine that looks fine this looks fine um now i'm disappointed open the record check to make sure so i'm going to be off screen for a second i apologize for that no there's no credential in here let's put a credential in here that would do it yeah should i take the screen away nope it'll be fine okay that modal feels like we could improve it with a dynamic input you know when you give your instance your target instance that it could do some introspection and say here are the credentials available to you so you don't have to paste in cis ids that that feels like a good place for a dynamic input that is an interesting place for a dynamic input um i wouldn't expect you to have to use this manual interface though because the whole purpose of this is to have an automated pipeline that's true also the configuration stored in the pipeline seems reasonable and then how do if you're just doing a via this interface how would you validate they have access to the credentials anyways on that instance all right hey oh we got into the else we got into the else nice and it said the tracker is complete so that means that if we return to our good live debugging look at that that's right and i thought everything was going to be polished and nice today but let's see welcome to live coding toolbox and 33 which was what victory was so was installed from source control so that is the source control remote setup again as a reminder the purpose of that is to allow you to have an automated configuration in your pipeline to install an application from source control into the target instance the use cases is your dev other dev instances so if you have multiple dev instances or your test instance if you're set up to do source control based testing in your test instance that's awesome that's a lot of more being able to control a lot of delegated development a lot of uh separation of development all from one instance that's awesome any more toys i've got one more toy in the in the bag of toys today uh so we are going to switch to pop 2.3 i think i think we're gonna switch to cookies so our last enhancement today in studio for managing your app development is around stashing so you might be picking up on a theme here we're trying to make more of these things with source control and app repo easier to use and the next one is stashing so in previous versions what happened when you stashed well so let's talk about why you stash things so when you switch branches so right now i'm in a branch of this application the branch is story00321 and if i switch branches right now i've got some active development on this instance and it's going to prompt me to say would you like to stash that in-flight development and i could say yes and when i deployed back from the stash um what would happen is right now i've got three developers who'd who had done work on this and previously it would flatten all their work into one update setting one updates it um which would make it difficult for me to understand who did what uh so that i can break those out again um and the enhancement here is to make that stashing uh not flatten that stuff so let's look at what i was saying because that's some abstraction there so if i do a commit changes what i can see is i've got three update sets from different developers that have work in them right and if i stash this and brought it back previously i would only have one update set with all of the entries in them and what we are expecting to work today uh is i'm going to stash this work and then it's going to come back and look exactly like it does right now is that the scenario make sense yeah yeah another good improvement for delegated development so um i i need to cancel out the commit window and what i'm going to say is i'm going to stash my local changes so i could tell it to switch a branch and it would prompt me to stash my local changes but i'm just going to invoke it directly and i'm going to say cake is the very best comment uh because it is and i'm going to stash these local changes cookies and cake but now what will i do how will i blame brad for the rogue stash update that got into the app then um there very easily um is whoever did the stashing is actually the one who uh is getting marked as uh the last person to touch those things so let's take a look at um so our instance has been reverted you'll you may have uh noticed if you've got really sharp eyes that one of our script includes is no longer here um and some of the updates inside of those script includes is gone because that work is stashed and i can get to that stash from this manage stash interface um so i've got this entry to say cake is the best comment and if i open that up this will open that stashed entry which is sysrepo stash and it will look very much like an update set batch right here and that's because that's essentially what this is so we'll see we have customer updates in our batch and we'll have these are the three update sets that were placed inside of this batch um and this is what's happening to uh make it so that these aren't flattened is it storing the retrieved update sets and the entries for those retrieved update sets in this stash batch so that i can get them back so if i say apply this back the expectation is that it unfurls that batch redeploys those update sets and has those available to me to commit independently now to my source control which is the goal so if i hit commit changes i'm expecting to see three update sets and two things in one one and one thing in each of the others um you'll notice i do have my script include back that wasn't there before and the edits to those app files so i've got three update sets one with two entries and the other two with one each and now i can individually choose the commits that i want with our selective commit feature submit cpp now i can commit those to source control so that is the fourth and final feature for san diego that i wanted to share with you today before i leave the servicenow instances uh screen share is there anything that we wanted to to see and dive back into question wise before we stop the share i i picked up one from charn and and we've got a podcast on this tomorrow that'll be coming out and i found out that the app repo update process is now diff based so you don't have to do the entire application upload and then install into prod it's going to be a much faster process i i am eagerly awaiting to update a couple of my instances to try that out that's a good uh good addition um i didn't want to show that one today because it's a pretty hard uh setup to show a before and after uh how an app deploys so i would need uh you know a pre-san diego version of two instances at the very least and post san diego version of two instances at the very least to do that comparison to show you um but uh that is a really good point chuck thanks thanks for bringing it up um you may be aware that source control has been doing a diff based uh for a while now since i think paris and the apripo is similarly using some diff based logic to narrow down the things that it needs to retrieve from the app repository which speeds up that download time and install time yeah that seems like an issue that you know you don't run into until you run into it and your apps take forever to to install updates so yeah i've i've had simple changes take 45 minutes to just install this is ridiculous it's getting too hard i had a question andrew do you know what happens uh i know this was a was still happening in rome that's why um if uh someone creates a table as a additional update for an app and then someone stashes that update does it still wipe that table's data or does it retain its um do you know what happens at that point because i know uh the whole wiping of data on a table was fixed in an earlier release but on stashes it was still clearing the data yeah so the stashing of the creation of the table would would still uh destroy any data in that table because your your stash isn't storing data is storing the metadata about that so just what was found in that update set um so you can inspect what's in the stash and see what would be in there and in this case it would just be the metadata for the definition for the table setup got it yeah because you showed us andrew the stash is basically just like an uncommitted update set right like a retreat it is so it'd be like if you created an update set and you know a target instance or created a table then deleted it and had it in a retrieved update set in that target table yes sir so um stop the screen share i think get this sure sure awesome well thanks so much for the engagement and questions um now that we've got the screen share off and i can see your lovely faces any last questions about uh managing the app development life cycle on servicenow nope no awesome right here i'm not saying anything holy compliments well thank you so much for letting me come on and show you these new features we are continuing continuing to improve this area so love to hear your feedback feel free to reach out to me either by email or linkedin or twitter all of all those details are findable in the servicenow blog area on the developer site i'm not very hard to find feel free to reach out and share your enhancements and then definitely if you have really good ideas put them on the idea portal in the community and then send that along to me excellent couple of quick announcements we are still rolling through the san diego early availability content you can tell this is a san diego video because andrew's going to point to the little tag above his left shoulder [Laughter] and we will continue this for what about another month i think right brad yeah sounds good if you want to find all the information earl's got it on the bottom of the screen there devlink dot sn san diego that's sort of our big table of contents and we continue to build that out on a weekly basis we've got more in there all the time so be sure to check back and you'll find links to things you may have missed or things you can look forward to and block them off on your schedule whether it's creator toolbox or a break point podcast or live coding happy hour a blog entry and uh as if you really are unobservant and miss the crawler on the bottom of the screen today is international women's day so congratulations to uh well everybody who's a woman check out the blog yeah yeah check out the blog there's some good stuff there and we'll have more in the near future so any other announcements that i've missed no the chat's mostly talking about how i need more plants in the background or anything thank you once again andrew for joining us today it's uh certainly been informative and educational and slightly entertaining as always everybody take care be safe we will talk to you again real soon you
https://www.youtube.com/watch?v=M0CDoF5zaEk