An Adobe Commerce Architect needs to ensure zero downtime during the deployment process of Adobe Commerce on-premises. Which two steps should the Architect follow? (Choose two.)
Answer : A, C
Option D is incorrect because there is no such option as --convert-old-scripts-true for the bin/magento setup:upgrade command. This option does not exist in Magento 2 and does not have any effect on the deployment process or the downtime.
Option E is incorrect because there is no such config flag as developer/zero_down_time/enabled in Magento 2. This flag does not exist in Magento 2 and does not have any effect on the deployment process or the downtime.
1: Blue-green deployment | Adobe Commerce Developer Guide
2: Deploy Magento to production | Adobe Commerce Developer Guide
3: Command-line installation options | Adobe Commerce Developer Guide
An external system integrates functionality of a product catalog search using Adobe Commerce GraphQL API. The Architect creates a new attribute my_attribute in the admin panel with frontend type select-Later, the Architect sees that Productlnterf ace already has the field my_attribute, but returns an Int value. The Architect wants this field to be a new type that contains both option id and label.
To meet this requirement, an Adobe Commerce Architect creates a new module and file etc/schema.graphqls that declares as follows:
After calling command setup:upgrade, the introspection of Productlnterface field my_attribute remains Int. What prevented the value type of field my_attribute from changing?
Answer : C
According to the Adobe Commerce documentation, to extend an existing GraphQL interface, the keyword extend must be used before the interface name. This indicates that the new declaration is adding or modifying fields to the existing interface, rather than redefining it. If the keyword extend is omitted, the new declaration will be ignored and the original interface will be used. In this case, the Architect wants to change the type of the my_attribute field in the ProductInterface interface, which is already declared in the Magento.CatalogGraphQl module. Therefore, the Architect should use the keyword extend before declaring the ProductInterface interface in the schema.graphqls file of the custom module. This will allow the Architect to override the type of the my_attribute field from Int to MyAttributeType.
An Adobe Commerce Architect needs to scope a bespoke news section for a merchants Adobe Commerce storefront. The merchant's SEO agency requests that the following URL structure:
news/{date}/{article_url_key}, where {date} is the publication date of the article, and {article_url_key} is the URL key of the article.
The Architect scopes that a news entity type will be created. The date and URL key data will be stored against each record and autogenerated on save. The values will be able to be manually overridden.
Answer : B, C
These two options are both valid ways to manage routing for the bespoke news section and adhere to best practice. Option B leverages the existing URL rewrite functionality of Adobe Commerce, which allows creating custom URLs for any entity type and storing them in the database. This option requires creating a standard controller route for the news entity type, such as news/article/view/id/i, where i is the news article ID. Then, on saving each news article, a rewrite rule is generated that maps the internal URL to the desired SEO-friendly URL, such as news/{date}/{article_url_key}. The rewrite rule is stored in the url_rewrite table, which is used by the standard router to match and redirect requests.
Option C involves creating a custom router class that implements \Magento\Framework\App\RouterInterface and runs before the standard router in the routing process. The custom router class can match the news portion of the URL and extract the date and URL key parts from it. Then, it can look for and load a news article that matches those values using a model or repository class. If a match is found, it can set the request parameters accordingly and dispatch the request to a controller action that renders the news article page.
Routing | Adobe Commerce Developer Guide
An Adobe Commerce Architect is planning to create a new action that will add gift registry items to the customer's quote. What should the Architect do to guarantee that private content blocks are updated?
Answer : C
Private content blocks are sections of the page that are specific to each customer and are not cached by the server. To update these blocks when a customer performs an action, such as adding a gift registry item to the quote, the Adobe Commerce Architect needs to specify the new action in a sections.xml configuration file. This file defines which blocks need to be updated for each action and how often they should be updated. By doing this, the Architect can ensure that the private content blocks are refreshed with the latest data from the server.Reference:
Private content | Magento 2 Developer Documentation
Configure private content | Magento 2 Developer Documentation
An Adobe Commerce Architect is investigating a case where some EAV product attributes are no longer updated.
* The catalog is composed of 20.000 products with 100 attributes each.
* The product updates are run by recurring Adobe commerce imports that happen multiple times a day.
* The Architect finds an error in the logs that indicates an integrity constraint while trying to insert row with id 2147483647.
What is causing this error?
Answer : C
EAV attribute import uses the REPLACE statement, which deletes and inserts a new row with the same primary key value. This causes the auto-increment column to increase by one for each row, even if the row already exists. If the auto-increment column reaches its maximum value, which is 2147483647 for a signed INT, then any further REPLACE statement will fail with an integrity constraint violation error.Reference:
EAV and extension attributes | Magento 2 Developer Documentation
Data integrity in JSON (B) when replacing EAV - Stack Overflow
An existing Adobe Commerce website is moving to a headless implementation.
The existing website features an "All Brands'' page, as well as individual pages for each brand. All brand-related pages are cached in Varnish using tags in the same manner as products and categories.
Two new GraphQL queries have been created to make this information available to the frontend for the new headless implementation:
During testing, the queries sometimes return out-of-date information. How should this problem be solved while maintaining performance?
Answer : B
This solution ensures that the data returned by the GraphQL queries is up to date, while also maintaining performance. By specifying a $cache(cacheidentity: Path\To\identityclass) directive for each GraphQL query, the relevant brands and associated products will be added as cache tags.
An Adobe Commerce Architect needs to customize the workflow of a monthly installments payment extension. The extension is from a partner who is contracted with the default website Payment Service Provider (PSP), which has its own legacy extension (a module using deprecated payment method).
The installment payment partner manages only initializing a payment, and then hands the capture to be executed by the PSP Once the amount is successfully captured, the PSP notifies the website through a webhook. The goal of the webhook is only to create an "invoice" and save the "capture information" to be used later for refund requests through the PSP itself.
The Architect needs the most simple solution to capture the requested behavior.
Which solution should the Architect implement?
Answer : C