Second Generation Packaging Confusion

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
4
down vote

favorite












Bear with me but I am completely confused as the documentation is fragmented, not entirely specific, and contradictory in places.



Background



I am creating an unlocked no namespace package for our org. The test methods for that package requires the use of classes (existing in our org) as those classes are shared testing classes. I need to be able to use those classes in the unlocked package so I do not keep recreating duplicate classes.



What I did



  1. Scratch org with Package A (needing the test methods)

  2. I create a package in another scratch org with the shared classes, created a package and package version

  3. I added the dependency to Package A project son

  4. I installed the package to the Package A scratch org

Questions



  1. Where do you actually create the package for the shared classes? I created it in a scratch org like the docs said. But what happens when the scratch org is deleted due to expiration


  2. I cannot promote the package version as it says I do not have the required permissions. What permission is required to promote?


  3. Do I need to promote the unlocked package to a released version at all?


  4. When I finally install the shared Package B into the prod org, will it overwrite the current classes since they were previously existing?

Sorry for the confusion but the workflow does not seem well defined. Basic premise is trying to develop a feature package and use existing artifacts from prod to support test methods in the new package



Any clarification would be helpful. My question may also not be clear as I am a bit confused....










share|improve this question



























    up vote
    4
    down vote

    favorite












    Bear with me but I am completely confused as the documentation is fragmented, not entirely specific, and contradictory in places.



    Background



    I am creating an unlocked no namespace package for our org. The test methods for that package requires the use of classes (existing in our org) as those classes are shared testing classes. I need to be able to use those classes in the unlocked package so I do not keep recreating duplicate classes.



    What I did



    1. Scratch org with Package A (needing the test methods)

    2. I create a package in another scratch org with the shared classes, created a package and package version

    3. I added the dependency to Package A project son

    4. I installed the package to the Package A scratch org

    Questions



    1. Where do you actually create the package for the shared classes? I created it in a scratch org like the docs said. But what happens when the scratch org is deleted due to expiration


    2. I cannot promote the package version as it says I do not have the required permissions. What permission is required to promote?


    3. Do I need to promote the unlocked package to a released version at all?


    4. When I finally install the shared Package B into the prod org, will it overwrite the current classes since they were previously existing?

    Sorry for the confusion but the workflow does not seem well defined. Basic premise is trying to develop a feature package and use existing artifacts from prod to support test methods in the new package



    Any clarification would be helpful. My question may also not be clear as I am a bit confused....










    share|improve this question























      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      Bear with me but I am completely confused as the documentation is fragmented, not entirely specific, and contradictory in places.



      Background



      I am creating an unlocked no namespace package for our org. The test methods for that package requires the use of classes (existing in our org) as those classes are shared testing classes. I need to be able to use those classes in the unlocked package so I do not keep recreating duplicate classes.



      What I did



      1. Scratch org with Package A (needing the test methods)

      2. I create a package in another scratch org with the shared classes, created a package and package version

      3. I added the dependency to Package A project son

      4. I installed the package to the Package A scratch org

      Questions



      1. Where do you actually create the package for the shared classes? I created it in a scratch org like the docs said. But what happens when the scratch org is deleted due to expiration


      2. I cannot promote the package version as it says I do not have the required permissions. What permission is required to promote?


      3. Do I need to promote the unlocked package to a released version at all?


      4. When I finally install the shared Package B into the prod org, will it overwrite the current classes since they were previously existing?

      Sorry for the confusion but the workflow does not seem well defined. Basic premise is trying to develop a feature package and use existing artifacts from prod to support test methods in the new package



      Any clarification would be helpful. My question may also not be clear as I am a bit confused....










      share|improve this question













      Bear with me but I am completely confused as the documentation is fragmented, not entirely specific, and contradictory in places.



      Background



      I am creating an unlocked no namespace package for our org. The test methods for that package requires the use of classes (existing in our org) as those classes are shared testing classes. I need to be able to use those classes in the unlocked package so I do not keep recreating duplicate classes.



      What I did



      1. Scratch org with Package A (needing the test methods)

      2. I create a package in another scratch org with the shared classes, created a package and package version

      3. I added the dependency to Package A project son

      4. I installed the package to the Package A scratch org

      Questions



      1. Where do you actually create the package for the shared classes? I created it in a scratch org like the docs said. But what happens when the scratch org is deleted due to expiration


      2. I cannot promote the package version as it says I do not have the required permissions. What permission is required to promote?


      3. Do I need to promote the unlocked package to a released version at all?


      4. When I finally install the shared Package B into the prod org, will it overwrite the current classes since they were previously existing?

      Sorry for the confusion but the workflow does not seem well defined. Basic premise is trying to develop a feature package and use existing artifacts from prod to support test methods in the new package



      Any clarification would be helpful. My question may also not be clear as I am a bit confused....







      salesforcedx package






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      Eric

      44.5k548107




      44.5k548107




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted











          Where do you actually create the package for the shared classes? I created it in a scratch org like the docs said. But what happens when the scratch org is deleted due to expiration




          Packages are created in the DevHub org, so they won't be deleted with a scratch org.




          I cannot promote the package version as it says I do not have the required permissions. What permission is required to promote?




          You need the System Permissions > Create and Update Second-Generation Packages. You'll also need the other permissions from the documentation. Also, you need to enable 2GP if you haven't already (Setup > Dev Hub > Enable Unlocked Packages (GA) and Second-Generation Managed Packages (Beta)).




          Do I need to promote the unlocked package to a released version at all?




          Unlocked packages don't have a "beta" or "released" status like normal managed packages.




          When I finally install the shared Package B into the prod org, will it overwrite the current classes since they were previously existing?




          Yes, they will be updated and marked as part of the package.






          share|improve this answer






















          • Thank you. I will check permissions. i thought I had them since I was able to create the package. Anyway. Thank you for the confirmation, sometimes that's all that is needed
            – Eric
            1 hour ago











          • @sfdxfox - one more stupid question. Where do I find the package in the dev hub org? Is it only via the cli....
            – Eric
            1 hour ago










          • @Eric Make sure the 2GP feature is enabled, too (just added an edit).
            – sfdcfox
            1 hour ago






          • 2




            @Eric You can query them as well, but you're right, there's no GUI for these yet, as far as I can tell (I only have limited experience, so I might have missed something).
            – sfdcfox
            1 hour ago










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "459"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f236683%2fsecond-generation-packaging-confusion%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted











          Where do you actually create the package for the shared classes? I created it in a scratch org like the docs said. But what happens when the scratch org is deleted due to expiration




          Packages are created in the DevHub org, so they won't be deleted with a scratch org.




          I cannot promote the package version as it says I do not have the required permissions. What permission is required to promote?




          You need the System Permissions > Create and Update Second-Generation Packages. You'll also need the other permissions from the documentation. Also, you need to enable 2GP if you haven't already (Setup > Dev Hub > Enable Unlocked Packages (GA) and Second-Generation Managed Packages (Beta)).




          Do I need to promote the unlocked package to a released version at all?




          Unlocked packages don't have a "beta" or "released" status like normal managed packages.




          When I finally install the shared Package B into the prod org, will it overwrite the current classes since they were previously existing?




          Yes, they will be updated and marked as part of the package.






          share|improve this answer






















          • Thank you. I will check permissions. i thought I had them since I was able to create the package. Anyway. Thank you for the confirmation, sometimes that's all that is needed
            – Eric
            1 hour ago











          • @sfdxfox - one more stupid question. Where do I find the package in the dev hub org? Is it only via the cli....
            – Eric
            1 hour ago










          • @Eric Make sure the 2GP feature is enabled, too (just added an edit).
            – sfdcfox
            1 hour ago






          • 2




            @Eric You can query them as well, but you're right, there's no GUI for these yet, as far as I can tell (I only have limited experience, so I might have missed something).
            – sfdcfox
            1 hour ago














          up vote
          3
          down vote



          accepted











          Where do you actually create the package for the shared classes? I created it in a scratch org like the docs said. But what happens when the scratch org is deleted due to expiration




          Packages are created in the DevHub org, so they won't be deleted with a scratch org.




          I cannot promote the package version as it says I do not have the required permissions. What permission is required to promote?




          You need the System Permissions > Create and Update Second-Generation Packages. You'll also need the other permissions from the documentation. Also, you need to enable 2GP if you haven't already (Setup > Dev Hub > Enable Unlocked Packages (GA) and Second-Generation Managed Packages (Beta)).




          Do I need to promote the unlocked package to a released version at all?




          Unlocked packages don't have a "beta" or "released" status like normal managed packages.




          When I finally install the shared Package B into the prod org, will it overwrite the current classes since they were previously existing?




          Yes, they will be updated and marked as part of the package.






          share|improve this answer






















          • Thank you. I will check permissions. i thought I had them since I was able to create the package. Anyway. Thank you for the confirmation, sometimes that's all that is needed
            – Eric
            1 hour ago











          • @sfdxfox - one more stupid question. Where do I find the package in the dev hub org? Is it only via the cli....
            – Eric
            1 hour ago










          • @Eric Make sure the 2GP feature is enabled, too (just added an edit).
            – sfdcfox
            1 hour ago






          • 2




            @Eric You can query them as well, but you're right, there's no GUI for these yet, as far as I can tell (I only have limited experience, so I might have missed something).
            – sfdcfox
            1 hour ago












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted







          Where do you actually create the package for the shared classes? I created it in a scratch org like the docs said. But what happens when the scratch org is deleted due to expiration




          Packages are created in the DevHub org, so they won't be deleted with a scratch org.




          I cannot promote the package version as it says I do not have the required permissions. What permission is required to promote?




          You need the System Permissions > Create and Update Second-Generation Packages. You'll also need the other permissions from the documentation. Also, you need to enable 2GP if you haven't already (Setup > Dev Hub > Enable Unlocked Packages (GA) and Second-Generation Managed Packages (Beta)).




          Do I need to promote the unlocked package to a released version at all?




          Unlocked packages don't have a "beta" or "released" status like normal managed packages.




          When I finally install the shared Package B into the prod org, will it overwrite the current classes since they were previously existing?




          Yes, they will be updated and marked as part of the package.






          share|improve this answer















          Where do you actually create the package for the shared classes? I created it in a scratch org like the docs said. But what happens when the scratch org is deleted due to expiration




          Packages are created in the DevHub org, so they won't be deleted with a scratch org.




          I cannot promote the package version as it says I do not have the required permissions. What permission is required to promote?




          You need the System Permissions > Create and Update Second-Generation Packages. You'll also need the other permissions from the documentation. Also, you need to enable 2GP if you haven't already (Setup > Dev Hub > Enable Unlocked Packages (GA) and Second-Generation Managed Packages (Beta)).




          Do I need to promote the unlocked package to a released version at all?




          Unlocked packages don't have a "beta" or "released" status like normal managed packages.




          When I finally install the shared Package B into the prod org, will it overwrite the current classes since they were previously existing?




          Yes, they will be updated and marked as part of the package.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 1 hour ago

























          answered 1 hour ago









          sfdcfox

          233k10179396




          233k10179396











          • Thank you. I will check permissions. i thought I had them since I was able to create the package. Anyway. Thank you for the confirmation, sometimes that's all that is needed
            – Eric
            1 hour ago











          • @sfdxfox - one more stupid question. Where do I find the package in the dev hub org? Is it only via the cli....
            – Eric
            1 hour ago










          • @Eric Make sure the 2GP feature is enabled, too (just added an edit).
            – sfdcfox
            1 hour ago






          • 2




            @Eric You can query them as well, but you're right, there's no GUI for these yet, as far as I can tell (I only have limited experience, so I might have missed something).
            – sfdcfox
            1 hour ago
















          • Thank you. I will check permissions. i thought I had them since I was able to create the package. Anyway. Thank you for the confirmation, sometimes that's all that is needed
            – Eric
            1 hour ago











          • @sfdxfox - one more stupid question. Where do I find the package in the dev hub org? Is it only via the cli....
            – Eric
            1 hour ago










          • @Eric Make sure the 2GP feature is enabled, too (just added an edit).
            – sfdcfox
            1 hour ago






          • 2




            @Eric You can query them as well, but you're right, there's no GUI for these yet, as far as I can tell (I only have limited experience, so I might have missed something).
            – sfdcfox
            1 hour ago















          Thank you. I will check permissions. i thought I had them since I was able to create the package. Anyway. Thank you for the confirmation, sometimes that's all that is needed
          – Eric
          1 hour ago





          Thank you. I will check permissions. i thought I had them since I was able to create the package. Anyway. Thank you for the confirmation, sometimes that's all that is needed
          – Eric
          1 hour ago













          @sfdxfox - one more stupid question. Where do I find the package in the dev hub org? Is it only via the cli....
          – Eric
          1 hour ago




          @sfdxfox - one more stupid question. Where do I find the package in the dev hub org? Is it only via the cli....
          – Eric
          1 hour ago












          @Eric Make sure the 2GP feature is enabled, too (just added an edit).
          – sfdcfox
          1 hour ago




          @Eric Make sure the 2GP feature is enabled, too (just added an edit).
          – sfdcfox
          1 hour ago




          2




          2




          @Eric You can query them as well, but you're right, there's no GUI for these yet, as far as I can tell (I only have limited experience, so I might have missed something).
          – sfdcfox
          1 hour ago




          @Eric You can query them as well, but you're right, there's no GUI for these yet, as far as I can tell (I only have limited experience, so I might have missed something).
          – sfdcfox
          1 hour ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f236683%2fsecond-generation-packaging-confusion%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          Installing NextGIS Connect into QGIS 3?

          One-line joke