Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_NORMALIZED_BRANCH_NAME set to blank, always failing on "delete prev branch" step #94

Open
mewc opened this issue Feb 3, 2025 · 1 comment

Comments

@mewc
Copy link

mewc commented Feb 3, 2025

Run output=$(tb --host *** --token *** branch ls)
  output=$(tb --host *** --token *** branch ls)
  BRANCH_NAME="tmp_ci_${_NORMALIZED_BRANCH_NAME}_3"
  
  # Check if the branch name exists in the output
  if echo "$output" | grep -q "\b$BRANCH_NAME\b"; then
      tb \
        --host *** \
        --token *** \
        branch rm $BRANCH_NAME \
        --yes
  else
      echo "Skipping clean up: The Branch '$BRANCH_NAME' does not exist."
  fi
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.11.11/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.11/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.11/x64
    Python[2](https://github.com/xxxxxx/data/actions/runs/13106758729/job/36562792985?pr=3#step:10:2)_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.11/x64
    Python[3](https://github.com/xxxxxx/data/actions/runs/13106758729/job/36562792985?pr=3#step:10:3)_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.11/x6[4](https://github.com/xxxxxx/data/actions/runs/13106758729/job/36562792985?pr=3#step:10:4)
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.11/x[6](https://github.com/xxxxxx/data/actions/runs/13106758729/job/36562792985?pr=3#step:10:6)4/lib
    GIT_BRANCH: tinybirdsetup
    _ENV_FLAGS: --last-partition --wait
    _NORMALIZED_BRANCH_NAME: 
    TB_ENV: 
    VERSION: 0.0.0

it seems like the _NORMALIZED_BRANCH_NAME is set to blank in the CI runs. Always failing on the "delete prev branch" step

my workflow

    jobs:
        ci: 
          uses: tinybirdco/ci/.github/workflows/ci.yml@main
          with:
            data_project_dir: tinybird
            tb_format: true
            git_depth: 2
          secrets:
            tb_admin_token: ${{ secrets.TINYBIRD_ADMIN_TOKEN }}  # set admin token associated to an account in GitHub secrets
            tb_host: https://api.us-east.tinybird.co
@alrocar
Copy link
Member

alrocar commented Feb 3, 2025

👋 thanks for reporting.

From what I see here if data project dir is the root directory then it should be empty and that's fine, but when you have multiple data projects configured in the same repo it should get a value.

Are you experiencing some error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants