Be able to switch connections faster

Issue #423 resolved
Carlos del Moral created an issue

Original question: https://groups.google.com/a/illuminatedcloud.com/forum/?utm_medium=email&utm_source=footer#!msg/qanda/hvw0Al_9PGY/wtzftsHjAwAJ

When using git as a VCS for a Salesforce project I usually have different branches for each sandbox. When I switch to a different branch (and therefore, a different sandbox) I would like to be able to switch the connection in a faster and more comfortable way than it is today.

When I do that as of today I have to change credentials in a couple places and generate the offline symbols from scratch even if I already used that sandbox in the past. So for now I just create a different project for each branch/sandbox.

Comments (16)

  1. Scott Posey

    Invariably I am switching between sandboxes, it seems like it would be straightforward for the offline symbol table to be cached per-connection!

  2. Javier GarcĂ­a Manzano

    They approach I use is to create a fork for each sandbox/production enviroment and then set a CI integration each time a push is made to the master branch. Check out Atlassian's guidelines for SF developing, you might find them useful :)

    Nonetheless, what I was going to suggest is to simply create a new project for each Sandbox, that way whenever you want to change enviroment you can directly go through: File>Open.. or Open Recent. It's real fast and you don't have to generate the symbols at all :D

  3. Scott Wells repo owner

    I'm curious as to whether this is still much of an issue now that I've moved connection configuration to the application level (previously configured at the project/module level). I think the main issue at this point might be IC prompting the user about "orphaned" OSTs when there are OST.zip files in the filesystem that don't correspond to the selected connection. You can dismiss that prompt and retain the OST files so that they're there when switching connections, but I imagine it might be annoying to be warned each time the config validator runs.

  4. Scott Wells repo owner

    Thanks for the feedback. I'll take a look at a way to make this less intrusive in a near-term release.

  5. Doug Ayers

    Not sure I understand the issue, but perhaps we use different development flows.

    My preference is to create a separate project per org connection. Whether I'm in Force.com IDE (eclipse), MavensMate, or Illuminated Cloud (intellij). Each production and sandbox connection gets their own project.

    To swap between them I simply open that other project; retrieve latest metadata or pull from git branch, and march forward.

    I've always found it troublesome to have multiple orgs' metadata intermixed with my project and connections. Perhaps SalesforceDX will remedy that =)

  6. Jacek Nakonieczny

    What I'd like to see is more connection grouping options. Let's say I have configured several projects and each project have one module and several connections which is similar to other configurations that I deducted from comments above.

    For Anonymous Apex/SOQL Query I would like to see those 3 sections:

    • Project Connections which contains active connection per module
    • Related Connections which contains all project related connections that are manually assigned. So having 1 project with 1 module I can easily change which connection is used as context of Apex/SOQL and not go through gazillion other connections from dropdown
    • Global Connections which contains all other defined connections not listed in previous sections

    Screenshot_65.png

    As for better changing active connection/OST per module I think Configure Project settings window is sufficient enough for this operation.

    Screenshot_66.png

  7. Scott Wells repo owner

    This is all very valuable feedback. I won't likely get a chance to address this for a bit since my primary focus right now is on SFDX intergation (though it's quite related to that work since I'm incorporating SFDX scratch orgs as connections), but once I do get to work on this I'll put together a few proposals and run them by this group before diving into implementation. Keep the ideas coming!

  8. Jacek Nakonieczny

    Would be great to have one place to set common/default connection for new SOQL/Anonymous Apex tabs or use current tab's connection as default for new one. For example I would like to run some queries and apex for connection other than deployment (Project Connection) so I don't need to choose connection that I'm interested in.

    Current tab's connection could be synched throughout other tabs SOQL/Apex tabs as opt-in/out functionality. So checking output of SOQL/Apex for different connection would be easier.

  9. Jonny Power (he/him)

    The source of truth in my case is git, but I often roll new orgs to deploy upstream changes, deploy updated development data etc. It would be great if I could create & switch connection quickly (similar UX to switching branches in the bottom right perhaps), and set a project wide config to not prompt for offline symbol tables to be deleted.

  10. Scott Wells repo owner

    Unless something goes wrong during testing, this will be in the next build. Here's what I've done:

    • Orphaned OSTs are no longer considered invalid module state. You can have as many as you want. There is a button in the project configuration dialog to clean up orphaned OSTs if you'd like to do so, but that's up to you now.
    • When you switch connections for a module and there's no existing OST for the newly-selected connection, IC will prompt you to copy an existing OST for the new connection as a starting point. If there's already an existing OST, you're done.

    Hopefully this will make connection(/branch) switching much faster and more streamlined than it's been in the past.

  11. Scott Wells repo owner

    FYI, 1.8.1.2 is ready and I'll release it tomorrow morning. I don't want to take a chance on a mad scramble today knowing that my family absolutely gets my full attention this evening for trick-or-treating.

  12. Log in to comment