-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update product adapter for changes in the UserService #3401
Conversation
@@ -94,7 +94,7 @@ func (a *serviceAPIAdapter) GetUserByEmail(email string) (*mm_model.User, error) | |||
} | |||
|
|||
func (a *serviceAPIAdapter) UpdateUser(user *mm_model.User) (*mm_model.User, error) { | |||
user, appErr := a.api.userService.UpdateUser(user, true) | |||
user, appErr := a.api.userService.UpdateUser(a.ctx, user, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh my bad. I saw this, but I thought it's the app/user user service.
@mgdelacroix lint is not failing on my local setup, I checked out to |
I see. Focalboard CI is not setup to fetch branches from the server and enterprise. We'd need to force merge this, and work on setting the CI. |
@mgdelacroix - Just to clarify - how is the boards multi-product architecture working without the CI testing it along with the server and enterprise repo cloned with it? Shouldn't it have been done with #3381 itself? |
@isacikgoz @mgdelacroix It is strange that; it fails with below reason and build succeeds. Must likely a pipeline dependency version issue or caching issue. I will try to reproduce. Strange CI failure reason is below:
|
@pfltdv - Can you point me to the part in the build pipeline where it fetches the same branch names from server and ee repos? Something must be there in the build pipeline which is not in the lint pipeline. |
@agnivade lint has different pipeline. Pipeline executes only |
Yes, so comparing with this: https://github.com/mattermost/focalboard/blob/main/.github/workflows/ci.yml, I don't see anywhere where the server and ee repos are checked out. So how is the build pipeline passing, but this one failing? |
Yes that is the strange part, still investigating the reason. |
Mattermost server has this commit 8 days ago. mattermost/mattermost@6dc897b which is not part of any tags. Playbooks has mattermost server dependency indirectly. Also i reproduced that failure in vscode locally (without updating mattermost-server). Looks like dependency issue in go.mod file. |
The code is fine. You have to clone the |
@pfltdv could we also fetch mattermost-server while runing th linter? I think it would fix the issue. Or alternatively, we can merge the server PR then update the server dependency. It can also be another fix. |
I am not sure about updating mattermost-server or cloning will solve the problem source cause lint action execute below actions:
Both have same dependencies, so server lint should fail also. And it only fails for mattermost-plugin. |
There is no clone for build so all dependencies managed by go. And honestly i do not know how branches are selected, it uses commit hashes internally. And for linting needs we should not depend on other project source codes. Specially should not clone our private project in public repository. Maybe we should review our codebase cause outside contributors can not build this project due to lintin issues. Is it possible to make server change released first, then update dependencies of this project. So we will depend on a released code of mattermost-server? |
@pfltdv - I'll have a separate discussion with the release team on how the multi-product architecture works and what to do. Essentially now 3 repos are just a single repo compiled together.
We already do that in the server.
Yes, it uses the hash to determine whether there's a branch to clone. This is how:
@mgdelacroix / @wiggin77 - I am wondering if the cloning of server and ee branches are happening somewhere that isn't super apparent in the build pipeline? If not, we should definitely get that set up first to get the compilation working. |
@agnivade I've not looked into this yet. Not sure who would maintain that part of CI automation, and if it turns out I need to do it, I might as well set it up for Playbooks as well. |
@wiggin77 - Understood, yes we need to do it. Anything in the circleci config files is owned by us. The Gitlab pipelines are owned by the release team. Re: playbooks, I am not sure if there's a benefit of doing that since we aren't ready for that yet. |
PR is created to clone enterprise repo for lint pipeline. #3418 . |
#3418 is merged into main. |
/update-branch |
Signed-off-by: Mustafa Kara <mustafa.kara@mattermost.com>
@agnivade @isacikgoz Since we need to include some repositories for some pipelines to work we introduced environment variables and changed go.work. At this file https://github.com/mattermost/focalboard/blob/fd9b62e0d60bf40db880f02e54ed09205d0202a5/mattermost-plugin/build/gowork/main.go we are configuring CI differently that block us to use local checked-out repos in CI. Do we really need to configure CI environment different than local environment ? Changes are here: fd9b62e |
Thank you @pfltdv ! I am now unblocked ❤️ Re: the question, I'll defer to @wiggin77. I'll wait till I have a final green light from Doug on this. |
The naming (local versus CI) can be improved, but the issue is that Boards has multiple SKU's, one being a stand-alone build that runs for a local user. The different SKUs require different @pfltdv . @agnivade I'm open to any suggestions to make this better. |
Ah so it's a naming problem. Wondering if we should rename |
I am going to merge this to unblock myself. Happy to send another PR to improve the naming. |
Thanks alot @wiggin77 for clarification , naming is not that important. We were just curious about having different behavior at different systems. Since we will apply similar logic to mattermost-server and enterprise pipelines. For those pipelines we will keep this in mind. |
@pfltdv @agnivade this PR broke the dev environment for Boards developers. Anyone who didn't already have a I'm not entirely clear what the requirements are for CI, but I would like to have the default (no env var) do the right thing, and have a CI script declare a var if needed to change behaviour. |
Sounds good. So the mattermost-server include needs to be by default. I'll defer to Mustafa but no issues from my side. |
@wiggin77 @agnivade We will include it by default and exclude it on ci. However that is not the only environment variable configured for different ci systems. Does anyone knows that why we need to include ./linux folder for ci systems ? https://github.com/mattermost/focalboard/blob/main/mattermost-plugin/build/gowork/main.go#L62-L64 https://github.com/mattermost/focalboard/blob/main/mattermost-plugin/build/gowork/main.go#L70-L83 |
I am working on a PR to fix this. Banging on the open-graph / pluginapi issue then I'll submit and tag you @pfltdv as a reviewer in case I missed anything. |
Thanks alot @wiggin77 i am working on fixing mattermost-server issue. |
Related PR, #3516. I will request reviews after fixing all pipelines. |
CI builds and checks multiple SKU's for boards, including a stand-alone server. That stand-alone server is built via the linux folder. |
Summary
Make changes to the adapter WRT mattermost/mattermost#20674