Skip to content

Conversation

arjun4084346
Copy link
Contributor

@arjun4084346 arjun4084346 commented Jan 10, 2024

Dear Gobblin maintainers,

Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!

JIRA

Description

  • Here are some details about my PR, including screenshots (if applicable):
    fields isInstrumentationEnabled needs to be always enabled and eventSubmitter should always be present for GaaS to function. Removing Optional from them.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    trivial changes

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

@arjun4084346 arjun4084346 changed the title remove from the fields that are actually mandatory [GOBBLIN-1983] remove from the fields that are actually mandatory Jan 10, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2024

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (22248e4) 47.56% compared to head (f7f7cdf) 45.19%.

Files Patch % Lines
...in/service/modules/orchestration/Orchestrator.java 72.72% 5 Missing and 1 partial ⚠️
...modules/utils/FlowCompilationValidationHelper.java 0.00% 6 Missing ⚠️
...in/service/modules/core/GobblinServiceManager.java 88.88% 1 Missing ⚠️
...service/modules/orchestration/DagManagerUtils.java 50.00% 0 Missing and 1 partial ⚠️
.../modules/scheduler/GobblinServiceJobScheduler.java 0.00% 1 Missing ⚠️
.../service/monitoring/LocalFsJobStatusRetriever.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3855      +/-   ##
============================================
- Coverage     47.56%   45.19%   -2.38%     
+ Complexity    11068     5186    -5882     
============================================
  Files          2160     1088    -1072     
  Lines         85563    44311   -41252     
  Branches       9509     4856    -4653     
============================================
- Hits          40700    20026   -20674     
+ Misses        41154    22409   -18745     
+ Partials       3709     1876    -1833     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

markMeter(meter, 1);
}

public static void markMeter(Meter meter) {
Copy link
Contributor

Choose a reason for hiding this comment

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

where is this being used?

Copy link
Contributor

Choose a reason for hiding this comment

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

my related Q is whether we still require the Optional version or could replace them w/ this one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are many non-gaas callers to this method with Optional parameter, which may be providing parameter that is truly optional.

if (compiledDag == null || compiledDag.isEmpty()) {
if (compiledDag.isEmpty()) {
FlowCompilationValidationHelper.populateFlowCompilationFailedEventMessage(eventSubmitter, spec, flowMetadata);
Instrumented.markMeter(this.flowOrchestrationFailedMeter);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is used here, the parameter changed from Optional to X

Copy link
Contributor

@phet phet left a comment

Choose a reason for hiding this comment

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

nice cleanup, arjun!

markMeter(meter, 1);
}

public static void markMeter(Meter meter) {
Copy link
Contributor

Choose a reason for hiding this comment

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

my related Q is whether we still require the Optional version or could replace them w/ this one

import com.google.common.collect.Lists;
import com.google.common.io.Closer;

import javax.annotation.Nonnull;
Copy link
Contributor

@phet phet Jan 11, 2024

Choose a reason for hiding this comment

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

when I see:

Import order: java, org, com, gobblin.

here - https://gobblin.apache.org/docs/developer-guide/CodingStyle/

I presumed javax would follow java, not pop up between com and gobblin. are you sure this is supposed to move 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.

I do not do any import changes manually, intelliJ does it, hopefully based on the provided codestyle

* @param flowSpec
* @param optionalFlowExecutionId for scheduled (non-ad-hoc) flows, to pass the ID "laundered" via the DB;
* see: {@link MysqlMultiActiveLeaseArbiter javadoc section titled
* see: {@link org.apache.gobblin.runtime.api.MysqlMultiActiveLeaseArbiter javadoc section titled
Copy link
Contributor

@phet phet Jan 11, 2024

Choose a reason for hiding this comment

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

was this necessary? (I didn't see you remove an import)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just to fix javadoc

Copy link
Contributor

@phet phet left a comment

Choose a reason for hiding this comment

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

whew, what a relief to pare down all this out-of-date and out-of-use code - very nice!

@arjun4084346 arjun4084346 changed the title [GOBBLIN-1983] remove from the fields that are actually mandatory [GOBBLIN-1983] Remove Optionals to make DagManager, EventSubmitter, and TopologyCatalog required for GaaS operation Jan 12, 2024
@arjun4084346 arjun4084346 merged commit be12fd0 into apache:master Jan 12, 2024
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.

4 participants