-
Notifications
You must be signed in to change notification settings - Fork 100
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
Incorporate 1.7.2 changes #461
Conversation
for more information, see https://pre-commit.ci
One piece here about two tests related to the full refresh of seeds. It doesn’t seem to want to drop the table to pass that materializations test. Not sure if tests want to be revisited to see if there is any tests that are covered in the parent adapter. Kept the existing tests here and they passed (calling the fabric macros where not otherwise defined). |
@cody-scott : |
I believe we are waiting on the repo maintainers to take a look. Further work is needed to add the full suite of tests that DBT provides, and to see if that full-refresh failure can be corrected (or ignored) for now. |
@cody-scott : can you tag the maintainers as reviewers or is that not possible ? |
Hey @cody-scott !!! Can't believe i missed this PR. I believe I have maintainer status on the repo -- I volunteered a couple months ago to help this along. really happy to see an attempt here -- i've been hacking away at my own fixes but it seems like we can start from yours!! Leaving comments in a "review" note below.
Thanks for the help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good -- My only question is about the commented out tests; as long as we are passing the existing tests i'm not too worried about inspecting the application code; we can address those issues as they come up and we gotta prioritize getting this out. As soon as I get a response about the missing tests I can get CI running!
tests/unit/adapters/sqlserver/test_sql_server_connection_manager.py
Outdated
Show resolved
Hide resolved
one more thing... on my machine i'm getting failures for the 3 |
@JCZuurmond sdebruyn is no longer maintaining this repo and I believe dataders is on parental leave until march... I believe I am your point of contact for now :) |
Ok, i'm seeing 5 failed @schlich from your json file.
In terms of some of the failing azure tests, I think most of that should pull from fabric, but not positive here (might need to look closer). We aren't using azure so i don't have a reliable way to test on my side. Is there an appetite to add some of the other tests that dbt has introduced since 1.4? I believe there is a number more in their suite now. Next steps i'm seeing:
|
Two questions here:
The fabric adapter seems to have re-written many of the tests and not implemented the default test suite from dbt; same problem they're having? I am puzzled here; it seems like we should be expecting the table to exist (like what the fabric one does) @schlich what are you thinking here? Log file for only the second step (run_dbt seed full refresh) where its pretty clear its dropping + creating. Edit: See my latest comment. |
One approach here would be to re-align with the same test set of fabric or try and get the tests in line with the current dbt suite + any one-off modifications as required. |
Ok, i think i've got the issue; the downstream view isn't being dropped as part of the full refresh. Not sure exactly what changed but that seems to be the issue here. Maybe its something fabric is doing that isn't aligning... |
Alright I think this is the state. The base tests are expecting that it performs like postgres and should perform a 'drop view/table cascade', which would explain why the test is expected to have no view on a full refresh. Since sql server doesn't support this I see two options
Upside of the first is its closest to the expected DBT, downside is it's going to drop all downstream tables and views. If you have anything that relies on them in build then it's going to remove them until it hits that step. relevant discussion. Other piece is non dbt controlled views will also get dropped. Fabric is going for option 2. @schlich What's your thoughts? It's tied to full refresh so that's probably why those particular items are failing (I think). |
Amazing legwork! Based on that bug report you linked, which seems like its a completely valid concern, I'd say option 2 is the way to go. Let me know if you need help with the code; I'm totally swamped of late so i appreciate you taking this up. Where are we at on the CLI login you think? |
I also would like to volunteer to help if I can. Give me a task and I'll make a run at it. Thanks so much for your work on this @cody-scott ! |
The doc errors
are related to the @pytest.fixture(scope="class")
def expected_catalog(self, project):
return base_expected_catalog(
project,
role=os.getenv("DBT_TEST_USER_1"),
id_type="int",
text_type="varchar",
time_type="datetime",
view_type="VIEW",
table_type="BASE TABLE",
model_stats=no_stats(),
) The fixture in dbt-fabric uses @pytest.fixture(scope="class")
def expected_catalog(self, project):
return base_expected_catalog(
project,
role=os.getenv("DBT_TEST_USER_1"),
id_type="int",
text_type="varchar",
time_type="datetime2",
view_type="VIEW",
table_type="BASE TABLE",
model_stats=no_stats(),
) I'm fairly certain this is the correct fix but being unfamiliar with the code I'm looking for confirmation. Any insight into this update? |
I had hoped to get further along but I'm struggling to figure out this testing scheme and trace the tests. I've overridden some of the test fixtures but I'm still getting failures. I'll not have much time in the next couple of days to continue but I'll pick it up again on the weekend if needed. |
I've run into the same error in other contexts, I can confirm this fix. Can you push up a PR of your WIP against this branch so i can examine and potentially merge? |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@schlich it looks like you beat me to it. We don't need to merge my changes anymore, correct? I also made a change to the |
@mikaelene SOS if you are around. We need an organization owner to remove the dependency on Python 3.7 in the required checks. Will see if anyone has a hotline to @dataders otherwise, or we will have to wait until he returns from parental leave and explore an unofficial pypi release in the meantime. Unless anyone else is seeing anything i'm not! But we're almost there!!!! |
Hi @schlich , I might be able to help while Anders is out. |
Hi @b-per it was a busy day yesterday! I was able to obtain admin perms to the repo to remove the 3.7 check myself. Today we are stuck with the pyPI release. Do you have access there? |
No, I don't have access to this one. |
I updated the token in the GH secrets, I don't have access to add other folks myself. |
Updates adapter to 1.7.2