lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
40.72k stars 9.27k forks source link

[Bug] Upstream Sync Failed! #1690

Closed piwawa closed 5 months ago

piwawa commented 5 months ago

💻 Operating System

Ubuntu

📦 Environment

Vercel / Zeabur / Sealos

🌐 Browser

Chrome

🐛 Bug Description

自动更新的workflow突然失败了,项目啥也没动,之前action都稳定运行。

image

image

Run aormsby/Fork-Sync-With-Upstream-action@v3.4
/usr/bin/sh /home/runner/work/_actions/aormsby/Fork-Sync-With-Upstream-action/v3.4/entry/config_and_run.sh
Running ACTION...

Setting git config from input vars. (Skips config for all inputs set to 'null'.)
SUCCESS

Checking out target branch 'main' for sync.
Already on 'main'
Your branch is up to date with 'origin/main'.
Target branch checked out
SUCCESS

Setting upstream repo to 'lobehub/lobe-chat'.
SUCCESS

Checking for new commits on upstream branch.

New commits since last sync:
6a2633ab85e992b3a85b7500ea9d9ca21c674[14](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:15)b 📖 doc: Update model service providers in README.md (#1689)
8a8e751cb041fcb4c2d31853208288706fff4352 :bookmark: chore(release): v0.141.1 [skip ci]
e07e9cf7c5ea336d98e25914eead2bb0b48c2c5b ♻️ refactor: refactor the Vercel Aanlytics and support Google Aanlytics (#1688)
9f436efe813d34c42cbc4029cd[15](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:16)0612d7e8d148 📖 docs: Update supported models in README.zh-CN.md (#[16](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:17)78)
77f0caaf84cce2884322b8aaffe2327291cadbca :bookmark: chore(release): v0.141.0 [skip ci]
60d9186497c2a0c868688818f44974c614e8e742 ✨ feat: using YJS and WebRTC to support sync data between different devices (#1525)
065d3d75b4f7d34e7e894422dc62c545c0726018 :bookmark: chore(release): v0.140.1 [skip ci]
5bae263ba38f680978d89c673f28527233d371e8 💄 style:  add Moonshot Kimi Reverse model to Moonshot model provider. (#1659)
75ccbf619313660e65dc4c8a861f471b5cff56c5 :bookmark: chore(release): v0.140.0 [skip ci]
2b280af079974c503cd46e7b2f549c15f11523fd :sparkles: feat: add gemini 1.5 pro support (#1669)
2f71c6831d85b1b91188b2cfae5dd55c9908af96 :bookmark: chore(release): v0.139.2 [skip ci]
44fae5ec7d59fc923b8ae50b4070134cf6a8b5dc 💄 style: The bottom safe area height of iOS (#1637)
7707ddacfaa21c28976037913cb10a609a9782e2 🐛 fix: fix code block display issue (#1675)
02e19f437b3cc914265c310a1c24aa4abff5dd25 📝 docs(bot): Auto sync agents & plugin to readme
03757c77358ff0bbcb491833766a637594e87d16 🔨 chore: update codecov/codecov-action action to v4 (#1214)

Syncing new commits...
From https://github.com/lobehub/lobe-chat
 * branch            main       -> FETCH_HEAD
Updating 0b1d4cd..6a2633a
Fast-forward
 .github/workflows/release.yml                      |   2 +
 .github/workflows/test.yml                         |   4 +-
 .husky/commit-msg                                  |   1 -
 CHANGELOG.md                                       | 133 +++++++++
 README.md                                          |  20 +-
 README.zh-CN.md                                    |  19 +-
 docs/self-hosting/advanced/analytics.mdx           |   2 +-
 docs/self-hosting/advanced/analytics.zh-CN.mdx     |   2 +-
 .../environment-variables/analytics.mdx            |  91 ++++++
 .../environment-variables/analytics.zh-CN.mdx      |  91 ++++++
 docs/self-hosting/environment-variables/basic.mdx  | 105 +------
 .../environment-variables/basic.zh-CN.mdx          | 105 ++-----
 locales/ar/common.json                             |  40 ++-
 locales/ar/setting.json                            |  36 +++
 locales/de-DE/common.json                          |  40 ++-
 locales/de-DE/setting.json                         |  36 +++
 locales/en-US/common.json                          |  40 ++-
 locales/en-US/setting.json                         |  36 +++
 locales/es-ES/common.json                          |  40 ++-
 locales/es-ES/setting.json                         |  36 +++
 locales/fr-FR/common.json                          |  40 ++-
 locales/fr-FR/setting.json                         |  36 +++
 locales/it-IT/common.json                          |  40 ++-
 locales/it-IT/setting.json                         |  38 +++
 locales/ja-JP/common.json                          |  40 ++-
 locales/ja-JP/setting.json                         |  38 +++
 locales/ko-KR/common.json                          |  40 ++-
 locales/ko-KR/setting.json                         |  36 +++
 locales/nl-NL/common.json                          |  40 ++-
 locales/nl-NL/setting.json                         |  38 +++
 locales/pl-PL/common.json                          |  40 ++-
 locales/pl-PL/setting.json                         |  36 +++
 locales/pt-BR/common.json                          |  40 ++-
 locales/pt-BR/setting.json                         |  36 +++
 locales/ru-RU/common.json                          |  40 ++-
 locales/ru-RU/setting.json                         |  36 +++
 locales/tr-TR/common.json                          |  40 ++-
 locales/tr-TR/setting.json                         |  36 +++
 locales/vi-VN/common.json                          |  40 ++-
 locales/vi-VN/setting.json                         |  36 +++
 locales/zh-CN/common.json                          |  40 ++-
 locales/zh-CN/setting.json                         |  36 +++
 locales/zh-TW/common.json                          |  40 ++-
 locales/zh-TW/setting.json                         |  36 +++
 package.json                                       |  19 +-
 src/app/chat/(desktop)/features/SessionHeader.tsx  |   6 +-
 src/app/chat/(mobile)/features/ChatInput/index.tsx |   1 +
 src/app/chat/(mobile)/features/SessionHeader.tsx   |  13 +-
 .../SessionListContent/List/SkeletonList.tsx       |   1 -
 src/app/layout.tsx                                 |   2 +
 src/app/settings/(desktop)/features/Header.tsx     |  12 +-
 .../settings/(mobile)/features/Header/index.tsx    |  13 +-
 src/app/settings/features/SettingList/index.tsx    |   3 +-
 src/app/settings/sync/Alert.tsx                    |  39 +++
 src/app/settings/sync/DeviceInfo/Card.tsx          |  41 +++
 src/app/settings/sync/DeviceInfo/DeviceName.tsx    |  66 +++++
 src/app/settings/sync/DeviceInfo/index.tsx         | 1[17](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:18) ++++++++
 src/app/settings/sync/PageTitle.tsx                |  11 +
 src/app/settings/sync/WebRTC/ChannelNameInput.tsx  |  46 +++
 src/app/settings/sync/WebRTC/index.tsx             |  97 ++++++
 .../settings/sync/components/SyncSwitch/index.css  | 237 +++++++++++++++
 .../settings/sync/components/SyncSwitch/index.tsx  |  79 +++++
 src/app/settings/sync/components/SystemIcon.tsx    |  16 +
 src/app/settings/sync/layout.tsx                   |   9 +
 src/app/settings/sync/page.tsx                     |  23 ++
 src/app/settings/sync/util.ts                      |   4 +
 src/components/Analytics/Google.tsx                |  14 +
 src/components/Analytics/Vercel.tsx                |   6 +-
 src/components/Analytics/index.tsx                 |  13 +-
 src/components/BrowserIcon/components/Brave.tsx    |  56 ++++
 src/components/BrowserIcon/components/Chrome.tsx   |  14 +
 src/components/BrowserIcon/components/Chromium.tsx |  14 +
 src/components/BrowserIcon/components/Edge.tsx     |  36 +++
 src/components/BrowserIcon/components/Firefox.tsx  |  38 +++
 src/components/BrowserIcon/components/Opera.tsx    |  [19](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:20) ++
 src/components/BrowserIcon/components/Safari.tsx   |  23 ++
 src/components/BrowserIcon/components/Samsung.tsx  |  [21](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:22) ++
 src/components/BrowserIcon/index.tsx               |  50 ++++
 src/components/BrowserIcon/types.ts                |   8 +
 src/config/__tests__/client.test.ts                |   9 +-
 src/config/client.ts                               |   7 -
 src/config/modelProviders/google.ts                |   9 +-
 src/config/modelProviders/moonshot.ts              |   8 +
 src/config/server/analytics.ts                     |  32 ++
 src/config/server/index.ts                         |   4 +-
 src/const/settings.ts                              |   6 +
 src/database/core/__tests__/model.test.ts          |   4 +-
 src/database/core/db.ts                            |   2 +-
 src/database/core/index.ts                         |   1 +
 src/database/core/model.ts                         |  88 +++++-
 src/database/core/sync.ts                          | 328 +++++++++++++++++++++
 src/database/models/__tests__/message.test.ts      |   1 -
 src/database/models/__tests__/plugin.test.ts       |   7 +-
 src/database/models/file.ts                        |   2 +-
 src/database/models/message.ts                     |  79 +++--
 src/database/models/plugin.ts                      |  11 +-
 src/database/models/session.ts                     |  31 +-
 src/database/models/sessionGroup.ts                |  [22](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:23) +-
 src/database/models/topic.ts                       |  35 +--
 src/features/MobileTabBar/index.tsx                |   3 +-
 src/features/SyncStatusInspector/DisableSync.tsx   |  79 +++++
 src/features/SyncStatusInspector/EnableSync.tsx    | 136 +++++++++
 src/features/SyncStatusInspector/EnableTag.tsx     |  66 +++++
 src/features/SyncStatusInspector/index.tsx         |  27 ++
 src/hooks/useSyncData.ts                           |  48 +++
 src/layout/GlobalLayout/StoreHydration.tsx         |   5 +
 src/locales/default/common.ts                      |  32 +-
 src/locales/default/setting.ts                     |  38 ++-
 src/services/chat.ts                               |   8 +-
 src/services/config.ts                             |   2 +-
 src/services/global.ts                             |  15 +
 src/store/chat/slices/topic/action.test.ts         |   2 +-
 src/store/chat/slices/topic/action.ts              |  31 +-
 src/store/global/slices/common/action.ts           |  72 ++++-
 src/store/global/slices/common/initialState.ts     |   9 +
 src/store/global/slices/common/selectors.ts        |   1 +
 src/store/global/slices/preference/initialState.ts |   3 +-
 src/store/global/slices/preference/selectors.ts    |   3 +
 .../global/slices/settings/selectors/index.ts      |   1 +
 src/store/global/slices/settings/selectors/sync.ts |  14 +
 src/types/settings/index.ts                        |   3 +
 src/types/settings/sync.ts                         |  10 +
 src/types/sync.ts                                  |  41 +++
 src/utils/platform.ts                              |  12 +-
 src/utils/responsive.ts                            |  21 ++
 1[25](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:26) files changed, [38](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:39)80 insertions(+), 452 deletions(-)
 delete mode 100755 .husky/commit-msg
 create mode 1006[44](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:45) docs/self-hosting/environment-variables/analytics.mdx
 create mode 100[64](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:65)4 docs/self-hosting/environment-variables/analytics.zh-CN.mdx
 create mode [100](https://github.com/piwawa/lobe-chat/actions/runs/8392934653/job/22986744795#step:4:101)644 src/app/settings/sync/Alert.tsx
 create mode 100644 src/app/settings/sync/DeviceInfo/Card.tsx
 create mode 100644 src/app/settings/sync/DeviceInfo/DeviceName.tsx
 create mode 100644 src/app/settings/sync/DeviceInfo/index.tsx
 create mode 100644 src/app/settings/sync/PageTitle.tsx
 create mode 100644 src/app/settings/sync/WebRTC/ChannelNameInput.tsx
 create mode 100644 src/app/settings/sync/WebRTC/index.tsx
 create mode 100644 src/app/settings/sync/components/SyncSwitch/index.css
 create mode 100644 src/app/settings/sync/components/SyncSwitch/index.tsx
 create mode 100644 src/app/settings/sync/components/SystemIcon.tsx
 create mode 100644 src/app/settings/sync/layout.tsx
 create mode 100644 src/app/settings/sync/page.tsx
 create mode 100644 src/app/settings/sync/util.ts
 create mode 100644 src/components/Analytics/Google.tsx
 create mode 100644 src/components/BrowserIcon/components/Brave.tsx
 create mode 100644 src/components/BrowserIcon/components/Chrome.tsx
 create mode 100644 src/components/BrowserIcon/components/Chromium.tsx
 create mode 100644 src/components/BrowserIcon/components/Edge.tsx
 create mode 100644 src/components/BrowserIcon/components/Firefox.tsx
 create mode 100644 src/components/BrowserIcon/components/Opera.tsx
 create mode 100644 src/components/BrowserIcon/components/Safari.tsx
 create mode 100644 src/components/BrowserIcon/components/Samsung.tsx
 create mode 100644 src/components/BrowserIcon/index.tsx
 create mode 100644 src/components/BrowserIcon/types.ts
 create mode 100644 src/config/server/analytics.ts
 create mode 100644 src/database/core/sync.ts
 create mode 100644 src/features/SyncStatusInspector/DisableSync.tsx
 create mode 100644 src/features/SyncStatusInspector/EnableSync.tsx
 create mode 100644 src/features/SyncStatusInspector/EnableTag.tsx
 create mode 100644 src/features/SyncStatusInspector/index.tsx
 create mode 100644 src/hooks/useSyncData.ts
 create mode 100644 src/store/global/slices/settings/selectors/sync.ts
 create mode 100644 src/types/settings/sync.ts
 create mode 100644 src/types/sync.ts
SUCCESS

Pushing synced data to target branch.
To https://github.com/piwawa/lobe-chat.git
 ! [remote rejected] main -> main (refusing to allow a GitHub App to create or update workflow `.github/workflows/release.yml` without `workflows` permission)
error: failed to push some refs to 'https://github.com/piwawa/lobe-chat.git'
ERROR:  exit 1
Could not push changes to target repo.
Try running in test mode to verify your action input. If that does not help, please open an issue.
Resetting git config to previous settings.
Reset Complete

Error: The process '/usr/bin/sh' failed with exit code 1

🚦 Expected Behavior

No response

📷 Recurrence Steps

No response

📝 Additional Information

No response

lobehubbot commented 5 months ago

👀 @piwawa

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

arvinxx commented 5 months ago

手动点下 sync fork 的 Update branch?

image
lobehubbot commented 5 months ago

✅ @piwawa

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。

piwawa commented 5 months ago

手动点下 sync fork 的 Update branch?

image

这是啥原因?是每次更新都要手动 update branch 吗?

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Manually click the Update branch of sync fork?

image

What's the reason? Do I need to manually update branch every time I update?

arvinxx commented 5 months ago

@piwawa 不是,原因是我们项目中的 workflow 因为一些特殊原因发生了修改。然后这会造成自动同步无法正常生效,需要你手动点一次这个 Update branch,就点一次就好,接下来仍然会保持自动同步。 你可以在你的项目 issue 应该能看到一个 Sync Failed issue,在那里我们也有解释说明。

一般来说 workflow 我们不太会动的,这次是实在需要变动我们才改了

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@piwawa No, the reason is that the workflow in our project has been modified due to some special reasons. Then this will cause the automatic synchronization to not take effect normally. You need to manually click the Update branch once. Just click once, and automatic synchronization will still be maintained. You can see a Sync Failed issue in your project issues, where we also have explanations.

Generally speaking, we don’t change the workflow very much, but this time we changed it because it really needed to be changed.

piwawa commented 5 months ago

@piwawa 不是,原因是我们项目中的 workflow 因为一些特殊原因发生了修改。然后这会造成自动同步无法正常生效,需要你手动点一次这个 Update branch,就点一次就好,接下来仍然会保持自动同步。 你可以在你的项目 issue 应该能看到一个 Sync Failed issue,在那里我们也有解释说明。

一般来说 workflow 我们不太会动的,这次是实在需要变动我们才改了

呃,刚刚才把issue开启,没有收到说明,能否重新触发issue呢?

另外,这个action是不能动 workflows 下的yml文件吗,只要改动就会报错?

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@piwawa No, the reason is that the workflow in our project has been modified due to some special reasons. Then this will cause the automatic synchronization to fail to take effect normally. You need to manually click the Update branch once. Just click once, and automatic synchronization will still be maintained. You can see a Sync Failed issue in your project issues, where we also have explanations.

Generally speaking, we don’t change the workflow very much. This time we changed it because it really needed to be changed.

Um, I just opened the issue and didn't receive any instructions. Can I re-trigger the issue?

In addition, this action cannot touch the yml file under workflows. Will an error be reported as long as it is changed?

arvinxx commented 5 months ago

呃,刚刚才把issue开启,没有收到说明,能否重新触发issue呢?

单纯想看的下的话,可以看这个: https://github.com/lobehubbot/lobe-chat/issues/306

另外,这个action是不能动 workflows 下的yml文件吗,只要改动就会报错?

是的,而且主要是我们这个主仓库不要动。其实一般情况下我们是不会动的,但是这次是特殊情况才做了变更。

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Um, I just opened the issue and I didn’t receive any instructions. Can I re-trigger the issue?

If you just want to take a look, you can take a look at this: https://github.com/lobehubbot/lobe-chat/issues/306

In addition, this action cannot touch the yml file under workflows. Will an error be reported as long as it is changed?

Yes, and the main thing is that our main warehouse should not be touched. In fact, under normal circumstances we will not make any changes, but this time we made the change due to special circumstances.

piwawa commented 5 months ago

呃,刚刚才把issue开启,没有收到说明,能否重新触发issue呢?

单纯想看的下的话,可以看这个: lobehubbot#306

另外,这个action是不能动 workflows 下的yml文件吗,只要改动就会报错?

是的,而且主要是我们这个主仓库不要动。其实一般情况下我们是不会动的,但是这次是特殊情况才做了变更。

谢谢大佬,大晚上还能耐心解答,祝你一直 0 error, 0 warning ^_^

lobehubbot commented 5 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Uh, I just opened the issue and didn't receive any instructions. Can I re-trigger the issue?

If you just want to take a look, you can look at this: lobehubbot#306

In addition, this action cannot touch the yml file under workflows. Will an error be reported as long as it is changed?

Yes, and the main thing is that our main warehouse should not be moved. In fact, under normal circumstances we will not make any changes, but this time we made the change due to special circumstances.

Thank you, sir, for your patience in answering this late at night. I wish you always 0 error, 0 warning ^_^