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

Various changes to the eval history schema service #3637

Merged
merged 3 commits into from
Jun 18, 2024
Merged

Conversation

dmjb
Copy link
Contributor

@dmjb dmjb commented Jun 17, 2024

These relate to feedback from the design review, plus making some changes in light of writing code which uses these tables:

  1. Use ON DELETE CASCADE for all foreign key references.
  2. Use an array of timestamps to store the evaluation instances instead
    of keeping them in a separate table.
  3. Change some of the table names. The original names were not
    particularly consistent or intuitive.

Since Minder does not use any of these tables at this point, there should be no impact from these changes.

Summary

Provide a brief overview of the changes and the issue being addressed.
Explain the rationale and any background necessary for understanding the changes.
List dependencies required by this change, if any.

Fixes #(related issue)

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@dmjb dmjb requested a review from a team as a code owner June 17, 2024 14:59
@coveralls
Copy link

Coverage Status

coverage: 53.4% (-0.005%) from 53.405%
when pulling cf83f77 on eval-history-changes
into d353230 on main.

blkt
blkt previously approved these changes Jun 17, 2024
@coveralls
Copy link

Coverage Status

coverage: 53.4% (-0.005%) from 53.405%
when pulling d243a44 on eval-history-changes
into d353230 on main.

@coveralls
Copy link

Coverage Status

coverage: 53.39% (+0.01%) from 53.38%
when pulling 4f98c9c on eval-history-changes
into 6a4341b on main.


-- use an array of timestamps instead of a separate table when tracking evaluation instances
DROP TABLE IF EXISTS evaluation_instance;
ALTER TABLE evaluation_statuses ADD COLUMN evaluation_times TIMESTAMP[] NOT NULL DEFAULT ARRAY[]::TIMESTAMP[];
Copy link
Contributor

Choose a reason for hiding this comment

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

upon writing a row on this table, wouldn't we want there to be one evaluation by default? That is, an array with one item which is NOW()? Or, do we pre-populate this table and only add an evaluation time afterwards?

dmjb added 3 commits June 18, 2024 09:59
These relate to feedback from the design review, plus making some
changes in light of writing code which uses these tables:

1) Use `ON DELETE CASCADE` for all foreign key references.
2) Use an array of timestamps to store the evaluation instances instead
   of keeping them in a separate table.
3) Change some of the table names. The original names were not
   particular consistent or intuitive.

Since Minder does not use any of these tables at this point, there
should be no impact from these changes.
@coveralls
Copy link

Coverage Status

coverage: 53.39%. remained the same
when pulling 634676f on eval-history-changes
into 31e0ca3 on main.

@coveralls
Copy link

Coverage Status

coverage: 53.4% (+0.01%) from 53.39%
when pulling 634676f on eval-history-changes
into 31e0ca3 on main.

@coveralls
Copy link

Coverage Status

coverage: 53.4% (+0.01%) from 53.39%
when pulling 634676f on eval-history-changes
into 31e0ca3 on main.

@dmjb dmjb merged commit f5769d2 into main Jun 18, 2024
23 checks passed
@dmjb dmjb deleted the eval-history-changes branch June 18, 2024 09:19
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