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

report error creating cron #732

Merged
merged 18 commits into from
Jan 16, 2025
Merged

report error creating cron #732

merged 18 commits into from
Jan 16, 2025

Conversation

dtrager02
Copy link
Collaborator

@dtrager02 dtrager02 commented Dec 16, 2024

Context

Currently, initializing a job cluster with an incorrect cron schedule that cannot be parsed by Quartz silently errors with a warning log. We should return a response instead

Checklist

  • ./gradlew build compiles code correctly
  • Added new tests where applicable
  • ./gradlew test passes all tests
  • Extended README or added javadocs where applicable

Copy link

github-actions bot commented Dec 16, 2024

Test Results

622 tests  +2   612 ✅ +2   8m 5s ⏱️ +24s
142 suites ±0    10 💤 ±0 
142 files   ±0     0 ❌ ±0 

Results for commit 61a83fd. ± Comparison against base commit 86a0916.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 16, 2024

Uploaded Artifacts

To use these artifacts in your Gradle project, paste the following lines in your build.gradle.

resolutionStrategy {
    force "io.mantisrx:mantis-common-serde:0.1.0-20241221.001927-564"
    force "io.mantisrx:mantis-discovery-proto:0.1.0-20241221.001927-564"
    force "io.mantisrx:mantis-common:0.1.0-20241221.001927-564"
    force "io.mantisrx:mantis-client:0.1.0-20241221.001927-565"
    force "io.mantisrx:mantis-remote-observable:0.1.0-20241221.001927-565"
    force "io.mantisrx:mantis-runtime-executor:0.1.0-20241221.001927-100"
    force "io.mantisrx:mantis-network:0.1.0-20241221.001927-564"
    force "io.mantisrx:mantis-shaded:0.1.0-20241221.001927-563"
    force "io.mantisrx:mantis-runtime:0.1.0-20241221.001927-565"
    force "io.mantisrx:mantis-testcontainers:0.1.0-20241221.001927-234"
    force "io.mantisrx:mantis-rxcontrol:0.1.0-20241221.001927-38"
    force "io.mantisrx:mantis-connector-iceberg:0.1.0-20241221.001927-563"
    force "io.mantisrx:mantis-connector-job-source:0.1.0-20241221.001927-16"
    force "io.mantisrx:mantis-connector-kafka:0.1.0-20241221.001927-565"
    force "io.mantisrx:mantis-runtime-loader:0.1.0-20241221.001927-565"
    force "io.mantisrx:mantis-control-plane-core:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-control-plane-server:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-connector-publish:0.1.0-20241221.001927-564"
    force "io.mantisrx:mantis-control-plane-dynamodb:0.1.0-20241221.001927-25"
    force "io.mantisrx:mantis-control-plane-client:0.1.0-20241221.001927-564"
    force "io.mantisrx:mantis-examples-jobconnector-sample:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-examples-mantis-publish-sample:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-examples-sine-function:0.1.0-20241221.001927-557"
    force "io.mantisrx:mantis-examples-groupby-sample:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-examples-twitter-sample:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-examples-core:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-examples-wordcount:0.1.0-20241221.001927-557"
    force "io.mantisrx:mantis-publish-core:0.1.0-20241221.001927-557"
    force "io.mantisrx:mantis-server-agent:0.1.0-20241221.001927-557"
    force "io.mantisrx:mantis-examples-synthetic-sourcejob:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-server-worker-client:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-source-job-kafka:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-source-job-publish:0.1.0-20241221.001927-558"
    force "io.mantisrx:mantis-publish-netty:0.1.0-20241221.001927-557"
    force "io.mantisrx:mantis-publish-netty-guice:0.1.0-20241221.001927-558"
}

@@ -790,6 +792,10 @@ public void onJobClusterInitialize(JobClusterProto.InitializeJobClusterRequest i
cronManager = new CronManager(name, getSelf(), jobClusterMetadata.getJobClusterDefinition().getSLA());
} catch (Exception e) {
logger.warn("Exception initializing cron", e);
getSender().tell(new JobClusterManagerProto.CreateJobClusterResponse(
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe separate this catch to known error (SchedulerException) and other error (exception) and use different error code + message.

@dtrager02 dtrager02 had a problem deploying to Integrate Pull Request December 17, 2024 19:59 — with GitHub Actions Failure
@dtrager02 dtrager02 temporarily deployed to Integrate Pull Request December 17, 2024 22:33 — with GitHub Actions Inactive
@dtrager02 dtrager02 deployed to Integrate Pull Request December 19, 2024 00:53 — with GitHub Actions Active
@dtrager02 dtrager02 had a problem deploying to Integrate Pull Request December 21, 2024 00:28 — with GitHub Actions Failure
@Andyz26 Andyz26 requested a deployment to Integrate Pull Request January 15, 2025 17:14 — with GitHub Actions Waiting
getSender().tell(new JobClusterManagerProto.CreateJobClusterResponse(
initReq.requestId, e instanceof SchedulerException?CLIENT_ERROR:SERVER_ERROR,
"Job Cluster " + jobClusterName + " could not be created due to cron initialization error" + e.getMessage(),
jobClusterName), getSelf());
Copy link
Collaborator

Choose a reason for hiding this comment

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

in this case don't you want to stop here and not initRunning workers?

@dtrager02 dtrager02 requested a deployment to Integrate Pull Request January 16, 2025 17:17 — with GitHub Actions Waiting
@dtrager02 dtrager02 requested a deployment to Integrate Pull Request January 16, 2025 17:49 — with GitHub Actions Waiting
@dtrager02 dtrager02 merged commit 2de4671 into master Jan 16, 2025
6 of 7 checks passed
@dtrager02 dtrager02 deleted the cron-error-reporting branch January 16, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants