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

Add support for Konnect documents #336

Merged
merged 10 commits into from
Apr 30, 2021

Commits on Apr 21, 2021

  1. wip: add doc type and service

    Travis Raines committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    c422f51 View commit details
    Browse the repository at this point in the history
  2. wip: retrieve documents during dump

    Travis Raines committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    c86e9f3 View commit details
    Browse the repository at this point in the history
  3. wip: add document state

    Travis Raines committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    a5ee8ae View commit details
    Browse the repository at this point in the history
  4. wip: add document state and file handling poc

    Add basic state management and file output for Konnect Documents.
    Doesn't yet handle writing content to separate files.
    Travis Raines committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    7fe2f2a View commit details
    Browse the repository at this point in the history
  5. wip: write document content to files

    Write Document resources' content strings to files within directories
    generated from the Service Package Name and Service Version Version.
    
    This does not yet handle escaping "/" characters, which are permitted in
    Names and Versions.
    Travis Raines committed Apr 21, 2021
    Configuration menu
    Copy the full SHA
    e7d7ee2 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2021

  1. refactor: use parent interface for documents

    Replace the dedicated Service Version and Service Package functions for
    Documents with a generic ParentInfoer interface and associated
    functions.
    
    A ParentInfoer can indicate an API URL prefix that supports requests for
    associated child objects (e.g. the prefix "/api/service_packages"
    supports all Document interactions with the "/documents" suffix, as does
    "/api/service_versions") and can return the parent's ID and type, (to
    provide index keys in the state DB).
    
    Document state schema simplified to use a single foreign/parent object
    index. Parents are responsible for generating keys that do not conflict
    with other types of parents' keys.
    Travis Raines committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    2971f21 View commit details
    Browse the repository at this point in the history
  2. wip: remove leftover type

    Travis Raines committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    ed45831 View commit details
    Browse the repository at this point in the history
  3. wip: add doc state tests and touch up state funcs

    Add tests for document state management.
    
    Add additional document state functions for parity with other state
    types.
    
    Add additional error handling to existing document state functions.
    Travis Raines committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    5a9d677 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2021

  1. pr(file) refactor document writing

    - Only create a directory (once) if an SP or SV has an associated
      document.
    - Use OS-agnostic path functions.
    - Add a utility to escape path separators for entity fields we use as
      directory or file names.
    Travis Raines committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    575c8fa View commit details
    Browse the repository at this point in the history
  2. wip: disable stdin/stdout mode for Konnect cmds

    Konnect commands work with additional files when handling documents.
    This does not work nicely with stdin/stdout mode, as it'd send some
    output (the resource manifest/konnect.yaml) to stdout and some (document
    contents) to the filesystem. The simplest option to handle this is to
    disable this feature for Konnect commands.
    Travis Raines committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    653773c View commit details
    Browse the repository at this point in the history