Skip to content

dev: fix justfile integration-test recipe#4249

Merged
Bravo555 merged 1 commit into
thin-edge:mainfrom
Bravo555:dev/justfile-integraion-test-fix
Jul 15, 2026
Merged

dev: fix justfile integration-test recipe#4249
Bravo555 merged 1 commit into
thin-edge:mainfrom
Bravo555:dev/justfile-integraion-test-fix

Conversation

@Bravo555

Copy link
Copy Markdown
Member

Proposed changes

integration-test recipe used build-integration-test as a dependency, but after dependency is executed (or if it doesn't run) the integration-test recipe failed because it didn't source the environment by itself:

$ just integration-test
...
invoke tests
sh: 1: invoke: not found
error: Recipe `integration-test` failed on line 189 with exit code 127

This commit duplicates the shebang from build-integration-test to integration-test so that the recipe works again. I'm not sure if there's a way to avoid the copy paste though, if there is, hopefully somebody mentions it in the review.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s. You can activate automatic signing by running just prepare-dev once)
  • I ran just format as mentioned in CODING_GUIDELINES
  • I used just check as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

integration-test recipe used build-integration-test as a dependency, but
after dependency is executed (or if it doesn't run) the integration-test
recipe failed because it didn't source the environment by itself:

```
$ just integration-test
...
invoke tests
sh: 1: invoke: not found
error: Recipe `integration-test` failed on line 189 with exit code 127
```

This commit duplicates the shebang from build-integration-test to
integration-test so that the recipe works again. I'm not sure if there's
a way to avoid the copy paste though, if there is, hopefully somebody
mentions it in the review.

Signed-off-by: Marcel Guzik <marcel.guzik@cumulocity.com>
@Bravo555
Bravo555 requested review from a team as code owners July 13, 2026 17:59
@Bravo555
Bravo555 temporarily deployed to Test Pull Request July 13, 2026 17:59 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
953 0 7 953 100 2h47m37.294420999s

@reubenmiller reubenmiller added theme:developer-exp Theme: improve developer experience skip-release-notes Don't include the ticket in the auto generated release notes labels Jul 14, 2026
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread justfile
Comment on lines +194 to 196
cd tests/RobotFramework
source .venv/bin/activate
invoke tests {{ARGS}}

@jarhodes314 jarhodes314 Jul 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I realise this PR absolutely doesn't introduce this pattern, but I find it puzzling that we're writing the recipe in bash mode and then bringing the entire venv into the path when we could just execute the relevant process directly from the venv. For example, this AFAIK should work, and would be directly compatible with just, no bash required (though the other change here does need that):

Suggested change
cd tests/RobotFramework
source .venv/bin/activate
invoke tests {{ARGS}}
cd tests/RobotFramework && .venv/bin/invoke tests {{ARGS}}

Update I was slightly mistaken in my assumption that this would work - pabot executes robot as a bare command (which feels like a risky approach to spawning robot), so we'd need to modify the PATH to include the venv, something like the following at the end of tasks.py to make it work:

    c.run(
        " ".join(command),
        env={
            "PATH": f"{Path(sys.executable).parent}:{os.environ.get('PATH', '')}",
        },
    )

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

tbh I'd like to avoid modifying tasks.py and introducing this special handling for $PATH just for the sake of a single recipe

@rina23q rina23q left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Bravo555
Bravo555 added this pull request to the merge queue Jul 15, 2026
Merged via the queue into thin-edge:main with commit 2215553 Jul 15, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-release-notes Don't include the ticket in the auto generated release notes theme:developer-exp Theme: improve developer experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants