-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Expose output configuration via CLI arguments #1062
Conversation
0076cf0
to
55ea1dc
Compare
There's an issue with the docker container interacting with the file system in integration tests, but it doesn't have any impact on the core functionality added here, so I think this is ready for review, even while I figure out how to account for that detail. |
Previously indicated incorrect config file
afdf007
to
56c2de6
Compare
d27becf
to
5e56986
Compare
Oof. The docker CI job has been given me hell here. Been trapped for hours now trying to reconciling between broken permissions on generated output files and broken users home/dir for creation of the config directory. :( |
The placement of env was shadowing the intended user
I have no idea why these new tests are failing. It seems clear it's a docker issue (cause the other integration tests are working as expected), and 2/3 aren't related to anything added in this pr. I may need to try to re-engineer the way we're testing the docker images, but maybe it's a good idea to stop testing the docker container in our CI for now (it introduces a lot of IO/system-level complexity, and nearly doubles our longest CI time), until we can budget time to re-architect the dockerization? (And maybe just depricate this docker support in favor of some proper packaging?). I'll thing about it a bit tomorrow after some rest. |
Looking at the logs, I think the problem is in |
Thanks for looking! I don’t think that’s the problem, however. I’m only meaning to list the files, not the dirs (since the dir names are different every run). Note that the same tests are passing on the non-docker integration tests, and there are like 3 other tests using the same find command that are passing even in the docker container. |
My main conclusion after 2 days of fighting with the docerized integration tests, is there is way too much ad hoc complexity in the current way we are dockerization (and then testing) the application. I think it's taken me 3 times as long to debug the IO and environment interaction between the dockerized app and the tests as it took to add the feature introduced here. (This is mostly my own fault, as the complexity has gradually piled on over the last year+). To illustrate, here's a brief summary of what we currently have to do to get the IO and environment threaded through correctly:
There must be a better way! However, I think getting to that better way will require some thought and reworking the architecture for this whole chain of nested environments. (Note that these complications are not arising from anything particular added in this PR, they are entailed by the way our dockerization currently is configured and by the nature of docker itself, coming into conflict with the desire to test our new file outputting design. Moreover, these complications are not introduced by the new design for output files! Rather, afaict, we just weren't testing anything about the output files before, so we weren't hitting the permissions errors. I think this has always been a problem, tho I haven't confirmed by checking log file permissions produced by an older container image.) So my current plan is:
|
Wow. I can't believe it finally worked... lol 😅 |
@@ -143,9 +143,10 @@ jobs: | |||
- name: Build dev-shell | |||
run: nix develop -c bash -c exit | |||
- name: Build the docker image | |||
run: docker build -t informalsystems/apalache:ci . | |||
run: docker build -t ghcr.io/informalsystems/apalache:ci . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just cleaning up some remnants from the move from dockerhub to github container registry.
- `out-dir` (String): The value of `out-dir` defines a path to the directory, in which all Apalache runs write their outputs. Each run will produce a unique subdirectory inside `out-dir` using the following convention: `<SPECNAME>_yyyy-MM-dd_HH-mm-ss_<UNIQUEID>`. The use of `~` in the path specification is permitted. The directory need not already exist, however, its parent directory must. | ||
- `out-dir` (String): The value of `out-dir` defines a path to the directory, | ||
in which all Apalache runs write their outputs. Each run will produce a unique | ||
subdirectory inside `out-dir` using the following convention: | ||
`<SPECNAME>_yyyy-MM-dd_HH-mm-ss_<UNIQUEID>`. The use of `~` in the path | ||
specification is permitted. The directory path need not already exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change here is removing the caveat about parent dirs needing to exist. I changed it so that qualification is not needed.
@@ -2,11 +2,11 @@ | |||
"nodes": { | |||
"flake-utils": { | |||
"locked": { | |||
"lastModified": 1631561581, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just due to an update of depss in our nix dev-shell (only used in integration test currently).
# Required to avoid polluting the dev-shell's ocaml environment with | ||
# dynamically liked libs from the host environment | ||
unset CAML_LD_LIBRARY_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This plumbs configuration of the OutputManager's settings
for the out-dir and write-intermediate fields through to the CLI.
This is needed for us to control the location and kind of output for the
benchmark tests, and was planned in #1025
make fmt-fix
(or had formatting run automatically on all files edited)