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

Issue: CI failing to detect changes in my PR #159

Open
seifrajhi opened this issue Oct 6, 2024 · 0 comments
Open

Issue: CI failing to detect changes in my PR #159

seifrajhi opened this issue Oct 6, 2024 · 0 comments

Comments

@seifrajhi
Copy link

Hello!

I forked an upstream repository, then made some changes, and after that created a pull request to that upstream repository.

However, the CI GitHub Action is failing with the message that the documentation is not up to date, even though the README has been updated in my fork.

CI Job Configuration:

......
jobs:
  lint-test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Set up Helm
        uses: azure/setup-helm@v4
        with:
          version: v3.15.4

      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'
          check-latest: true

      - name: Set up chart-testing
        uses: helm/[email protected]

      - name: Run chart-testing (list-changed)
        id: list-changed
        run: |
          changed=$(ct list-changed \
            --config ct.yaml \
            --target-branch ${{ github.event.repository.default_branch }})
          if [[ -n "$changed" ]]; then
            echo "changed=true" >> "$GITHUB_OUTPUT"
          fi

      - name: Check if docs are updated
        if: steps.list-changed.outputs.changed == 'true'
        run: |
          make docs
          if [[ -n "$(git status --porcelain --untracked-files=no)" ]]; then
            echo "Documentation not up to date." >&2
            echo "Please run 'make docs' from the repository root and commit changes!" >&2
            git diff
            exit 1
          else
            echo "Documentation is up to date." >&2
          fi
   ....       

Error Message:

Documentation not up to date.
Please run 'make docs' from the repository root and commit changes!
diff --git a/charts/README.md b/charts/README.md
+| defaultTFDistribution | string | `"terraform"` |  |
 | defaultTFVersion | string | `""` | Sets the default terraform version to be used in the server. Check values.yaml for examples. |
-| defaultTFDistribution | string | `terraform` | Sets the default terraform distribution to use. Can be set to terraform or opentofu. |
Error: Process completed with exit code 1.

Steps to Reproduce:

  1. Fork the repository.
  2. Make changes to the Helm chart and update the README.
  3. Create a pull request to the upstream repository.
  4. Observe the CI GitHub Action failing with the above error message.

Expected Behavior:
The CI should recognize the updated documentation in the fork and pass the checks.

Actual Behavior:
The CI fails, indicating that the documentation is not up to date, despite the README being updated in the fork.

Additional Information:

  • The changes to the README in my fork include updates to the defaultTFDistribution field.
  • The git diff output shows the expected changes, but the CI still fails.

Request for Help:
Could you please help identify why the CI is not recognizing the updated documentation and how to resolve this issue?

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

1 participant