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

disable recording by default #305

Merged
merged 5 commits into from
May 23, 2024
Merged

disable recording by default #305

merged 5 commits into from
May 23, 2024

Conversation

apotterri
Copy link
Collaborator

@apotterri apotterri commented May 14, 2024

The agent no longer records by default. Code must be run with appmap-python, or with APPMAP=true to create AppMap data files.

Additionally, APPMAP_RECORD_PYTEST and APPMAP_RECORD_UNITTEST have been replaced by APPMAP_RECORD_TESTS. Also, APPMAP_RECORD_PROCESS now disables other recording types.

Fixes #299.
Fixes #300.
Fixes #301.
Fixes #307.

@apotterri apotterri force-pushed the v2_20240512 branch 11 times, most recently from c8b5dda to b4c4ba7 Compare May 20, 2024 21:33
Make sure `APPMAP_RECORD_REQUESTS=true` will generate request recordings
when running tests. Previously, it was ignored, and request recordings
were never generated when tests were run.
Combine APPMAP_RECORD_PYTEST and APPMAP_RECORD_UNITTEST into
APPMAP_RECORD_TESTS.
@apotterri apotterri marked this pull request as ready for review May 21, 2024 08:54
Copy link
Contributor

@dividedmind dividedmind left a comment

Choose a reason for hiding this comment

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

Looks mostly ok, though explicitly setting APPMAP=false (or anything else than true) should not cause a warning. (BTW, I noticed that with the previous version APPMAP=false doesn't seem to do anything at all — warning is still displayed and appmaps are still recorded.)

@@ -3,11 +3,11 @@ recording types. In each case, ✓ means that the corresponding recording type
will be produced, ❌ means that it will not.

## Web Apps
These tables describe how `APPMAP_RECORD_REQUEST` and `APPMAP_RECORD_REMOTE` are
These tables describe how `APPMAP_RECORD_REQUESTS and `APPMAP_RECORD_REMOTE` are
Copy link
Contributor

Choose a reason for hiding this comment

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

Missed a backtick here.

def enabled():
return Env.current.enabled
else:
print(_DISABLED_BY_DEFAULT_MSG, file=sys.stderr)
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this cause the warning to be displayed even if the user explicitly sets APPMAP=false?
This seems very annoying.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I noticed this was wrong right before I read your comment. I adjusted the indentation of the else, should work properly now.

Also, fix a typo.
Recording is no longer enabled by default. It is now necessary to run scripts with
appmap-python, or explicitly set APPMAP=true

BREAKING CHANGE: disable record by default
It doesn't make sense (and doesn't work) to try to capture other
recording types when the user says they want a process recording (by
setting APPMAP_RECORD_PROCESS=true).
@apotterri apotterri merged commit f1a0373 into master May 23, 2024
2 checks passed
@apotterri apotterri deleted the v2_20240512 branch May 23, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants