Skip to content

backfill integ test coverage for git ref modules#6693

Merged
jedevc merged 3 commits intodagger:mainfrom
sipsma:git-tests
Feb 20, 2024
Merged

backfill integ test coverage for git ref modules#6693
jedevc merged 3 commits intodagger:mainfrom
sipsma:git-tests

Conversation

@sipsma
Copy link
Copy Markdown
Contributor

@sipsma sipsma commented Feb 20, 2024

fixes #6623

Most of the recent bugs from the last week ended up being simple things related to using git module refs, which was due to the fact that we didn't have integ test coverage of those.

We didn't have coverage previously because it's slightly less obvious than it seems due to the limitation around git modules only being allowed to be from github.com/. That essentially rules out authoring the tests in the repo itself (there's various shenanigans that might be possible but it gets way too complicated to be worth it).

So, until we have support for non-github module refs, we can just maintain a separate git repo that has "test fixture" modules. I created one in my org here for now (should be moved to be under the dagger org asap).

It's a bit annoying to maintain since you need to update the separate repo and then update the commit to use in the test code, but it's much better than not having this coverage at this point.


There's a few changes to actual code here too:

  • Better error messages, more robust handling of invalid paths: 1e5e89a
  • Fix panic when using custom SDK specified via git ref: 8fbced6

Due to the fix for the panic, I will provisionally add this to v0.9.11, but if @jedevc or others would prefer to save this for later it's an obscure enough case that it can wait.


TODO (can be now or follow-up)

This was panicking because parentSrc is not set when the sdk module
itself is a git module (since parentSrc is irrelevant in that case).

Signed-off-by: Erik Sipsma <erik@dagger.io>
Signed-off-by: Erik Sipsma <erik@dagger.io>
Signed-off-by: Erik Sipsma <erik@dagger.io>
@sipsma sipsma added this to the v0.9.11 milestone Feb 20, 2024
@sipsma sipsma requested review from helderco, jedevc and vito February 20, 2024 07:03
Copy link
Copy Markdown
Contributor

@jedevc jedevc left a comment

Choose a reason for hiding this comment

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

It's a bit annoying to maintain since you need to update the separate repo and then update the commit to use in the test code, but it's much better than not having this coverage at this point.

Agreed, but this is a very reasonable stop-gap IMO 🎉

Let's get this in ASAP, very little chance of breaking things, and better error messages are wonderful 🎉 We can do any follow-ups later.

@jedevc jedevc merged commit a659c04 into dagger:main Feb 20, 2024
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.

Need integ tests for git modules

2 participants