Skip to content

Enable force continuations mode on all YamlIntegrationTests #3228

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

Merged
merged 69 commits into from
Mar 7, 2025

Conversation

alecgrieser
Copy link
Collaborator

This updates the YamlIntegrationTests so that they all run in "force continuations" mode. That means we get additional insight into how continuation handling works in those cases.

This mostly accomplishes #3204. There are a few lingering queries that have not been moved over due to: #3206. In addition, several tests only run with force continuations on newer versions. However, the majority of queries have at least some coverage of up-level and down-level testing for continuations to cover the issues identified as a part of this process.

ohadzeliger and others added 30 commits February 20, 2025 16:09
# Conflicts:
#	yaml-tests/src/test/resources/prepared.yamsql
- Received continuation shouldn't be at beginning
- Initial version
commit 9a8192c
Author: Alec Grieser <agrieser@apple.com>
Date:   Thu Feb 27 11:27:53 2025 +0000

    update bitmap-aggregate-index.yamsql using new feature and enable force_continuations

commit 169e582
Author: Alec Grieser <agrieser@apple.com>
Date:   Thu Feb 27 10:09:05 2025 +0000

    fix up failing MultiServerConnectionFactoryTest to use SemanticVersions instead of Strings

commit fe4602f
Merge: 7d61714 8a3c17f
Author: Alec Grieser <agrieser@apple.com>
Date:   Wed Feb 26 18:56:11 2025 +0000

    Merge remote-tracking branch 'upstream/main' into 03114-fine-grained-multi-version

commit 7d61714
Author: Alec Grieser <agrieser@apple.com>
Date:   Wed Feb 26 18:52:10 2025 +0000

    combine CodeVersion implementations into SemanticVersion

commit 8a3c17f
Author: Alec Grieser <agrieser@apple.com>
Date:   Wed Feb 26 18:31:21 2025 +0000

    Run the PR label check whenever the HEAD commit changes to ensure it is applied to the final commit of each PR (FoundationDB#3195)

    This makes sure the PR label check is run every time the commit changes
    on a PR. Strictly speaking, this seems like it shouldn't be necessary,
    but if it isn't added, then the check may not be applied to the final
    commit in a PR, which in turn means that the check won't be there to
    block a PR missing an appropriate label.

commit 993a9b4
Author: Alec Grieser <agrieser@apple.com>
Date:   Wed Feb 26 17:53:40 2025 +0000

    Address comments from @sdugas:

    * Use CodeVersion class in more places
    * Add tests for !current_version in the initial-version yaml tests
    * Remove vestigial weirdness from previous iterations of this code
    * Update YAML-SQL.xml with the new syntax

commit 25a0c2a
Author: Alec Grieser <agrieser@apple.com>
Date:   Wed Feb 26 11:47:25 2025 +0000

    update so that we parse CodeVersion sooner in more places

commit 7a9f978
Merge: 5c5a9c5 d736d89
Author: Alec Grieser <agrieser@apple.com>
Date:   Tue Feb 25 19:05:44 2025 +0000

    Merge remote-tracking branch 'upstream/main' into 03114-fine-grained-multi-version

commit 5c5a9c5
Author: Alec Grieser <agrieser@apple.com>
Date:   Tue Feb 25 19:05:23 2025 +0000

    move the concept of \"current_version\" out of `SemanticVersion`

commit 376f08b
Author: Alec Grieser <agrieser@apple.com>
Date:   Mon Feb 24 19:49:32 2025 +0000

    fix up failing tests

commit 360e006
Author: Alec Grieser <agrieser@apple.com>
Date:   Mon Feb 24 19:37:43 2025 +0000

    mark SUPPORTED as final

commit 131742d
Author: Alec Grieser <agrieser@apple.com>
Date:   Mon Feb 24 19:29:22 2025 +0000

    handle some merge skew

commit 48bb24e
Author: Alec Grieser <agrieser@apple.com>
Date:   Mon Feb 24 19:14:44 2025 +0000

    remove weird contains in favor of equals

commit 2345d3f
Author: Alec Grieser <agrieser@apple.com>
Date:   Mon Feb 24 19:14:36 2025 +0000

    make recursive cte supported_versions more precise

commit 918afd9
Author: Alec Grieser <agrieser@apple.com>
Date:   Mon Feb 24 18:55:42 2025 +0000

    * Add test casese for the initial version configurations to validate tests get run
    * Make sure that the versions specified are comprehensive

commit 4f792a6
Author: Alec Grieser <agrieser@apple.com>
Date:   Mon Feb 24 14:41:50 2025 +0000

    restore requirement that supported_version is first non-query command

commit ae86f93
Author: Alec Grieser <agrieser@apple.com>
Date:   Mon Feb 24 14:19:48 2025 +0000

    base version config checking off of runtime determination

commit 263d71f
Author: Alec Grieser <agrieser@apple.com>
Date:   Mon Feb 24 11:24:21 2025 +0000

    back out changes to have connection factory support initial version

commit c3ff258
Author: Alec Grieser <agrieser@apple.com>
Date:   Fri Feb 21 17:49:21 2025 +0000

    update recursive cte supported version

commit 228d6b5
Author: Alec Grieser <agrieser@apple.com>
Date:   Fri Feb 21 16:37:30 2025 +0000

    revert yaml-tests.gradle to main

commit fec41c9
Author: Alec Grieser <agrieser@apple.com>
Date:   Fri Feb 21 16:04:23 2025 +0000

    fix up mixed mode tests in way that shows new configs

commit 529ae67
Author: Alec Grieser <agrieser@apple.com>
Date:   Fri Feb 21 15:46:46 2025 +0000

    update MultiServerConnectionFactory so it is reset for every query

commit 869f6d4
Author: Alec Grieser <agrieser@apple.com>
Date:   Fri Feb 21 14:53:43 2025 +0000

    add framework for choosing results by version

commit 3a1fb3f
Author: Alec Grieser <agrieser@apple.com>
Date:   Thu Feb 20 18:15:33 2025 +0000

    abandon plans to have multiple supported version options

commit 6e8d089
Author: Alec Grieser <agrieser@apple.com>
Date:   Fri Feb 7 15:53:12 2025 +0000

    * Add YamlExecutionContext state about the initial version chosen for each query
    * Modify the SupportedVersionCheck parsing so that it can accept multiple fields and doesn't need to be the first config
commit c6b7cc0
Author: Scott Dugas <sdugas@apple.com>
Date:   Fri Feb 28 12:16:35 2025 -0500

    Another test and referencing issue FoundationDB#3216

    I figured out the proper behavior, and updated the comments when
    pattern is just an escape character.

commit 545ba60
Author: Scott Dugas <sdugas@apple.com>
Date:   Fri Feb 28 10:44:13 2025 -0500

    Set supported_version for like.yamsql

commit 63eb20f
Author: Scott Dugas <sdugas@apple.com>
Date:   Thu Feb 27 17:04:02 2025 -0500

    Add some LIKE tests with single letter patterns

    This adds some tests of LIKE queries that have single letter patterns
    that actually match things. This is an effort to see if there are
    other oddities in this area.

commit 582f498
Author: Scott Dugas <sdugas@apple.com>
Date:   Thu Feb 27 17:03:15 2025 -0500

    Improve error messages when failing to parse blocks

    I forgot to put my test_blocks in separate documents, and this
    helped me find my mistake.

commit 9f8acdf
Author: Scott Dugas <sdugas@apple.com>
Date:   Thu Feb 27 16:03:51 2025 -0500

    Fix continuation parsing for LIKE operators

    Previously, it would parse the query as the escape character, making
    continuations useless.
    i.e. `LIKE 'XYZ' ESCAPE 'XYZ'`, regardless of what the original
    query had for the escape character, if it had one.

    This Resolves: FoundationDB#3099
@alecgrieser
Copy link
Collaborator Author

alecgrieser commented Mar 5, 2025

The current Java code includes squash merges of #3221 and #3207. Once those go in, we should be able to merge those changes in and limit the Java changes to just some small changes in yaml-tests.

@alecgrieser alecgrieser added the testing improvement Change that improves our testing label Mar 5, 2025
@alecgrieser alecgrieser requested review from normen662 and removed request for ohadzeliger March 5, 2025 18:49
@alecgrieser alecgrieser marked this pull request as ready for review March 6, 2025 15:05
-
- query: SELECT bitmap_construct_agg(bitmap_bit_position(id)) as bitmap, category, bitmap_bucket_offset(id) as offset FROM T2 GROUP BY category, bitmap_bucket_offset(id)
- supported_version: !current_version
- explain: "ISCAN(AGG_INDEX_2 <,>) | MAP (_ AS _0) | AGG (bitmap_construct_agg_l((_._0.ID) bitmap_bit_position 10000) AS _0) GROUP BY (_._0.CATEGORY AS _0, (_._0.ID) bitmap_bucket_offset 10000 AS _1) | MAP (_._1._0 AS BITMAP, _._0._0 AS CATEGORY, _._0._1 AS OFFSET)"
- unorderedResult: [{BITMAP: xStartsWith_1250'0200004', 'CATEGORY': 'hello', 'OFFSET':0},
{BITMAP: xStartsWith_1250'02', 'CATEGORY': 'hello', 'OFFSET':10000},
{BITMAP: xStartsWith_1250'0400008', 'CATEGORY': 'world', 'OFFSET':0}]
-
# Copy of the previous but query, but disable force_continuation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Copy of the previous but query, but disable force_continuation.
# Copy of the previous query, but disable force_continuation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

* Removes setting of `single_repetition_ordered`
* Adds additional explains for more queries
* Removes force_continuations exclusions where possible
Copy link
Collaborator

@ScottDugas ScottDugas left a comment

Choose a reason for hiding this comment

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

Note: I did not attempt validate that the explains are doing the right thing, or that the metrics are correct.

Co-authored-by: Scott Dugas <scott.dugas@gmail.com>
@alecgrieser
Copy link
Collaborator Author

As I was going through, I noticed one test that had been mis-labeled (the error was something else). I was able to add a cross-version test for it, though only for upgrading continuations, and also updated the tagged issue.

@alecgrieser alecgrieser merged commit f682fa6 into FoundationDB:main Mar 7, 2025
5 checks passed
@alecgrieser alecgrieser deleted the enable-force-continuations branch March 7, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing improvement Change that improves our testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants