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

Base RunId comparison and hash on all details #271

Merged
merged 4 commits into from
Nov 7, 2024

Conversation

smarr
Copy link
Owner

@smarr smarr commented Nov 7, 2024

This PR is in preparation for the support of #257, which will add machine and denoise configuration support.
Though, it’s also useful without, because it allows us to distinguish RunIds that differ in their environment variables, for instance. Or more generally, RunIds that differ based on any property that is not strictly part of the command line, which is was previously used to establish equality.

This as a consequence means, we have a much weaker ability to determine equality of RunIds than before, but I think that’s fine and less surprising/buggy. It consequently undos some of #4.
On the other hand, it should be everything needed to resolve #119.

The main changes are a proper implementation of the __eq__, __lt__, and __hash__ methods, as well as the serialization of RunIds into the data file, and deserialization when loading a data file.

This change includes some minor refactorings, because it is split from a too huge and unmanageable patch.

Minor refactorings:

  • configurator: extract config validation and assembling of run details
  • executor: use exe name and suite name directly in indicate_build
  • executor/BuildCommand: location is in BuildCommand only for equality, but semantically, we should use the location/path of the suite/executor when processing the build command. That’s now made explicit, and asserted for correctness.
  • BuildCommand is now storing only the command, since the location is used from suite/exe

TODO:

smarr added 2 commits November 7, 2024 00:19
This is in preparation for the support of #257, which will add machine and denoise configuration support.
Though, it’s also useful without, because it allows us to distinguish RunIds that differ in their environment variables, for instance. Or more generally, RunIds that differ based on any property that is not strictly part of the command line, which is was previously used to establish equality.

This as a consequence means, we have a much weaker ability to determine equality of RunIds than before, but I think that’s fine and less surprising/buggy.

The main changes are a proper implementation of the __eq__, __lt__, and __hash__ methods, as well as the serialization of RunIds into the data file, and deserialization when loading a data file.

This change includes some minor refactorings, because it is split from a too huge and unmanagable patch.

Minor refactorings:
 - configurator: extract config validation and assembling of run details
 - executor: use exe name and suite name directly in indicate_build
 - executor/BuildCommand: location is in BuildCommand only for equality, but semantically, we should use the location/path of the suite/executor when processing the build command. That’s now made explicit, and asserted for correctness.
 - BuildCommand is now storing only the command, since the location is used from suite/exe

Signed-off-by: Stefan Marr <[email protected]>
Instead of failing, replace unsupported bytes with a replacement marker.
This avoids failing with an exception and allows to proceed to get some data from the output.

Signed-off-by: Stefan Marr <[email protected]>
@smarr smarr added the Feature label Nov 7, 2024
@coveralls
Copy link

coveralls commented Nov 7, 2024

Coverage Status

coverage: 53.785% (-0.01%) from 53.798%
when pulling a64c9b3 on run-id-equality-based-on-all-props
into 22ed497 on master.

@smarr smarr linked an issue Nov 7, 2024 that may be closed by this pull request
This is possible, because the equality/comparison is now including everything.

Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
@smarr smarr merged commit 1d8b18a into master Nov 7, 2024
10 of 12 checks passed
@smarr smarr deleted the run-id-equality-based-on-all-props branch November 7, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants