Skip to content

Conversation

@yhakbar
Copy link
Collaborator

@yhakbar yhakbar commented May 20, 2025

Description

Enabling tests that were disabled while we were moving to the new repo structure.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Enabled TestRemoteDownloadWithRelativePath again.
Enabled TestAutoInitWhenSourceIsChanged again.

Migration Guide

Summary by CodeRabbit

  • Bug Fixes

    • Enabled previously skipped tests related to remote downloads and source version changes.
    • Updated test fixtures to reference the latest module versions.
  • Tests

    • Improved test coverage by ensuring tests for remote module downloads and source version updates now run as intended.

@vercel
Copy link

vercel bot commented May 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
terragrunt-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2025 9:04pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 20, 2025

📝 Walkthrough

Walkthrough

The changes update version references in test fixtures, remove skip directives from two integration tests, and adjust test logic to reflect the new versions. This re-enables previously skipped tests related to recursive references in tagged modules and ensures the tests use the latest module versions.

Changes

File(s) Change Summary
test/fixtures/download/remote-relative/terragrunt.hcl Updated the Terraform source version from v0.77.22 to v0.79.0.
test/integration_download_test.go Removed t.Skip() to re-enable the TestRemoteDownloadWithRelativePath test.
test/integration_test.go Removed skip directive from TestAutoInitWhenSourceIsChanged, updated version tags, and adjusted logic.

Sequence Diagram(s)

sequenceDiagram
    participant TestRunner
    participant Terragrunt
    participant RemoteModule

    TestRunner->>Terragrunt: Run TestAutoInitWhenSourceIsChanged
    Terragrunt->>RemoteModule: Download module at v0.78.4
    Terragrunt-->>TestRunner: Output "Terragrunt has been successfully initialized!"
    TestRunner->>Terragrunt: Change source to v0.79.0 and re-run
    Terragrunt->>RemoteModule: Download module at v0.79.0
    Terragrunt-->>TestRunner: Output "Terragrunt has been successfully initialized!"
Loading

Possibly related PRs

Suggested reviewers

  • levkohimins
  • denis256
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@yhakbar yhakbar marked this pull request as ready for review May 20, 2025 22:09
@yhakbar yhakbar requested a review from denis256 as a code owner May 20, 2025 22:09
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 594134b and 9df57c0.

📒 Files selected for processing (3)
  • test/fixtures/download/remote-relative/terragrunt.hcl (1 hunks)
  • test/integration_download_test.go (0 hunks)
  • test/integration_test.go (2 hunks)
💤 Files with no reviewable changes (1)
  • test/integration_download_test.go
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.go`: Review the Go code for quality and correctness. Make sure that the Go code follows best practices, is performant, and is easy to understand and maintain.

**/*.go: Review the Go code for quality and correctness. Make sure that the Go code follows best practices, is performant, and is easy to understand and maintain.

  • test/integration_test.go
🔇 Additional comments (3)
test/integration_test.go (3)

3179-3180: Version reference updated to v0.78.4

The code updates the version reference from a previous value to v0.78.4 in the test fixture, ensuring the test uses a more recent module version.


3190-3191: Version reference updated to v0.79.0

The second version reference in the test has been updated to v0.79.0, maintaining consistency with the updated test fixtures for this test case.


3167-3200: TestAutoInitWhenSourceIsChanged test re-enabled successfully

This test was previously disabled but has now been re-enabled with updated version references. The test verifies that Terragrunt automatically re-initializes when a module's source version changes. The changes appropriately update the version tags from older versions to more recent ones, allowing the test to run properly with the latest module references.


terraform {
source = "github.com/gruntwork-io/terragrunt.git//test/fixtures/download/relative?ref=v0.77.22"
source = "github.com/gruntwork-io/terragrunt.git//test/fixtures/download/relative?ref=v0.79.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Confirm version bump to v0.79.0
The source ref has been updated from v0.77.22 to v0.79.0. Ensure consistency across all fixtures and tests by checking for any remaining references to the old version.

Run:


🏁 Script executed:

#!/bin/bash
# Verify no fixtures/tests still reference the old version
rg -l 'v0\.77\.22' -g 'test/fixtures/**/*.hcl' -g 'test/**/*.go'
# Confirm new version is used everywhere
rg -l 'v0\.79\.0' -g 'test/fixtures/**/*.hcl' -g 'test/**/*.go'

Length of output: 305


Update remaining fixtures referencing v0.77.22
Our search shows two fixture files still pin to the old version. Please update their source refs to v0.79.0 for consistency:

  • test/fixtures/download/remote/terragrunt.hcl
  • test/fixtures/download/remote-ref/terragrunt.hcl

Suggested command to verify once updated:

rg -l 'v0\.77\.22' -g 'test/fixtures/**/*.hcl' && echo "Old refs remain!"
rg -l 'v0\.79\.0' -g 'test/fixtures/**/*.hcl' && echo "All fixtures now on v0.79.0"
🤖 Prompt for AI Agents
In test/fixtures/download/remote/terragrunt.hcl around line 6, the source ref
has been updated to v0.79.0, but two other fixture files still reference the old
version v0.77.22. Update the source refs in
test/fixtures/download/remote/terragrunt.hcl and
test/fixtures/download/remote-ref/terragrunt.hcl from v0.77.22 to v0.79.0 to
maintain consistency across all fixtures. After updating, run the provided
ripgrep commands to verify no old version references remain.

@yhakbar yhakbar merged commit eede1cd into main May 20, 2025
41 of 42 checks passed
@yhakbar yhakbar deleted the fix/enabling-disabled-tests branch May 20, 2025 22:46
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

Successfully merging this pull request may close these issues.

3 participants