Skip to content

Conversation

Copy link

Copilot AI commented Jul 16, 2025

This PR adds support for multiple tuple files in OpenFGA store configuration files, as specified in the OpenFGA CLI changes.

Changes Made

New Features

  • tuple_files Support: Added validation for tuple_files arrays alongside existing tuple_file support
  • Enhanced File Extension Validation: Both tuple_file and tuple_files now validate supported extensions (.json, .yaml, .yml, .csv, .jsonl)
  • Global and Test Scope: Works at any level in YAML structure (global scope or within individual tests)

Implementation Details

  • Added validateTupleFileExtension() helper function to check supported file extensions
  • Extended YAML visitAsync traversal to handle tuple_files arrays with proper validation
  • Maintains consistent error reporting patterns with existing code
  • Preserves full backward compatibility with existing tuple_file functionality

Example Usage

Global scope with multiple files:

name: My Store
model: |
  # model definition
tuple_files:
  - tuples.json
  - more_tuples.yaml
  - additional_tuples.jsonl
  - extra_tuples.csv

Test scope with tuple files:

tests:
  - name: test-1
    tuple_files:
      - test_tuples.json
      - test_data.yaml
    check:
      # test assertions

Validation

  • Invalid file extensions now show clear error messages
  • File existence validation works for all supported formats
  • Both single tuple_file and array tuple_files are properly validated

The implementation uses the existing YAML document traversal mechanism, ensuring it automatically works at any level in the YAML structure without additional complexity.

Fixes #380.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: node /home/REDACTED/work/vscode-ext/vscode-ext/client/out/test/runTest (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 16, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Copilot AI changed the title [WIP] Support Multiple Tuple Files in the store file Support Multiple Tuple Files in Store Configuration Jul 16, 2025
Copilot AI requested a review from aaguiarz July 16, 2025 01:49
Copilot finished work on behalf of aaguiarz July 16, 2025 01:49
@lukaszgryglicki
Copy link

PR implementing support for skipping CLA for bots here: linuxfoundation/easycla#4729, this feature was requested in linuxfoundation/easycla#4701.

@lukaszgryglicki
Copy link

/easycla

1 similar comment
@lukaszgryglicki
Copy link

/easycla

@lukaszgryglicki
Copy link

EasyCLA now passes after adding feature requested in linuxfoundation/easycla#4701 and implemented by linuxfoundation/easycla#4729 release in https://github.com/linuxfoundation/easycla/releases/tag/v2.0.185 release.

@lukaszgryglicki
Copy link

/easycla

4 similar comments
@lukaszgryglicki
Copy link

/easycla

@lukaszgryglicki
Copy link

/easycla

@lukaszgryglicki
Copy link

/easycla

@lukaszgryglicki
Copy link

/easycla

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.

Support Multiple Tuple Files in the store file

3 participants