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

feat: diff spec databases #596

Merged
merged 6 commits into from
Oct 19, 2023
Merged

feat: diff spec databases #596

merged 6 commits into from
Oct 19, 2023

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Oct 9, 2023

Adds a diffing tool to the service spec repository. Its goal is to print the differences between 2 database files, in terms of services and their properties added, removed and updated. By default, the diff is printed in a nice ASCII art tree, but it can also be printed in JSON format by passing the --json flag.

This diff tool will be used in the future to make sure that when we refactor how the spec database is loaded, we can ensure that the database before the refactor and after the refactor is the same (because the diff will be empty).

We've decided that while the tskb project could potentially support a generic database-level diff, it's probably easiest for now to just diff at the application level (i.e., the code doing the diffing knows about services, resources, properties and attributes).

  • Diff types have been added to the service-spec-types package.
  • The diff tool itself lives in the service-spec-build package.

NOTE: the ASCII tree print is currently broken, but we are merging this early because we need the diffing functionality itself to validate other changes.

@rix0rrr rix0rrr changed the title feat: add a feature to diff feat: diff spec databases Oct 11, 2023
@rix0rrr rix0rrr marked this pull request as ready for review October 18, 2023 13:26
@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Oct 19, 2023
Merged via the queue into main with commit c2a6fe8 Oct 19, 2023
6 checks passed
@aws-cdk-automation aws-cdk-automation deleted the huijbers/model-diff branch October 19, 2023 08: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.

4 participants