Skip to content

Commit 9ece7a9

Browse files
committed
fix: Return all values
Signed-off-by: Javier Aliaga <[email protected]>
1 parent b7c0205 commit 9ece7a9

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/scripts/test-info.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -874,13 +874,14 @@ const components = {
874874
* Returns the list of components for the matrix.
875875
* @param {'conformance'|'certification'} testKind Kind of test
876876
* @param {boolean} enableCloudTests If true, returns components that require secrets or credentials too (which can't be used as part of the regular CI in a PR)
877+
* @param {string} pattern If present, returns components includes the pattern
877878
* @returns {TestMatrixElement[]} Test matrix object
878879
*/
879-
function GenerateMatrix(testKind, enableCloudTests) {
880+
function GenerateMatrix(testKind, enableCloudTests, pattern) {
880881
/** @type {TestMatrixElement[]} */
881882
const res = []
882883
for (const name in components) {
883-
if (!name.includes('dynamodb') ){
884+
if (pattern && !name.includes(pattern) ){
884885
continue
885886
}
886887
const comp = components[name]
@@ -966,7 +967,8 @@ if (argv.length < 4 || !['true', 'false'].includes(argv[3])) {
966967

967968
const testKind = argv[2]
968969
const enableCloudTests = argv[3] == 'true'
969-
const matrixObj = GenerateMatrix(testKind, enableCloudTests)
970+
const pattern = argv[4] || ''
971+
const matrixObj = GenerateMatrix(testKind, enableCloudTests, pattern)
970972
console.log('Generated matrix:\n\n' + JSON.stringify(matrixObj, null, ' '))
971973

972974
writeFileSync(env.GITHUB_OUTPUT, 'test-matrix=' + JSON.stringify(matrixObj))

state/aws/dynamodb/dynamodb.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,12 @@ func (d *StateStore) Multi(ctx context.Context, request *state.TransactionalStat
479479
}
480480
twi.Put = pd.ToPut()
481481
if twi.Put.ConditionExpression != nil {
482-
twi.ConditionCheck.ReturnValuesOnConditionCheckFailure = types.ReturnValuesOnConditionCheckFailureAllOld
482+
twi.ConditionCheck = &types.ConditionCheck{
483+
Key: twi.Put.Item,
484+
ConditionExpression: twi.Put.ConditionExpression,
485+
TableName: ptr.Of(d.table),
486+
ReturnValuesOnConditionCheckFailure: types.ReturnValuesOnConditionCheckFailureAllOld,
487+
}
483488
}
484489
case state.DeleteRequest:
485490
twi.Delete = &types.Delete{

0 commit comments

Comments
 (0)