Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52272

Bitbucket branch source plugin doesn't update correctly the list of repositories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
       * Product Solution: CloudBees Jenkins Team
       * Product Version: 2.121.1.2

       * bitbucket:1.1.8 'Jenkins Bitbucket Plugin'
       * cloudbees-bitbucket-branch-source:2.2.9 'Bitbucket Branch Source Plugin'
    • Similar Issues:

      Description

      In a Multibranch Pipeline project when I add Bitbucket as a Branch Source, give it the correct Credentials and Owner, the repo that I just gave read access does not show up in the Repository Name list until I restart the CJT service.

        Attachments

          Activity

          Hide
          amuniz Antonio Muñiz added a comment -

          This is probably a side effect to the cache introduced in 2.2.9.

          The can not be disabled for now, but it will be in the next release (as soon as JENKINS-50314 is released). Meanwhile the workaround is to clean the cache manually from the script console by running this snippet:

          import com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient;
          
          BitbucketCloudApiClient.cachedTeam.evictAll();
          BitbucketCloudApiClient.cachedRepositories.evictAll();
          
          Show
          amuniz Antonio Muñiz added a comment - This is probably a side effect to the cache introduced in 2.2.9. The can not be disabled for now, but it will be in the next release (as soon as  JENKINS-50314 is released). Meanwhile the workaround is to clean the cache manually from the script console by running this snippet: import com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient; BitbucketCloudApiClient.cachedTeam.evictAll(); BitbucketCloudApiClient.cachedRepositories.evictAll();
          Hide
          carroll Carroll Chiou added a comment - - edited

          Unable to reproduce bug with current master.  Bitbucket cache has been disabled by default since 2.2.1.

          To verify the correct caching behavior, the following was done:

          1. Enable the cache of Bitbucket endpoints in global config
          2. Create a new multibranch project and add Bitbucket branch source
            • Confirmed the list of repos is showing correctly
          3. Create a new Bitbucket repo
          4. Create another multibranch project and add Bitbucket branch source
            • Confirmed that the newest Bitbucket repo was not show in the repo list
          5. Disabled cache of Bitbucket endpoints
          6. Go back to the lastest multibranch project and add Bitbucket branch source
            • Confirmed that the newest Bitbucket repo is showing and the list of repos is correct
          7. Similar verification was also done by waiting for the Bitbucket cache period to expire and reloading the Bitbucket repositories list.

           

          Show
          carroll Carroll Chiou added a comment - - edited Unable to reproduce bug with current master.  Bitbucket cache has been disabled by default since 2.2.1. To verify the correct caching behavior, the following was done: Enable the cache of Bitbucket endpoints in global config Create a new multibranch project and add Bitbucket branch source Confirmed the list of repos is showing correctly Create a new Bitbucket repo Create another multibranch project and add Bitbucket branch source Confirmed that the newest Bitbucket repo was not show in the repo list Disabled cache of Bitbucket endpoints Go back to the lastest multibranch project and add Bitbucket branch source Confirmed that the newest Bitbucket repo is showing and the list of repos is correct Similar verification was also done by waiting for the Bitbucket cache period to expire and reloading the Bitbucket repositories list.  
          Hide
          carroll Carroll Chiou added a comment -

          Cache is disabled by default in 2.2.12

          Show
          carroll Carroll Chiou added a comment - Cache is disabled by default in 2.2.12

            People

            Assignee:
            carroll Carroll Chiou
            Reporter:
            jraezrus Javier Raez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: