Skip to content
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

Update codeowners to support new config format #850

Merged
merged 7 commits into from
May 21, 2024

Conversation

jhperezd
Copy link
Collaborator

@jhperezd jhperezd commented May 17, 2024

The path objects for the config are changing, this PR introduces support for the new format.

Currently paths looks as follows:

    paths:
      - app/folder1/.*
      - app/folder2/.*
      - app/folder3/subfolder/.*

We are adding a new notify flag which means that a path can be either a string (i.e. previous format) or an object (new format:

    paths:
      - path: app/folder1/.*
        notify: false
      - app/folder2/.*
      - app/folder3/subfolder/.*

This PR introduces a custom deserializer and a Path object to be able to handle the above. The changes are backwards compatible so old configs will still work as usual.

Testing:

  • The relevant tests were updated to cover the new config
  • I was able to confirm with a local build of SKATE that the new format (and the old format) are working okay

The original code handled the following:
paths:
   - my/path/one
   - my/path/two

This code now handles this version:
paths:
   - path: my/path/one
   - path: my/path/two

Next need to handle both variations like so:
paths:
   - path: my/path/one
   - my/path/two

Prob need a custom deserializer or something like that.
This is a much better solution as it handles the additional "notify" as well. Tests have also been updated.
The problem is this does not yet handle the variation of:
paths:
   - path: my/path
   - my/other path

This is still WIP.
This now supports both types of "path". I'll look at splitting up the code into separate files for clarity. Not 100% sure this is the best way to do this, but looking forward to comments during review.
@jhperezd jhperezd requested review from linhpha and ryan-moore-slack and removed request for ryan-moore-slack and linhpha May 17, 2024 21:53
@jhperezd jhperezd marked this pull request as draft May 17, 2024 21:55
@jhperezd jhperezd marked this pull request as ready for review May 17, 2024 23:14
Copy link
Contributor

@ryan-moore-slack ryan-moore-slack 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! Thanks for taking care of this with the config file updates!

@jhperezd jhperezd added this pull request to the merge queue May 21, 2024
Merged via the queue into main with commit 5cb236a May 21, 2024
3 checks passed
@jhperezd jhperezd deleted the jp-new-yaml-first-attempt branch May 21, 2024 18:42
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.

None yet

3 participants