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

fix issue #332: updated to return JobRunRow #390

Closed

Conversation

Violet-XiaoWeiHuang
Copy link
Contributor

@Violet-XiaoWeiHuang Violet-XiaoWeiHuang commented Mar 6, 2019

HI @wslulciuc,
please review this Return JobRunRow on JobRunRowMapper.map(), for #332
Tx

@wslulciuc
Copy link
Member

@Violet-XiaoWeiHuang, thanks for the help! I noticed the CI build is failing. Are you able to run the following cmd successfully locally on your machine?

$ ./gradlew compileJava

@Violet-XiaoWeiHuang
Copy link
Contributor Author

No,
`> Task :compileJava FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileJava'.

Could not find tools.jar. Please check that /usr/lib/jvm/java-8-openjdk-amd64 contains a valid JDK installation.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s
1 actionable task: 1 executed`

@wslulciuc
Copy link
Member

Are you sure you have the JDK installed? see: https://openjdk.java.net/install

@Violet-XiaoWeiHuang
Copy link
Contributor Author

Violet-XiaoWeiHuang commented Mar 6, 2019

yeah,
I tried you link to update to install the openjdk.
When I tried ./gradlew compileJava, it shows the same issue. I consider my Ubuntu is built on top of W10, I had to use the server to run the test.

I digged further about JobRun and JobRunRow. They have different members, I cannot just change the return to new JobRunRow
@wslulciuc

@wslulciuc
Copy link
Member

wslulciuc commented Mar 7, 2019

I digged further about JobRun and JobRunRow. They have different members, I cannot just change the return to new JobRunRow

Yeah, updating the return type of the mapper is slightly more involved than a simple class rename. The issue doesn't go into the specifics, but you'd eventually run into complication errors once you renamed the class. We want to make sure any class using the mapper are also update along with your PR.

Let me know if you need help on next steps, or if you got it from here. Happy to clarify if needed!

@Violet-XiaoWeiHuang
Copy link
Contributor Author

Violet-XiaoWeiHuang commented Mar 18, 2019

I want continue on it.
I compare the members in JobRunRow() and JobRunRowMapper.map(), some of them are different.

@Getter @NonNull private final UUID uuid;
@Getter @NonNull private final Instant createdAt;
@Getter @NonNull private final Instant updatedAt;
@Getter @NonNull private final UUID jobVersionUuid;
@Getter @NonNull private final String currentRunState;
@Getter @NonNull private final List<UUID> inputDatasetVersionUuids;
@Getter @NonNull private final List<UUID> outputDatasetVersionUuids;
private final Instant nominalStartTime;
private final Instant nominalEndTime;

results.getObject(Columns.ROW_UUID, UUID.class),
results.getInt(Columns.CURRENT_RUN_STATE),
results.getObject(Columns.JOB_VERSION_UUID, UUID.class),
results.getString(Columns.RUN_ARGS_CHECKSUM),
results.getString(Columns.RUN_ARGS),
results.getTimestamp(Columns.NOMINAL_START_TIME),
results.getTimestamp(Columns.NOMINAL_END_TIME),
results.getTimestamp(Columns.CREATED_AT));

How could i deal with them? Thank you. @wslulciuc

@wslulciuc
Copy link
Member

I compare the members in JobRunRow() and JobRunRowMapper.map(), some of them are different.

@Violet-XiaoWeiHuang: Currently, there are fields in JobRun that are specific to a job run row (job_version_uuid, row_uuid, etc). That's not ideal, and they should be removed from JobRun and only be contained within a JobRunRow. I'm also realizing, as I'm thinking about the sort of changes required to merge this feature, it's fairly involved and requires knowledge of our DB schema. I personally feel this isn't an issue we are ready to tackle just yet, and one that requires far more detail than is outlined in #332 (mostly likely an epic).

In the meantime, I recommend reviewing our DB schema and app structure (see below). Would you be interested in picking up another issue?

Resources

@wslulciuc
Copy link
Member

@Violet-XiaoWeiHuang: I'm going to close this PR for now, but we'll want add these changes (eventually). Thank you again for helping out and tacking the issue!

@wslulciuc wslulciuc closed this Apr 11, 2019
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.

None yet

2 participants