Skip to content

dbt v1.10+ Compatibility and YAML Structure Updates - #36

Merged
yamotech merged 20 commits into
mainfrom
feature/update-generated-dbt-files-for-dbt-v1.10
Jan 18, 2026
Merged

yamotech merged 20 commits into
mainfrom
feature/update-generated-dbt-files-for-dbt-v1.10

Conversation

@yamotech

Copy link
Copy Markdown
Owner

This pull request introduces several improvements and updates for dbt v1.10+ compatibility, enhances documentation, and updates Ruby and dependency support. The main changes include restructuring generated dbt YAML files, updating documentation to reflect new dbt and Ruby versions, and updating RuboCop and gem dependencies.

  • Update generated dbt files for dbt v1.10+ compatibility (arguments:, config: structure)
  • Update README (fix descriptions, add version compatibility warning, add table of contents)
  • Add Ruby 3.4 and 4.0 to CI matrix
  • Update RuboCop configuration to use plugins: instead of require:

📝 Update dbt_utils.unique_combination_of_columns docs
… add table of contents)

- Fix `config_directory_path` and `export_directory_path` description in README
- Add table of contents to README
- Add dbt version compatibility warning to README
```shell
rubocop-performance extension supports plugin, specify `plugins: rubocop-performance` instead of `require: rubocop-performance` in /xxx/activerecord-dbt/.rubocop.yml.
For more information, see https://docs.rubocop.org/rubocop/plugin_migration_guide.html.

rubocop-rails extension supports plugin, specify `plugins: rubocop-rails` instead of `require: rubocop-rails` in /xxx/activerecord-dbt/.rubocop.yml.
For more information, see https://docs.rubocop.org/rubocop/plugin_migration_guide.html.

rubocop-rspec extension supports plugin, specify `plugins: rubocop-rspec` instead of `require: rubocop-rspec` in /xxx/activerecord-dbt/.rubocop.yml.
For more information, see https://docs.rubocop.org/rubocop/plugin_migration_guide.html.

Inspecting 54 files
......................................................

54 files inspected, no offenses detected
```
Resolved:

```shell
$ gem build activerecord-dbt.gemspec
WARNING:  description and summary are identical
WARNING:  open-ended dependency on activerecord (>= 7.0) is not recommended
  if activerecord is semantically versioned, use:
    add_runtime_dependency "activerecord", "~> 7.0"
WARNING:  open-ended dependency on activesupport (>= 7.0) is not recommended
  if activesupport is semantically versioned, use:
    add_runtime_dependency "activesupport", "~> 7.0"
WARNING:  open-ended dependency on zeitwerk (>= 2.6) is not recommended
  if zeitwerk is semantically versioned, use:
    add_runtime_dependency "zeitwerk", "~> 2.6"
WARNING:  You have specified the uri:
  https://github.com/yamotech/activerecord-dbt
for all of the following keys:
  homepage_uri
  source_code_uri
Only the first one will be shown on rubygems.org
WARNING:  See https://guides.rubygems.org/specification-reference/ for help
  Successfully built RubyGem
  Name: activerecord-dbt
  Version: 0.4.0
  File: activerecord-dbt-0.4.0.gem
```

Copilot AI left a comment

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.

Pull request overview

This pull request updates the activerecord-dbt gem to support dbt v1.10+ compatibility by restructuring generated YAML files. The changes introduce the new arguments: and config: structure required by dbt v1.10+, update documentation, and modernize dependencies.

Changes:

  • Updated YAML structure for dbt v1.10+ compatibility with arguments: wrapper for test parameters and config: for resource properties
  • Updated gem dependencies to Rails 8.0 (breaking change from Rails 7.x)
  • Added version compatibility warnings and table of contents to README

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/active_record/dbt/version.rb Version bump from 0.4.0 to 0.5.0
lib/active_record/dbt/column/data_testable/relationships_data_testable.rb Refactored relationships test to use arguments and config structure
lib/active_record/dbt/column/data_testable/accepted_values_data_testable.rb Wrapped test parameters in arguments key
lib/active_record/dbt/dbt_package/dbt_utils/table/data_testable/unique_combination_of_columns_data_testable.rb Split test into arguments and config with proper nil handling
lib/active_record/dbt/model/staging/yml.rb Updated relationships test structure with arguments and config
lib/active_record/dbt/configuration/source.rb Updated config path to read from sources.config.meta instead of sources.meta
lib/generators/active_record/dbt/config/templates/source_config.yml.tt Updated template to show dbt v1.10+ structure with properties under config
activerecord-dbt.gemspec Updated dependencies to Rails 8.0 and improved description
README.md Added version compatibility warnings, table of contents, and clarified descriptions
CHANGELOG.md Added release notes for version 0.5.0
.rubocop.yml Updated to use plugins: instead of deprecated require:
.github/workflows/ruby-ci.yml Added Ruby 3.4 and 4.0 to CI matrix
spec/dummy/** Updated dummy files to reflect new YAML structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread activerecord-dbt.gemspec
spec.add_dependency 'activesupport', '>= 7.0'
spec.add_dependency 'zeitwerk', '>= 2.6'
spec.add_dependency 'activerecord', '~> 8.0'
spec.add_dependency 'activesupport', '~> 8.0'

Copilot AI Jan 18, 2026

Copy link

Choose a reason for hiding this comment

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

The dependency constraint is changed from '>= 7.0' to '> 8.0'. The pessimistic version constraint '> 8.0' will only allow versions >= 8.0 and < 9.0, which is more restrictive than the previous '>= 7.0'. This is a breaking change that will prevent the gem from being used with Rails 7.x applications. Consider whether this is intentional, and if not, use '>= 7.0, < 9.0' or '>= 8.0' to maintain backward compatibility.

Suggested change
spec.add_dependency 'activesupport', '~> 8.0'
spec.add_dependency 'activesupport', '>= 8.0'

Copilot uses AI. Check for mistakes.
Comment thread README.md Outdated
Comment thread lib/active_record/dbt/model/staging/yml.rb
https://github.com/yamotech/activerecord-dbt/actions/runs/21110302113/job/60707867863

```shell
Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby

    activerecord-dbt was resolved to 0.5.0, which depends on
      Ruby (>= 3.0)

    rails (~> 8.0) was resolved to 8.1.2, which depends on
      Ruby (>= 3.2.0)

    sqlite3 (~> 1.4) was resolved to 1.7.3, which depends on
      Ruby (< 3.4.dev, >= 3.0)
```
https://github.com/yamotech/activerecord-dbt/actions/runs/21110425072/job/60708153142?pr=36

```shell
/home/runner/work/activerecord-dbt/activerecord-dbt/lib/active_record/dbt/seed/enum/csv.rb:3: warning: csv used to be loaded from the standard library, but is not part of the default gems since Ruby 3.4.0.
You can add csv to your Gemfile or gemspec to fix this error.

An error occurred while loading ./spec/active_record/dbt/column/data_testable/not_null_data_testable_spec.rb. - Did you mean?
                    rspec ./spec/active_record/dbt/configuration/data_sync_spec.rb

Failure/Error: require 'csv'
```

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yamotech
yamotech merged commit 61a75d6 into main Jan 18, 2026
10 checks passed
@yamotech
yamotech deleted the feature/update-generated-dbt-files-for-dbt-v1.10 branch January 18, 2026 13:20
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.

2 participants