fix: derive int_tests token expiry from JWT exp instead of hardcoded 2028 timestamp#205
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/microsoft/dbt-fabricspark/sessions/69f12454-e70a-4fa5-8deb-22257df2ad15 Co-authored-by: mdrakiburrahman <46581776+mdrakiburrahman@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/dbt-fabricspark/sessions/69f12454-e70a-4fa5-8deb-22257df2ad15 Co-authored-by: mdrakiburrahman <46581776+mdrakiburrahman@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/dbt-fabricspark/sessions/69f12454-e70a-4fa5-8deb-22257df2ad15 Co-authored-by: mdrakiburrahman <46581776+mdrakiburrahman@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/dbt-fabricspark/sessions/69f12454-e70a-4fa5-8deb-22257df2ad15 Co-authored-by: mdrakiburrahman <46581776+mdrakiburrahman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix hardcoded expires_on timestamp in int_tests auth path
fix: derive int_tests token expiry from JWT exp instead of hardcoded 2028 timestamp
May 20, 2026
mdrakiburrahman
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Thank you for making change! Please fill this template for your pull request to improve quality of check-in message.
Tip
This repo uses Conventional Commit conventions - please try to rename your PR headline to match it.
Warning
Please ensure to read through this whole set of instructions, specially the
Testsection.Why this change is needed
int_testsauth was constructingAccessToken(..., expires_on=1845972874), which marks tokens valid until 2028 and bypasses refresh checks.Repro is straightforward: any
authentication="int_tests"path keeps using the cached token regardless of real token expiry/revocation state.How
expires_oninget_default_access_tokenwith JWTexpextraction fromcredentials.accessToken.expis unavailable, fallback setsexpires_onto current time to force immediate refresh behavior instead of fake long-lived validity.exp->AccessToken.expires_onTest
Important: Non-Microsoft Employee contributors
If you are not a Microsoft employee with a
foo@microsoft.comemail, you will not be able to run CI as it runs in the@microsoft.comFabric Tenant where you do not have access.In order for your PR to be considered for review, you must attach a clear screenshot of the output of you running the following command successfully:
Here's an example of a successful run:
To keep the quality of the repo high, if you do not attach a screenshot of successful local testing, your PR will be promptly closed.
Microsoft Employee contributors
Your PR will be subjected to full regression suite via GitHub Action.
It's highly recommended to run the tests locally so your contributions are promptly merged rather than failing in CI.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
1.0.0.127.in-addr.arpa/opt/mssql/bin/sqlservr(dns block)api.fabric.microsoft.com/home/REDACTED/work/dbt-fabricspark/dbt-fabricspark/.venv/bin/pytest pytest tests/unit -vv(dns block)/home/REDACTED/work/dbt-fabricspark/dbt-fabricspark/.venv/bin/pytest pytest tests/unit -vv --detach --pid-file /run/containerd/io.containerd.runtime.v2.task/moby/5d4636370486d929598a19908904e2a5257e22552a8a14ddb5b3e335fa47b88b/3b9b6c4050fc5a929033de7025d0c4b91f16eb0b70e20253669e4caec98ddbt-fabricspark:test:unit 5d4636370486d929598a19908904e2a5257e22552a8a14ddb5b3e335fa47b88b in/node gpg.program 929598a19908904e-c(dns block)/home/REDACTED/work/dbt-fabricspark/dbt-fabricspark/.venv/bin/pytest pytest tests/unit -vv af1f51efec061f4784acc12d927ca0a8365f034367691246/var/run/docker/runtime-runc/moby 71c1�� 3" -C -Q "SELECT 1" || exit 1(dns block)metadata.google.internal/opt/mssql/bin/sqlservr(dns block)settings-win.data.microsoft.com/opt/mssql/bin/sqlservr(dns block)vortex.data.microsoft.com/opt/mssql/bin/sqlservr(dns block)www.google-analytics.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/dbt-fabricspark/dbt-fabricspark/node_modules/.bin/nx run dbt-fabricspark:lint(dns block)/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node /home/REDACTED/work/dbt-fabricspark/dbt-fabricspark/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker /tmp/plugin5889-2-330.024769.sock /home/REDACTED/work/dbt-fabricspark/dbt-fabricspark/node_modules/nx/src/plugins/project-json/build-nodes/project-json(dns block)/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node /home/REDACTED/work/dbt-fabricspark/dbt-fabricspark/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker /tmp/plugin5889-0-323.033599.sock /home/REDACTED/work/dbt-fabricspark/dbt-fabricspark/node_modules/nx/src/plugins/js(dns block)If you need me to access, download, or install something from one of these locations, you can either: