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

[Safe-logging] Infer lambda parameter safety from surrounding context #3050

Merged
merged 6 commits into from
Feb 24, 2025

Conversation

aldexis
Copy link
Contributor

@aldexis aldexis commented Feb 24, 2025

Before this PR

Using a lambda's parameter as safe when we know it is unsafe isn't caught.

Unfortunately, the lambda parameter types passed in SafetyPropagationTransfer#initialStore from ForwardAnalysisImpl#getParameters don't seem to contain the type annotations. However, they are present in the underlyingAst argument which is also given, so we can instead recompute the argument safety from the expected lambda type.

After this PR

Builds on top of #3048, which handles checking the returned values in a lambda

==COMMIT_MSG==
[Safe-logging] Infer lambda parameter safety from surrounding context
==COMMIT_MSG==

Possible downsides?

@aldexis aldexis changed the title [WIP] [Safe-logging] Infer lambda parameter safety from surrounding context [Safe-logging] Infer lambda parameter safety from surrounding context Feb 24, 2025
@aldexis aldexis requested a review from carterkozak February 24, 2025 13:32
@aldexis aldexis force-pushed the ald/safe-logging-lambda-argument branch from 30493ab to a11c086 Compare February 24, 2025 14:52
Base automatically changed from ald/safe-logging-lambda-assignment to develop February 24, 2025 14:53

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.
@aldexis aldexis force-pushed the ald/safe-logging-lambda-argument branch from a11c086 to 869e27f Compare February 24, 2025 14:53
@changelog-app
Copy link

changelog-app bot commented Feb 24, 2025

Generate changelog in changelog/@unreleased

What do the change types mean?
  • feature: A new feature of the service.
  • improvement: An incremental improvement in the functionality or operation of the service.
  • fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
  • break: Has the potential to break consumers of this service's API, inclusive of both Palantir services
    and external consumers of the service's API (e.g. customer-written software or integrations).
  • deprecation: Advertises the intention to remove service functionality without any change to the
    operation of the service itself.
  • manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration,
    performing database surgery, ...) at the time of upgrade for it to succeed.
  • migration: A fully automatic upgrade migration task with no engineer input required.

Note: only one type should be chosen.

How are new versions calculated?
  • ❗The break and manual task changelog types will result in a major release!
  • 🐛 The fix changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
  • ✨ All others will result in a minor version release.

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

[Safe-logging] Infer lambda parameter safety from surrounding context

Check the box to generate changelog(s)

  • Generate changelog entry

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
svc-changelog svc-changelog
Copy link
Contributor

@carterkozak carterkozak left a comment

Choose a reason for hiding this comment

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

Great work, especially the test coverage!

@bulldozer-bot bulldozer-bot bot merged commit 5632720 into develop Feb 24, 2025
5 checks passed
@autorelease3
Copy link

autorelease3 bot commented Feb 24, 2025

Released 6.15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants