Skip to content

Add --runs-per-job, --max-run-fails-per-job, and more to metadata cmd#2923

Merged
wslulciuc merged 12 commits into
mainfrom
feature/cmd-for-event-time-override
Oct 15, 2024
Merged

Add --runs-per-job, --max-run-fails-per-job, and more to metadata cmd#2923
wslulciuc merged 12 commits into
mainfrom
feature/cmd-for-event-time-override

Conversation

@wslulciuc

@wslulciuc wslulciuc commented Oct 11, 2024

Copy link
Copy Markdown
Member

This PR adds the following cmd line args to cli.MetadataCommand used to seed the Marquez backend for future functional testing:

Screenshot 2024-10-14 at 6 14 03 PM

CLI Args

--jobs

limits OL jobs up to N (default: 5) -- replaces `--runs`

--runs-per-job

 limits OL run executions per job up to N (default: 10)

--runs-active

limits OL run executions marked as active (='RUNNING') up to N

--max-run-fails-per-job

 maximum OL run fails per job (default: 2)

--min-run-duration

minimum OL run duration (in seconds) per execution (default: 300)

--max-run-duration

maximum OL run duration (in seconds) per execution (default: 900)

--run-start-time

 specifies the OL run start time in UTC ISO ('YYYY-MM-DDTHH:MM:SSZ');
 used for the initial OL run, with subsequent runs starting relative to the
initial start time. (default: 2024-10-15T01:00:11.080828Z)

--run-end-time

specifies the OL run end time in UTC ISO ('YYYY-MM-DDTHH:MM:SSZ');
used for the initial OL run, with subsequent runs ending relative to the
initial end time. (default: 2024-10-15T01:07:25.080828Z)

Example

java -jar marquez.jar metadata \
  --jobs 10 \
  --runs-per-job 5 \
  --max-run-fails-per-job 2
Generating runs '5' per job, each COMPLETE/FAIL run event will have a size of '~33404' (bytes)...
Writing '100' events to: 'metadata.json'

output: metadata.json

Bugs

This PR also fixes the following bugs:

  • Display last N runs for job in dashboard page; replaces randomized run durations
  • Orders N runs for job in dashboard page as ascending
  • Fix latest run state color to use runStateColor() for job display page

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
@boring-cyborg boring-cyborg Bot added the api API layer changes label Oct 11, 2024
@wslulciuc wslulciuc added this to the 0.50.0 milestone Oct 11, 2024
@netlify

netlify Bot commented Oct 11, 2024

Copy link
Copy Markdown

Deploy Preview for peppy-sprite-186812 canceled.

Name Link
🔨 Latest commit 732cd3f
🔍 Latest deploy log https://app.netlify.com/sites/peppy-sprite-186812/deploys/670eaae645c6dd0008e1ca38

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
@codecov

codecov Bot commented Oct 11, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 6.38298% with 132 lines in your changes missing coverage. Please review.

Project coverage is 81.12%. Comparing base (db4fbfa) to head (732cd3f).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api/src/main/java/marquez/cli/MetadataCommand.java 6.38% 132 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2923      +/-   ##
============================================
- Coverage     82.21%   81.12%   -1.10%     
- Complexity     1504     1505       +1     
============================================
  Files           268      268              
  Lines          7253     7358     +105     
  Branches        324      330       +6     
============================================
+ Hits           5963     5969       +6     
- Misses         1129     1228      +99     
  Partials        161      161              

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

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
Comment thread api/src/main/java/marquez/cli/MetadataCommand.java

@phixMe phixMe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
@boring-cyborg boring-cyborg Bot added the web label Oct 14, 2024
Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
@wslulciuc wslulciuc marked this pull request as ready for review October 15, 2024 01:07
@wslulciuc wslulciuc requested a review from phixMe October 15, 2024 01:07
@wslulciuc wslulciuc changed the title Add --run-duration and --event-time Add --runs-per-job, --max-run-fails-per-job, and more to metadata cmd Oct 15, 2024
@phixMe

phixMe commented Oct 15, 2024

Copy link
Copy Markdown
Member

Is there any way to get a job in running status so that we could look at those states. Maybe a flag could be added as, current-job-running?

@phixMe

phixMe commented Oct 15, 2024

Copy link
Copy Markdown
Member

It also looks like you need to clean up a CI error on the web project.

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
@wslulciuc

wslulciuc commented Oct 15, 2024

Copy link
Copy Markdown
Member Author

Is there any way to get a job in running status so that we could look at those states. Maybe a flag could be added as, current-job-running?

Do you mean to print out a list of jobs / runIDs to the terminal after running the cmd? Hmm you mean to have job runs in a RUNNING state?

@phixMe

phixMe commented Oct 15, 2024

Copy link
Copy Markdown
Member

Is there any way to get a job in running status so that we could look at those states. Maybe a flag could be added as, current-job-running?

Do you mean to print out a list of jobs / runIDs to the terminal after running the cmd? Hmm you mean to have job runs in a RUNNING state?

Yes, to let the last run for remain in running state...

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
@wslulciuc wslulciuc enabled auto-merge (squash) October 15, 2024 17:33
Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
@wslulciuc wslulciuc merged commit bc74ef9 into main Oct 15, 2024
@wslulciuc wslulciuc deleted the feature/cmd-for-event-time-override branch October 15, 2024 17:57
jonathanpmoraes referenced this pull request in nubank/NuMarquez Feb 6, 2025
…a` cmd (#2923)

* Add `--run-duration` and `--event-time`

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>

* Apply formatting

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>

* Add `--event-start-time` and `--event-end-time`

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>

* Add support for `X` runs + durations

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>

* Fix last `N` runs display

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>

* Sort events by event time

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>

* Use `--jobs`

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>

* Apply lint on web

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>

* Add `--runs-active`

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>

* Fix runs ordering for jobs

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>

---------

Signed-off-by: Willy Lulciuc <willy.lulciuc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API layer changes web

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants