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

Feature/python sync actions #181

Merged
merged 78 commits into from
May 29, 2024
Merged

Feature/python sync actions #181

merged 78 commits into from
May 29, 2024

Conversation

AdamVyborny
Copy link
Contributor

@AdamVyborny AdamVyborny commented May 7, 2024

Jen aby procházelo CI je potřeba dát nějaký funkční config sem: https://github.com/keboola/generic-extractor/blob/5946efef1f6da2b10c732c01336b0aa316de394d/tests/phpunit/data/syncAction/config.json a pak tady upravit assert podle toho, co to má vracet:

self::assertStringContainsString('success
. Teď tam asi není správnej config, pro tu curl sync akci, co pouštím protože to padá na

logger.ERROR: Process failed to start. Error output: cURL command not provided [] []\n

A když tam dám třeba tu akci test_request, tak to zas vrací not implemented.

Každopádně, takhle by vám to zatím mohlo stačit pro nějaký laborování ne?

@AdamVyborny AdamVyborny requested a review from davidesner May 7, 2024 13:41
@davidesner
Copy link
Contributor

davidesner commented May 7, 2024

Jo takhle je to super! Diky moc!

Jinak test_request jeste neni implementovana.

curl akce potrebuje curl command v parameters._curl_command

Jdu tam hodit aktualni verzi a zatim budeme testovat oproti tomuhle tagu

@davidesner davidesner force-pushed the feature/python-sync-actions branch from 5946efe to 0b11406 Compare May 7, 2024 13:48
@davidesner
Copy link
Contributor

@AdamVyborny jeste koukam, ze ten build trva fakt mega dlouho, asi kvuli tem dodatecnym instalacim, mozna by stalo za ten image dostat na dockerhub, nebo nejak cachovat jestli to jde

@AdamVyborny
Copy link
Contributor Author

@davidesner něco zkusím: 013df8c

@AdamVyborny AdamVyborny force-pushed the feature/python-sync-actions branch from 013df8c to b054d5d Compare May 7, 2024 14:27
@AdamVyborny AdamVyborny force-pushed the feature/python-sync-actions branch from b054d5d to 57ca6ff Compare May 7, 2024 14:50
@AdamVyborny
Copy link
Contributor Author

@davidesner to by asi mohlo fungovat. Ale je tam klíč v tý cache na commit s fallbackem na Dockerfile hash. Takže pokud přidáš něco do requirments.txt, tak se to asi neinvaliduje. To by se muselo nějak domazlit ještě.
IMG_0035
IMG_0034

@davidesner
Copy link
Contributor

@AdamVyborny z nejakyho zahadnyho duvodu se spousti run akce misto te co volam. Netusis cim to muze byt?

image

response:

{
    "error": "[2024-05-09T12:33:57.413964+00:00] logger.WARNING: State file not found Configuration file '\/data\/in\/state.json' not found. [] []\n[2024-05-09T12:33:57.415158+00:00] logger.DEBUG: Using no authentication. [] []\n[2024-05-09T12:33:57.425675+00:00] logger.DEBUG: GET \/v2\/storage\/buckets?includes=Include___ HTTP\/1.1 X-StorageApi-Token: 9382-531255-DiVO2rkNCMqwe2fbWBIYHbI3ZyWadgJ3gGx12MgN User-Agent: GuzzleHttp\/7 Host: connection.keboola.com [] []\n[2024-05-09T12:33:57.594232+00:00] logger.ERROR: No value found for  in parent result. (level: 1) {\"parents\":[{\"stdClass\":{\"uri\":\"https:\/\/connection.keboola.com\/v2\/storage\/buckets\/in.c-bq_writer_test\",\"id\":\"in.c-bq_writer_test\",\"name\":\"c-bq_writer_test\",\"displayName\":\"bq_writer_test\",\"idBranch\":510379,\"stage\":\"in\",\"description\":\"\",\"tables\":\"https:\/\/connection.keboola.com\/v2\/storage\/buckets\/in.c-bq_writer_test\",\"created\":\"2024-03-04T11:50:25+0100\",\"lastChangeDate\":\"2024-03-04T11:52:24+0100\",\"isReadOnly\":false,\"dataSizeBytes\":3072,\"rowsCount\":10,\"isMaintenance\":false,\"backend\":\"snowflake\",\"sharing\":null,\"hasExternalSchema\":false,\"databaseName\":\"\",\"attributes\":[]}}]} []\n",
    "code": 0,
    "exceptionId": "exception-1164a7aee06ba68da9738470405dbda4",
    "status": "error",
    "context": []
}

@AdamVyborny
Copy link
Contributor Author

@davidesner ta akce musí být v configu:

{
  "parameters": {
    ...
  },
  "action": "load_from_curl",
  "image_parameters": {
    ...
  }
}

@davidesner
Copy link
Contributor

@davidesner ta akce musí být v configu:

{
  "parameters": {
    ...
  },
  "action": "load_from_curl",
  "image_parameters": {
    ...
  }
}

@AdamVyborny tak pry to takhle ma byt https://app.swaggerhub.com/apis/odinuv/sync-actions/1.1.2#/default
a je to tak u vsech komponent

@davidesner davidesner force-pushed the feature/python-sync-actions branch from 52bb982 to eca1716 Compare May 20, 2024 14:51
@davidesner davidesner force-pushed the feature/python-sync-actions branch 2 times, most recently from b0b2d9c to 7cd0074 Compare May 21, 2024 06:47
@davidesner davidesner force-pushed the feature/python-sync-actions branch from 7cd0074 to 20fc680 Compare May 21, 2024 06:48
@davidesner davidesner force-pushed the feature/python-sync-actions branch from 2fc0783 to 3af233f Compare May 21, 2024 10:42
@davidesner davidesner force-pushed the feature/python-sync-actions branch from 8f0a542 to 65d493a Compare May 21, 2024 11:34
@davidesner davidesner force-pushed the feature/python-sync-actions branch from 6742dac to c723405 Compare May 28, 2024 05:18
Copy link
Contributor

@kudj kudj left a comment

Choose a reason for hiding this comment

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

great! the next step can be to add more examples/tests calls to the mock server, like in the original component

@davidesner davidesner merged commit bdaac96 into master May 29, 2024
6 checks passed
@davidesner davidesner deleted the feature/python-sync-actions branch May 29, 2024 13:13
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.

3 participants