Skip to content

Conversation

@lipskis
Copy link
Contributor

@lipskis lipskis commented Oct 23, 2025

No changes were necessary in the integration. The only issues were stricter config requirements that caused CodeOwnership to ignore teams in our tests.

Fixes #1472.

Add github property to team.yml config files

Starting from version 2.0.0 of CodeOwnership teams that don't
have a github property in their team.yml config file are ignored.

Add github property with fake github organizations to all team config
fixtures.

Move CodeOwnership fixtures to app dir

Starting from version 2.0.0 CodeOwnership is much stricter in how it
handles config. Files that aren't included in owned_globs of
config/code_ownership.yml are ignored even if valid ownership is
specified. This broke the existing setup for integration tests.

Move all "app" fixtures to /app directory. Copy all config and app
files from support_dir to tmp_dir, so that everything is loaded from
same directory.

Remove gem version requirement

The public api method that the integration uses hasn't changed. Remove
requirement for CodeOwnership gem version below v2.0.

Update build matrix

The CodeOwnership gem fails to build its native extension on ruby
3.5.0-preview1.

Remove ruby 3.5.0-preview1 from the CodeOwnership gem's CI build
matrix.

Disable Ruby 3.3.4 from build matrix

CodeOwnership uses oxidize-rb/actions/fetch-ci-data@v1 github action
to fetch a list of ruby versions to build the native extension for. During
the realase of 2.0.0 it only returned ["3.2", "3.4"]. The gem fails to
load because there's no compiled extension available for Ruby
3.3.

Missing builds for Ruby 3.3 seems to be a known issue in the
oxidize-rb/actions repo. See
oxidize-rb/actions#62

Remove Ruby 3.3.4 from the build matrix.

[skip changeset]

Starting from version `2.0.0` of `CodeOwnership` teams that don't
have a `github` property in their `team.yml` config file are ignored.

Add github property with fake github organizations to all team config
fixtures.
@lipskis lipskis self-assigned this Oct 23, 2025
@lipskis lipskis added the chore A small task that takes a day or two at the most. label Oct 23, 2025
@lipskis lipskis force-pushed the support-codeownership2 branch from 23bbb18 to 40d5f7e Compare October 23, 2025 15:41
@lipskis lipskis marked this pull request as draft October 23, 2025 15:47
@lipskis lipskis force-pushed the support-codeownership2 branch from 40d5f7e to ad0dff6 Compare October 23, 2025 15:52
Starting from version `2.0.0` `CodeOwnership` is much stricter in how it
handles config. Files that aren't included in `owned_globs` of
`config/code_ownership.yml` are ignored even if valid ownership is
specified. This broke the existing setup for integration tests.

Move all "app" fixtures to `/app` directory. Copy all config and app
files from `support_dir` to `tmp_dir`, so that everything is loaded from
same directory.
The public api method that the integration uses hasn't changed. Remove
requirement for `CodeOwnership` gem version below `v2.0`.
@lipskis lipskis force-pushed the support-codeownership2 branch from 1e35984 to 1b6af50 Compare October 23, 2025 16:59
The CodeOwnership gem fails to build its native extension on ruby
`3.5.0-preview1`.

Remove ruby `3.5.0-preview1` from the CodeOwnership gem's CI build
matrix.
@lipskis lipskis force-pushed the support-codeownership2 branch from 1b6af50 to 63dff70 Compare October 23, 2025 17:02
CodeOwnership uses `oxidize-rb/actions/fetch-ci-data@v1` github action
to fetch a list of ruby versions to build native extension for. During
the realase of 2.0.0 it only returned ["3.2", "3.4"]. The gem fails to
load because there's no compiled native extension available for Ruby
3.3.

Missing builds for Ruby 3.3 seems to be a known issue in the
`oxidize-rb/actions` repo. See
oxidize-rb/actions#62

Remove Ruby 3.3.4 from the build matrix.
@lipskis lipskis marked this pull request as ready for review October 23, 2025 18:22
Comment on lines 151 to -168
def create_team_files
FileUtils.mkdir(File.join(tmp_dir, "config", "teams"))

%w[file directory].each do |team|
FileUtils.copy_file(
File.join(support_dir, "code_ownership", "config", "teams", "#{team}.yml"),
File.join(tmp_dir, "config", "teams", "#{team}.yml")
)
end

glob_team =
<<~CONFIG
name: GlobTeam
owned_globs:
- #{File.join(support_dir, "code_ownership", "glob", "*.rb")}
CONFIG

write_file(File.join(tmp_dir, "config", "teams", "glob.yml"), glob_team)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that everything is loaded from the same directory, there's no need for a dynamic owned_globs property, so I moved the glob_team config into the config/teams/glob.yml fixture.

@backlog-helper
Copy link


This is a message from the daily scheduled checks.

New issue guide | Backlog management | Rules | Feedback

@lipskis lipskis requested a review from unflxw October 27, 2025 12:20
Copy link
Contributor

@unflxw unflxw left a comment

Choose a reason for hiding this comment

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

Looks good to me -- do you know why CI is failing? Looks unrelated, but just to be sure.

@lipskis
Copy link
Contributor Author

lipskis commented Oct 27, 2025

do you know why CI is failing? Looks unrelated, but just to be sure.

Yes, it's unrelated. Two things appeared simultaneously on the same day and broke everything:

  • CodeOwnership 2.0.0 release, which this PR fixes;
  • Rails/active_support issue, which is fixed in Rails 8.1 fix #1473.

Once this PR and #1473 are merged, we should be back to green builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore A small task that takes a day or two at the most.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support CodeOwnership 2.0.0

2 participants