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

SDK-4673: Integration of Code Releases into your project repository #2231

Merged
merged 22 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e8ccdce
Initial documentation sturucture.
vlunov-spryker Oct 5, 2023
e183fe0
SDK-4673 update documentation
sergeyspryker Oct 9, 2023
8f3e244
Merge branch 'master' into feature/SDK-4673-add-documentation
sergeyspryker Oct 9, 2023
c0e4e95
Extend secuity description and minor corrections.
vlunov-spryker Oct 9, 2023
94c174c
SDK-4673 review fixes
sergeyspryker Oct 9, 2023
f58e6b3
Merge branch 'feature/SDK-4673-add-documentation' of github.com:spryk…
sergeyspryker Oct 9, 2023
8148085
SDK-4673 review fixes
sergeyspryker Oct 9, 2023
c9f5013
Merge branch 'master' into feature/SDK-4673-add-documentation
DmytroKlymanSpryker Oct 16, 2023
20eefb1
rename
andriitserkovnyi Oct 17, 2023
e9a75bc
Merge branch 'master' into feature/SDK-4673-add-documentation
andriitserkovnyi Oct 17, 2023
81cea2b
rename
andriitserkovnyi Oct 17, 2023
1ad4065
Merge branch 'master' into feature/SDK-4673-add-documentation
andriitserkovnyi Oct 17, 2023
fcd7851
review
andriitserkovnyi Oct 18, 2023
99fb8c3
Update integrating-code-releases.md
andriitserkovnyi Oct 18, 2023
412ef37
Merge branch 'master' into feature/SDK-4673-add-documentation
andriitserkovnyi Oct 18, 2023
02afacc
review
andriitserkovnyi Oct 18, 2023
5c3ed0e
review
andriitserkovnyi Oct 18, 2023
4ad40be
Merge branch 'master' into feature/SDK-4673-add-documentation
andriitserkovnyi Oct 20, 2023
9f73931
rename
andriitserkovnyi Oct 20, 2023
f93ba3e
Merge branch 'master' into feature/SDK-4673-add-documentation
andriitserkovnyi Oct 20, 2023
7773903
sidebar
andriitserkovnyi Oct 20, 2023
c4a77d0
Update integrating-security-releases.md
andriitserkovnyi Oct 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/scu/dev/features/integrating-code-releases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Integrating code releases
description: Spryker Code Upgrader automatically integrates code releases
template: concept-topic-template
---

Spryker architecture provides extensibility of different modules by using extension points in the project code. With Spryker Code Upgrader, the process of integrating plugins, configuration updates, adding new translations, and other code changes is automated. As a result, to add new features, developers don't need to manually apply code changes.

The upgrader supports the following extension points:
- Configuration:
- Module
- Environment
- Copying module files
- Adding and removing the following:
- Plugin
- Navigation element
- Widget
- Glue relationship
- Adding the following:
- Transfer definition
- DB schema definition

## Release rating

The release rating is a measure of the integrability coverage of a code release. It represents the percentage of automatically integratable plugins, configurations, schemas, and other components.

This rating is determined during internal testing, where the generated integration code is compared with the manually released code to assess the level of integration achieved. If both are equal, then the release is fully integratable.

There are type of releases that provide only dependency updates without any code integrations, so-called module-only releases. Such releases have 100% coverage.

The Upgrader's PRs contain the rating for the suggested releases.

# Enable and configure

The Integrator is enabled by default. It integrates the releases with rating 70% or more. You can adjust this treshold to your requirements in Spryker CI.
andriitserkovnyi marked this conversation as resolved.
Show resolved Hide resolved

After a release is integrated, a style fixer is applied to the changed files. We recommend implementing your own style fixer to expose project-specific code style conventions.

# What to do if you see a generated code, that is not valid

1. Make sure that your project code follows the Upgradability Guidelines and passes the [Evaluator check](/docs/scos/dev/guidelines/keeping-a-project-upgradable/run-the-evaluator-tool.html).
2. You can try manually correcting the generated code as a quick fix.
3. If none of the above solutions work, please contact us for further assistance.
32 changes: 32 additions & 0 deletions docs/scu/dev/features/integrating-security-releases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Integrating security releases
andriitserkovnyi marked this conversation as resolved.
Show resolved Hide resolved
description: How Spryker Code Upgrader works with releases related to known security vulnerabilities
template: concept-topic-template
---

Being on top of security releases of your vendor or third parties is very crucial:
* *Vulnerability mitigation*: Security updates often address known vulnerabilities or weaknesses in software. Installing these updates helps to mitigate these vulnerabilities, reducing the risk of unauthorized access, data breaches, or malicious activities.
* *Enhanced protection and risk mitigation*: Security updates typically include patches and improvements that enhance the overall security of the system.
* *Regulatory compliance*: Many regulatory bodies require organizations to maintain up-to-date security measures, which often includes installing security updates promptly. Compliance with these regulations reduces legal and financial risks and helps to maintain a positive reputation and trust with stakeholders and customers.

## Coverage of security releases

The static code analysis tools provide the capability to detect various known vulnerabilities. These tools assist in identifying and preventing potential security risks from the following sources:
* Spryker security releases
* PHP ecosystem
* NPM ecosystem

## Spryker Security releases

A security release is a type of release that aims to deliver vulnerability fixes rather than introducing new features or functionalities.
Here's an example of a security release: [4753](https://api.release.spryker.com/release-group/4753).

Even though security releases are applied alongside other releases, they are prioritized to ensure a quick delivery of critical security updates.

## Installing security releases

Automatic installation of security releases is only available for minor releases. The major releases require a manual installation.

## Checking for available security fixes

To check for available security fixes for your project, [run the evaluator tool](/docs/scos/dev/guidelines/keeping-a-project-upgradable/run-the-evaluator-tool.html).
30 changes: 30 additions & 0 deletions docs/scu/dev/features/upgrade-verification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Active detection of incompatibilies
description: How Spryker Code Upgrader actively detects and warns you when your code becomes incompatible with the code in upgraded modules
template: concept-topic-template
---

It is very important for Spryker Code Upgrader to ensure stability of the upgrades. On the one hand you have your automated tests that you rely on, those tests are run in your CI system and you use them before you merge the pull request created by Spryker Code Upgrader. On the other hand and in addition we run a number of code checks to offer an early warning system even without having a full context or knowledge of your project.

# Validations and warnings

The upgrader offers validations ensure the accuracy and safety of the upgrade process.
The warnings provide guidance on potential risks or necessary actions for a successful upgrade.

Warning types:
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. Are these warnings provided before or after merging a PR?
  2. Where are they provided?

Copy link
Contributor Author

@sergeyspryker sergeyspryker Oct 18, 2023

Choose a reason for hiding this comment

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

  1. Are provided before merging the PR (Upgrader creates PR with description that already contains the warnings).
  2. Warnings are placed in PR description text area

- Major code releases warning.
All the major releases should be installed manually to integrate the BC breaks.
andriitserkovnyi marked this conversation as resolved.
Show resolved Hide resolved
- PHP Broken Files.
Phpstan checks project code after each release application and provides corresponding warnings.
andriitserkovnyi marked this conversation as resolved.
Show resolved Hide resolved
- Conflict between project class, which extends a private class in a Spryker module, and a changes made by Spryker in their latest release.
To resolve this conflict you need to re-write the custom class with the necessary changes.
- Module name conflict warnings.
Custom project module has the same name with spryker released module and should be renamed.
- Release integration warnings (warnings related to the integration process)
andriitserkovnyi marked this conversation as resolved.
Show resolved Hide resolved
- Upgrader warnings (warnings related to the upgrader process)
andriitserkovnyi marked this conversation as resolved.
Show resolved Hide resolved

# What to do when you see these warnings in the PR?

In most cases, warnings come with specific information that helps you identify the class or file needed to fix the issue.
Most of these issues are easily fixable in your IDE.

Loading