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

Error while passing arguments in CTR with large the same Task (above 9) #5525

Closed
szopal opened this issue Oct 23, 2023 · 1 comment
Closed
Assignees
Labels
type/bug Is a bug report

Comments

@szopal
Copy link

szopal commented Oct 23, 2023

I have noticed bug in CTR - I define CTR with task name mytask and flow:

d1: mytask && d2: mytask && d3: mytask && d4: mytask && d5: mytask && d6: mytask && d7: mytask && d8: mytask && d9: mytask && d10: mytask && d11: mytask && d12: mytask && d13: mytask && d14: mytask && d15: mytask && d16: mytask && d17: mytask && d18: mytask && d19: mytask && d20: mytask

When I pass arguments:

app.d1.0=my-date=2023-01-01
app.d10.0=my-date=2023-01-10
app.d11.0=my-date=2023-01-11
app.d12.0=my-date=2023-01-12
app.d13.0=my-date=2023-01-13
app.d14.0=my-date=2023-01-14
app.d15.0=my-date=2023-01-15
app.d16.0=my-date=2023-01-16
app.d17.0=my-date=2023-01-17
app.d18.0=my-date=2023-01-18
app.d19.0=my-date=2023-01-19
app.d2.0=my-date=2023-01-02
app.d20.0=my-date=2023-01-20
app.d3.0=my-date=2023-01-03
app.d4.0=my-date=2023-01-04
app.d5.0=my-date=2023-01-05
app.d6.0=my-date=2023-01-06
app.d7.0=my-date=2023-01-07
app.d8.0=my-date=2023-01-08
app.d9.0=my-date=2023-01-09

It's not working correctly because i.e. task d1 get all arguments which contains d1 taskId - I analyze CTR code and find this:

		List<String> argumentsFromAppProperties = Base64Utils
			.decodeMap(this.composedTaskProperties.getComposedTaskAppArguments()).entrySet().stream()
			.filter(e -> e.getKey().startsWith("app." + taskNameId) || e.getKey().startsWith("app.*."))
			.map(e -> e.getValue())
			.collect(Collectors.toList());

.filter(e -> e.getKey().startsWith("app." + taskNameId) || e.getKey().startsWith("app.*."))

where arguments are filter by key start value - so task d1 had got all arguments which should only be passed to task d12, d13, d14, d15 etc. because argument key i.e:

app.d10.0=my-date=2023-01-14

contain taskId - d1.

I think, it should be filter with period:

|| e.getKey().startsWith("deployer." + taskNameId + ".") || e.getKey().startsWith("deployer.*"))

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Oct 23, 2023
@corneil
Copy link
Contributor

corneil commented Oct 23, 2023

Thank you for catching this one.

@cppwfs cppwfs added type/bug Is a bug report and removed status/need-triage Team needs to triage and take a first look labels Oct 23, 2023
@corneil corneil self-assigned this Oct 23, 2023
corneil pushed a commit that referenced this issue Oct 23, 2023
* Ensure that logs that are unavailable don't throw exceptions but returns an empty string

* Fix CTR duplicating properties on similar names.
#5525
corneil pushed a commit that referenced this issue Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Is a bug report
Projects
None yet
Development

No branches or pull requests

3 participants