-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(ptt): Add space ptt
feature to features
#299
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backwards compatibility summary:
|
scan-config
and scan-info
ptt
feature to features
gautambhat
approved these changes
Oct 22, 2024
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.
don't forget to complete the PR checklist
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For PTT, in order to ensure that the default lockfile-less logic (to only generate graphs in the absence of a lockfile) is overridden when a customer is using PTT, we need a way to communicate the status of the PTT feature to the CLI from the app. As such, this PR introduces
path_to_transitivity
as an optional (for backwards compatibility) boolean value onfeature
.An alternative I was exploring was adding a field to the
scan_config
andscan_response
objects which could store a list of "feature flags" and their values/enabled status from the app in order to avoid having to make changes to interfaces in the case that we want feature flag behavior to affect the waysemgrep-pro
works. However, with this approach, the main con is that we would need to ensure that the names of the feature flags stay consistent between the CLI and the app which would open us up to bad bugs resulting from silly things like typos.With the approach in this PR (just tacking PTT onto the list of features in the config), the main con is that principally the
features
entry gets its values from settings stored as part of the config inpostgres
. In addition, once PTT is GA, this feature flag becomes useless so ideally, we will update lockfileless to generate the graph by default and then remove code which checks the PTT flag and then altogether from interfaces.make setup && make
to update the generated code after editing a.atd
file (TODO: have a CI check)For example, the Semgrep backend need to still be able to consume data generated
by Semgrep 1.17.0.
See https://atd.readthedocs.io/en/latest/atdgen-tutorial.html#smooth-protocol-upgrades