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

[FAI-13685] Write config/catalog files #97

Merged
merged 5 commits into from
Nov 20, 2024
Merged

Conversation

jeniii
Copy link
Contributor

@jeniii jeniii commented Nov 20, 2024

Description

Provide description here

  • add writeConfig
    • write a config file for user reference
    • write config files to tmp dir
    • write catalog files to tmp dir

discover catalog and redact secrets will be covered in another ticket

Type of change

  • Bug fix
  • New feature
  • Breaking change

expect(existsSync(`${tmpDirPath}/state.json`)).toBe(true);
expect(readFileSync(`${tmpDirPath}/state.json`, 'utf8')).toBe('{}');
});
describe('loadStateFile', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

didn't change these tests. just wrap it in another describe

logger.debug(`Airbyte config files written to: ${srcConfigFilePath}, ${dstConfigFilePath}`);

// write catalog to temporary directory catalog files
// TODO: @FAI-14134 Discover catalog
Copy link
Contributor Author

Choose a reason for hiding this comment

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

discover catalog will be covered in another ticket as we need to spin up docker

@tovbinm tovbinm removed their request for review November 20, 2024 01:29
airbyteConfig.src.catalog &&
Object.keys(airbyteConfig.src.catalog).length > 0
) {
airbyteConfig.dst.catalog = airbyteConfig.src.catalog;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is ok for now, but be prepared for logic generate a destination-compatible catalog based on the src catalog. It has slightly different format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ohhhh i see. thanks for the heads up

@jeniii jeniii merged commit 625b0bc into main Nov 20, 2024
5 checks passed
@jeniii jeniii deleted the jg/ts-cli-write-config branch November 20, 2024 19:07
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants