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

throw DeadlineExpiredException when deadline expiration is realized #16

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

bjlaub
Copy link
Contributor

@bjlaub bjlaub commented Feb 3, 2025

No description provided.

@changelog-app
Copy link

changelog-app bot commented Feb 3, 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

throw DeadlineExpiredException when deadline expiration is realized

Check the box to generate changelog(s)

  • Generate changelog entry

Comment on lines 55 to 82
public boolean isInternal() {
return internal;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We could alternatively handle this as two nested subclasses, like QosException. Not entirely clear which option is best in this case, but we have some time to think about it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah i considered that, i don't have strong opinions either way. I do tend to prefer encoding something like this as a type, rather than a field.

@bjlaub bjlaub force-pushed the blaub/enforce-expiration branch from b25cc24 to f77d4c2 Compare February 6, 2025 17:57
/**
* Indicates that a deadline has expired.
*/
public abstract class DeadlineExpiredException extends RuntimeException {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

perhaps we should split this class out into a separate PR so that we can publish it in the API for this library and allow consumers to adopt logic that handles these exception types before we merge a change to actually throw the exception

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense to me!

can we make this a sealed type? We should also implement SafeLoggable imo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is there much utility in having a base type at all here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see #25

@bjlaub bjlaub force-pushed the blaub/enforce-expiration branch from cb0248c to 1bfe002 Compare February 10, 2025 19:17
@bjlaub bjlaub changed the base branch from develop to blaub/add-exception-type February 10, 2025 19:17
@bjlaub bjlaub force-pushed the blaub/add-exception-type branch from 2756993 to 6a42e2e Compare February 11, 2025 17:59
@bjlaub bjlaub force-pushed the blaub/enforce-expiration branch from 1bfe002 to 0466b1c Compare February 12, 2025 17:30
@bjlaub bjlaub changed the base branch from blaub/add-exception-type to develop February 12, 2025 17:30
@changelog-app
Copy link

changelog-app bot commented Feb 12, 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

throw DeadlineExpiredException when deadline expiration is realized

Check the box to generate changelog(s)

  • Generate changelog entry

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.

2 participants