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

GH-1578 TerraDataRepoSource filters old rows before reducing #560

Merged
merged 3 commits into from
Jan 25, 2022

Conversation

okotsopoulos
Copy link
Contributor

Purpose

Addresses an edge case bug when TerraDataRepoSource polls for new rows to snapshot.

The desired behavior: if a snapshot creation job fails, we should automatically reconsider its rows for snapshotting until they are snapshotted successfully or they age out of our 2 hour check window.

Bug: if a workload's first snapshot creation job fails, we did not reconsider its rows for snapshotting.

Fix: filter old snapshot creation job rows by status prior to reducing to a single object with all old row IDs. This filtration previously took place within the reduction, but If you pass a singleton sequence to reduce it is returned as it's passed in. https://clojuredocs.org/clojure.core/reduce

@okotsopoulos
Copy link
Contributor Author

System tests pass:

wm111-e35:wfl okotsopo$ make TARGET=system
export CPCACHE=/Users/okotsopo/wfl/api/.cpcache;            \
	export WFL_WFL_URL=http://localhost:3000; \
	clojure  -M:parallel-test wfl.system.v1-endpoint-test | \
	tee /Users/okotsopo/wfl/derived/api/system.log
WARNING: Specified path is external to project: ../derived/api/src
WARNING: Specified path is external to project: ../derived/api/resources

Ran 32 tests containing 367 assertions.
0 failures, 0 errors.

api/src/wfl/source.clj Show resolved Hide resolved
api/test/wfl/unit/source_test.clj Show resolved Hide resolved
@okotsopoulos okotsopoulos merged commit aeb21d5 into develop Jan 25, 2022
@okotsopoulos okotsopoulos deleted the okotsopo/GH-1578-tdr-source-old-row-filtration branch January 25, 2022 16:57
okotsopoulos added a commit that referenced this pull request Feb 2, 2022
GH-1539 Stop started workloads in system tests (#562)
GH-1563 GH-1573 TerraDataRepoSource polls row metadata table (#559)
GH-1433 Test TDR snapshot creation within temporary dataset (#561)
GH-1578 TerraDataRepoSource filters old rows before reducing (#560)
GH-1542 TerraExecutor notifies Slack watchers on workflow completion (#553)
okotsopoulos added a commit that referenced this pull request Feb 9, 2022
GH-1539 Stop started workloads in system tests (#562)
GH-1563 GH-1573 TerraDataRepoSource polls row metadata table (#559)
GH-1433 Test TDR snapshot creation within temporary dataset (#561)
GH-1578 TerraDataRepoSource filters old rows before reducing (#560)
GH-1542 TerraExecutor notifies Slack watchers on workflow completion (#553)
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