-
Notifications
You must be signed in to change notification settings - Fork 981
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
Fix version orders #6057
Fix version orders #6057
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Functionality not used, confirmed with Docs team we can remove the Var
component: https://dbt-labs.slack.com/archives/C02NCQ9483C/p1726157412409069
website/dbt-versions.js
Outdated
"page": "reference/resource-configs/target_database", | ||
"lastVersion": "1.8", | ||
}, | ||
{ | ||
"page": "/reference/resource-configs/target_schema", | ||
"page": "reference/resource-configs/target_schema", |
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.
Keep these changes, page paths should not have leading forward slash. Remove all other changes in this file.
website/docs/docs/version-testing.md
Outdated
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.
Delete this page before merge
website/src/utils/sort-versions.js
Outdated
return 0 | ||
}); | ||
|
||
console.log('sortedVersions', sortedVersions) |
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.
Remove this console before merge
Hey @JKarlavige nice work on this, qq on this page https://docs-getdbt-com-git-fix-version-orders-dbt-labs.vercel.app/reference/resource-configs/target_database Confirmed it does get hidden from the sidebar after Specifically the "You should upgrade to 0 or later if you want to use this feature." |
Nice catch, it should definitely not say that. Will work on fixing that! |
Co-authored-by: Ly Nguyen <[email protected]>
Adds a reference to `{{ target.schema }}`, useful when defining `foreign_key` constraints.
## What are you changing in this pull request and why? Reorganized the Advanced CI docs ## Checklist - [x] I have reviewed the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. - [x] The topic I'm writing about is for specific dbt version(s) and I have versioned it according to the [version a whole page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) and/or [version a block of content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content) guidelines. - [x] Needs PM review - [x] Needs Legal review --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: nataliefiann <[email protected]>
## What are you changing in this pull request and why? Fix card on landing page ## Checklist - [x] I have reviewed the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. - [x] The topic I'm writing about is for specific dbt version(s) and I have versioned it according to the [version a whole page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) and/or [version a block of content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content) guidelines.
dbt-core 1.8.3 release
## What are you changing in this pull request and why? * Updating to our own dbt maintained repo. Note that Leah will update the videos next week. ## Checklist - [ ] I have reviewed the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. - [ ] The topic I'm writing about is for specific dbt version(s) and I have versioned it according to the [version a whole page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) and/or [version a block of content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content) guidelines. - [ ] I have added checklist item(s) to this list for anything anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch." <!-- PRE-RELEASE VERSION OF dbt (if so, uncomment): - [ ] Add a note to the prerelease version [Migration Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade) --> <!-- ADDING OR REMOVING PAGES (if so, uncomment): - [ ] Add/remove page in `website/sidebars.js` - [ ] Provide a unique filename for new pages - [ ] Add an entry for deleted pages in `website/vercel.json` - [ ] Run link testing locally with `npm run build` to update the links that point to deleted pages -->
@john-rock Updated the version warning banner to exclude the "first available in version.." part of the message if a Verify version banner no longer shows incorrect upgrade recommendation line: Select Verify all pages not listed in versionedPages array do not show version warning banner: |
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 lgtm. I'm no longer seeing the incorrect warning message if firstVersion
is not set.
const aMajor = aSegments[0] || "0" | ||
const bMajor = bSegments[0] || "0" | ||
const aMinor = aSegments[1] || "0" | ||
const bMinor = bSegments[1] || "0" | ||
const aPatch = aSegments[2] || "0" | ||
const bPatch = bSegments[2] || "0" |
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.
The lengths we go to with javascript 🤣 nice work on this util.
What are you changing in this pull request and why?
Issue
With the current versioning,
v1.10
is considered less thanv1.9
. This adjusts the versioning to correctly sort the version numbers by major, minor and patch versions.Preview
Verify the
VersionBlock
components correctly show/hide based on thefirstVersion
&lastVersion
props set:https://docs-getdbt-com-git-fix-version-orders-dbt-labs.vercel.app/docs/version-testing
Verify this page hides from the sidebar for versions after
v1.8
:https://docs-getdbt-com-git-fix-version-orders-dbt-labs.vercel.app/reference/resource-configs/target_database
Verify
Project configs
sidebar category is only visible forv1.8
and up:https://docs-getdbt-com-git-fix-version-orders-dbt-labs.vercel.app/reference/dbt_project.yml
To quickly test the new
sortVersions
method, drop the following code into the versionBlock file and visit the/version-testing
page above. There is a console.log withinsortVersions
which will show the sorted array of versions.TODO Before Merge
version-testing
pagesortedVersions
dbt-versions
Project configs
versioned category indbt-versions