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

Release candidate/2024 07 #142

Merged
merged 2 commits into from
Jul 17, 2024
Merged

Release candidate/2024 07 #142

merged 2 commits into from
Jul 17, 2024

Commits on Jul 10, 2024

  1. Add codegen script and update generated code for 2024-07 (#140)

    ## Problem
    
    Need to update generated code for the upcoming 2024-07 API release.
    
    ## Solution
    
    This PR closely follows the approach used in the python and typescript
    repositories.
    
    - I create a new `codegen` directory to act as the home for everything
    codegen related. Inside this directory there are several things:
      - Git submodule of our apis repo
    - A `build-oas.sh` script which does everything to generate the code off
    the spec
    
    The script does the following:
    - Pulls in the latest from the apis repo
    - Builds the api repo to produce versioned spec files
    - Generates java code off the spec file.
    - Copies files into their respective places in `src/`
    
    Run the script like this, passing api version number as a positional
    argument:
    
    ```sh
    ./codegen/build-oas.sh 2024-07
    ```
    
    ## Non-generated changes
    
    The updated spec produced slightly different generated code than in the
    past. In order for the project to compile, I had to make some
    adjustments:
    
    - Options for metric type are now part of the `IndexModel` class instead
    of a standalone metric object, requiring a small refactor along the
    lines of `IndexMetric.COSINE.toString()` to
    `IndexModel.MetricEnum.COSINE.toString()` and similar for other metric
    types.
    - The name and organization of create index spec objects has changed.
    Now you use:
      - `IndexSpec` instead of `CreateInexRequestSpec`.
      - `PodSpec` instead of `CreateIndexRequestSpecPod`
    - `PodSpecMetadataConfig` instead of
    `CreateIndexRequestSpecPodMetadataConfig`
    
    ## Type of Change
    
    - [x] None of the above: Update generated core, adjust usage for new
    generated classes
    
    ## Test Plan
    
    Code builds and tests pass
    jhamon authored Jul 10, 2024
    Configuration menu
    Copy the full SHA
    3411d21 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2024

  1. Add support for deletion protection (#141)

    ## Problem
    
    Add support for deletion protection.
    
    ## Solution
    
    Generated code using the following commands: 
    ```
    git submodule init && git submodule update
    ./codegen/build-oas.sh 2024-07
    ```
    Next, as a part of this PR, I have: 
    1. Added deletionProtection enum as an argument to createPodsIndex() and
    createServerlessIndex()
    2. Renamed configureIndex() to configurePodsIndex() and added
    deletionProtection enum as an argument.
    3. Added configureServerlessIndex() that accepts deletionProtection enum
    only.
    
    
    ## Type of Change
    
    - [X] New feature (non-breaking change which adds functionality)
    
    ## Test Plan
    
    Added integration tests
    rohanshah18 authored Jul 17, 2024
    Configuration menu
    Copy the full SHA
    2ce9ac5 View commit details
    Browse the repository at this point in the history