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

improve how we track updating of 02packages after test indexing #512

Closed
wants to merge 2 commits into from

Conversation

rjbs
Copy link
Collaborator

@rjbs rjbs commented May 11, 2024

This replaces the generic methods for checking file changes. They were generic (great!) but also unreliable and kind of a pain to call. The new method is more reliable and easier to use.

rjbs added 2 commits May 11, 2024 15:23
The previous method for checking this was generic, which is nice, but
sort of verbose to use.  Worse, though, I don't think it was reliable.
That code, ->file_updated_ok and ->file_not_updated_ok, worked by
keeping a cache of file stats -- but it didn't precompute those stats,
it computed them on demand.  So given this program:

  $pause = PAUSE::TestPause->new;

  do_stuff();
  my $r1 = $pause->test_reindex;
  do_other_stuff();
  $pause->file_updated_ok("A");
  my $r2 = $pause->test_reindex;
  do_more_stuff();
  my $r3 = $pause->test_reindex;

Calling `->file_updated_ok("A")` at the end would test since the
previous call.  Calling `->file_updated_ok("B")` at the end would test
starting from nothing.

In reality, we only use this method for tracking 02packages, so I've
added specific tracking of that file, with the check put onto the Result
object, considering only what changed in the `test_reindex` call that
created that Result.
@rjbs rjbs force-pushed the test-index-tracking branch from 0f17f22 to 4b6dcdb Compare May 11, 2024 19:23
@rjbs rjbs requested a review from wolfsage May 11, 2024 19:26
@rjbs
Copy link
Collaborator Author

rjbs commented May 12, 2024

I've rebased #510 onto this work to keep life simple.

@rjbs rjbs closed this May 12, 2024
@rjbs rjbs deleted the test-index-tracking branch May 12, 2024 00:08
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.

1 participant