Hello, It seems that code references are not worki...
# ask-questions
b
Hello, It seems that code references are not working as expected (at least for us). We use it in GitHub workflow:
Copy code
update-gb-code-refs:
      runs-on: kube
      steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Update GrowthBook code references
        uses: growthbook/coderefs-action@2.11.5-14
        with:
            apiHost: ${{ vars.GROWTHBOOK_HOST_URL }}
            apiKey: ${{ secrets.GROWTHBOOK_API_KEY }}
            lookback: 0
Workflow logs are attached as a file. After successful run we still see a reference in feature toggle stats tab, but the piece of code which is displayed is no longer on master branch. This happens from time to time in different repositories and feature flags. Is there any caching or something like that, which prevents actual references from being displayed?
image.png
image.png
s
Thanks for the report. We're investigating now. I'll follow up once I know more
👍 1
b
any updates?
s
Sorry for not updating before! A fix was pushed up earlier this month: https://github.com/growthbook/growthbook/pull/4240
b
thank you!
so now we should provide deleteMissing parameter to growthbook/coderefs-action or... (since the default value for new parameter is false)?
b
Yeah that is correct you need to add that parameter deleteMissing and set it to true.
b
It does not work. I get: Unexpected input(s) 'deleteMissing', valid inputs are ['apiHost', 'apiKey', 'contextLines', 'debug', 'lookback'] when using
Copy code
update-gb-code-refs:
      runs-on: kube
      steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Update GrowthBook code references
        uses: growthbook/coderefs-action@2.11.5-14
        with:
            apiHost: ${{ vars.GROWTHBOOK_HOST_URL }}
            apiKey: ${{ secrets.GROWTHBOOK_API_KEY }}
            lookback: 0
            deleteMissing: "true"
s
Are you on the latest version of GrowthBook? I think you'll need to be updated for this to work.
b
im working on a version bump for github action to add the missing param.
@brief-umbrella-80783 if you update your action to use
growthbook/coderefs-action@2.11.6-0
it should now work let me know if there are any issues
b
Copy code
update-gb-code-refs:
      runs-on: kube
      steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Update GrowthBook code references
        uses: growthbook/coderefs-action@2.11.6-0
        with:
            apiHost: ${{ vars.GROWTHBOOK_HOST_URL }}
            apiKey: ${{ secrets.GROWTHBOOK_API_KEY }}
            lookback: 0
            deleteMissing: "true"
the docker image pulled in workflow is "/runner/_work/_actions/growthbook/coderefs-standalone-action/2.11.5-12/Dockerfile" "/runner/_work/_actions/growthbook/coderefs-standalone-action/2.11.5-12" code ref is still not being deleted
b
are you self hosted or cloud?
b
self hosted Build: a502b5d (2024-05-24)
b
The update was added to 4.0 so you will need to update your build
👍 1
b
will do and check, thank you
👍 1
@brash-kite-51410 works as expected on 4.0.0. Thank you
b
Perfect glad to hear!! 🙂