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

plasma-infra: Override lerna ls config #995

Merged
merged 1 commit into from Jan 25, 2024

Conversation

Yakutoc
Copy link
Collaborator

@Yakutoc Yakutoc commented Jan 22, 2024

Override lerna ls

  • переопределили логику ignoreChanges для команды lerna ls чтобы изменения файлов *.component-test.tsx тоже учитывалось

What/why changed

Чтобы правильно понять "а какие пакеты у нас изменились?" переопределили свойство ignoreChanges для команды lerna ls.

Теперь когда у нас запускается worfklow " ./.github/workflows/change-detection.yml" он учитывает в себе и измененые *.component-test.tsx файлы.

Например мы изменили компонент Badge и нам пришлось адаптировать под новый API и визуал тесты - Badge.component-test.tsx

Прямые изменения были только в пакетах plasma-{b2c,web}, а измененные тесты лежат в plasma-core.

А так как ранее мы не учитывали в своих расчетах файлы тестов, то CI не запустил тесты для plasma-ui, которые тоже раньше ссылались на тесты в plasma-core, а там ошибка.

Как итог, после merge в dev ветку у нас всегда падающий cypress для plasm-ui.

Примечания

При этом эти изменения не затрагивают другие команды lerna.

Пример для команды когда мы внесли изменения в Badge.component-test.tsx

lerna run api-report --since=$(git merge-base --fork-point origin/dev) --no-bail --stream
lerna notice cli v6.5.1
lerna verb rootPath /Users/workspace/plasma
lerna info versioning independent
lerna notice filter changed since "67df0d451e17b4d31d35d61243db5a9af2119479"
lerna verb hasTags true
lerna info Looking for changed packages since 67df0d451e17b4d31d35d61243db5a9af2119479
lerna info ignoring diff in paths matching [ '*.md', '*.component-test.tsx', 'package-lock.json' ]
lerna verb no diff found in @salutejs/plasma-core (after filtering)
lerna success run No packages found with the lifecycle script 'api-report'

@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-995/

@Yakutoc Yakutoc changed the title plasma-infra: [WIP] plasma-infra: Override lerna ls config Jan 22, 2024
@Yakutoc Yakutoc marked this pull request as ready for review January 23, 2024 04:51
Copy link
Contributor

@Yeti-or Yeti-or left a comment

Choose a reason for hiding this comment

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

Огненный pr
Расписано супер понятно и подробно
изменений - 3 строчки
кайф

@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-995/

@Yakutoc Yakutoc added this pull request to the merge queue Jan 25, 2024
Merged via the queue into dev with commit 697d774 Jan 25, 2024
23 checks passed
@Yakutoc Yakutoc deleted the ci-include-components-test-files branch January 25, 2024 04:42
This was referenced Jan 31, 2024
@Salute-Eva
Copy link
Contributor

🚀 This PR is included in version: @salutejs/plasma-asdk@0.35.0, @salutejs/plasma-b2c@1.277.0, @salutejs/plasma-core@1.146.0, @salutejs/plasma-cy-utils@0.78.0, @salutejs/plasma-hope@1.258.0, @salutejs/plasma-icons@1.179.0, @salutejs/plasma-new-hope@0.41.0, @salutejs/plasma-sb-utils@0.144.0, @salutejs/plasma-temple-docs@0.215.0, @salutejs/plasma-temple@1.198.0, @salutejs/plasma-tokens-native@1.21.0, @salutejs/plasma-tokens@1.70.0, @salutejs/plasma-ui-docs@0.264.0, @salutejs/plasma-ui@1.230.0, @salutejs/plasma-web-docs@0.231.0, @salutejs/plasma-web@1.277.0, @salutejs/plasma-website@0.239.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants