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

Java sdk v2 product sync documentation #959

Conversation

salander85
Copy link
Contributor

@salander85 salander85 requested a review from lojzatran May 3, 2023 08:11
docs/sdk2/usage/CLEANUP_GUIDE.md Outdated Show resolved Hide resolved
````
By design, scaling the sync process should **not** be done by executing the batches themselves in parallel. However, it can be done either by:

- Changing the number of [max parallel requests](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L116) within the `sphereClient` configuration. It defines how many requests the client can execute in parallel.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Changing the number of [max parallel requests](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L116) within the `sphereClient` configuration. It defines how many requests the client can execute in parallel.
- Changing the number of [max parallel requests](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L116) within the `projectApiRoot` configuration. It defines how many requests the client can execute in parallel.

- Changing the number of [max parallel requests](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L116) within the `sphereClient` configuration. It defines how many requests the client can execute in parallel.
- or changing the draft [batch size](https://commercetools.github.io/commercetools-sync-java/v/9.2.1/com/commercetools/sync/commons/BaseSyncOptionsBuilder.html#batchSize-int-). It defines how many drafts can one batch contains.

The current overridable default [configuration](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) of the `sphereClient`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The current overridable default [configuration](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) of the `sphereClient`
The current overridable default [configuration](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) of the `projectApiRoot`

docs/sdk2/usage/PRODUCT_SYNC.md Show resolved Hide resolved
| `variants.prices.customerGroup` | CustomerGroupResourceIdentifier |
| `variants.prices.custom.type` | TypeResourceIdentifier |
| `variants.assets.custom.type` | TypeResourceIdentifier |
| `variants.attributes` * | Only the attributes with type [ReferenceType](https://docs.commercetools.com/api/projects/productTypes#referencetype), [SetType](https://docs.commercetools.com/api/projects/productTypes#settype) with `elementType` as [ReferenceType](https://docs.commercetools.com/api/projects/productTypes#referencetype) and [NestedType](https://docs.commercetools.com/api/projects/productTypes#nestedtype) requires `key` on the `id` field of the `ReferenceType`. |
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does * means?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It means like in the description stated; only the attributes of types .... Any ideas to make this more clear?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah I see. Maybe do not add * at all? The Description is enough to explain. With the * I was thinking there is another * that explains in depth what this line means.

docs/sdk2/usage/PRODUCT_SYNC.md Outdated Show resolved Hide resolved
- For resolving `key-value-document` (custom object) references on attributes of type `Reference`, `Set` of `Reference`, `NestedType` or `Set` of `NestedType`, The `id` field of the reference in the attribute should be defined in the correct format.
The correct format must have a vertical bar `|` character between the values of the container and key.
For example, if the custom object has a container value `container` and key value `key`, the `id` field should be `container|key"`,
also, the key and container value should match the pattern `[-_~.a-zA-Z0-9]+`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is also max length for the key for custom objects (256 chars). Maybe it also matters here? https://docs.commercetools.com/api/projects/custom-objects#customobject

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, in indirect way it does matter... i will add a note.

docs/sdk2/usage/PRODUCT_SYNC.md Show resolved Hide resolved
@lojzatran
Copy link
Collaborator

Can you also write a migration guide for customers to go from v1 sdk to v2 sdk? Like what classes they need to change etc.?

@salander85 salander85 requested a review from lojzatran May 4, 2023 14:38
@salander85 salander85 merged commit 3630601 into java-sdk-v2-product-sync-migration May 11, 2023
1 check failed
@salander85 salander85 deleted the java-sdk-v2-product-sync-documentation branch May 11, 2023 10:22
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.

None yet

2 participants