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

Deprecate standalone SQL store level #4

Merged
merged 8 commits into from
Jul 13, 2024

Conversation

Rajat-Dabade
Copy link
Contributor

@Rajat-Dabade Rajat-Dabade commented Jul 2, 2024

This PR aims to eliminate database interaction code for standalone and single-user applications.

Stack on: #2

@Rajat-Dabade Rajat-Dabade self-assigned this Jul 2, 2024
@Rajat-Dabade Rajat-Dabade added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) labels Jul 2, 2024
@marianunez marianunez requested a review from sbishel July 2, 2024 13:11
@@ -234,36 +234,6 @@ func (s *SQLStore) getBoard(db sq.BaseRunner, boardID string) (*model.Board, err
return s.getBoardByCondition(db, sq.Eq{"id": boardID})
}

func (s *SQLStore) getBoardsForUserAndTeam(db sq.BaseRunner, userID, teamID string, includePublicBoards bool) ([]*model.Board, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Once this is removed, we can get rid of the mattermostauthlayer dir by bring its code over here. Up to you if you wanna handle that in this PR or create a separate PR for it. If handling in a separate PR, can you please create a Jira ticket to track it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will take care of this in subsequent PR.
Created a ticket for this: https://mattermost.atlassian.net/browse/MM-59349

@@ -47,12 +48,12 @@ func (s *SQLStore) AddUpdateCategoryBoard(userID string, categoryID string, boar
}

func (s *SQLStore) CanSeeUser(seerID string, seenID string) (bool, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Why not delete this function as its implemented in mattermostauthlayer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This required more cleaner, will do this as a part of this ticket: https://mattermost.atlassian.net/browse/MM-59349

server/services/store/sqlstore/public_methods.go Outdated Show resolved Hide resolved
server/services/store/sqlstore/public_methods.go Outdated Show resolved Hide resolved
Copy link
Member

@harshilsharma63 harshilsharma63 left a comment

Choose a reason for hiding this comment

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

Approving with one minor comment.

server/auth/auth_test.go Outdated Show resolved Hide resolved
@Rajat-Dabade Rajat-Dabade changed the title Deperate standalone SQL store level Deprecate standalone SQL store level Jul 9, 2024
Copy link
Member

@sbishel sbishel left a comment

Choose a reason for hiding this comment

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

Just some comments regarding another variable, I think can be removed. And it looks like there is already plans to completely remove mattermostauthlayer.go.

server/auth/auth_test.go Show resolved Hide resolved
server/server/initHandlers.go Outdated Show resolved Hide resolved
server/api/auth.go Outdated Show resolved Hide resolved
@marianunez marianunez requested review from marianunez and removed request for marianunez July 10, 2024 01:45
* removed remaining singleUser and isPlugin code

* chore: linter fixes
@Rajat-Dabade Rajat-Dabade merged commit 4735490 into deprecate-isplugin Jul 13, 2024
@Rajat-Dabade Rajat-Dabade deleted the deperate-store-leve branch July 13, 2024 06:13
Rajat-Dabade added a commit that referenced this pull request Jul 30, 2024
* refactor: isPlugin for API level

* chore: removed GetContextConn as it is not required

* chore: clean up api.go removed none required function

* chore: removed commented code

* refactor: removed the admin as its no log required

* refactor: removed handlePostTeamRegenerateSignupToken as not used anymore

* refactor: updated make file rules

* refactor: removed isGuest code

* refactor: removed auth login password changepassword code

* chore: linter fixes

* refactor: removed user login register code

* chore: linter fixes

* refactor: removed auth layer

* refactor: removed isSingle user checks

* chore: removed debugging logs

* chore: removed debugging logs

* revert: isGuestUser check

* Deprecate standalone SQL store level (#4)

* refactor: removed the mattermost auth check

* refactor: removed standalone sql part of code

* refactor: removed not required function from store level

* refactor: removed session check for plugin

* refactor: removed the unnecessary test

* refactor: removed MattermostAuth

* Deperate isPlugin and isSingleUser part - 2 (#5)

* removed remaining singleUser and isPlugin code

* chore: linter fixes

* MM-59356: Fixing testcase for webapp and server (#6)

* fix: webapp test cases

* refactor: added rules to makefile and added github workflow for testing

* chore: added ci github workflow

* chore: updated github flow for ci and typos

* chore: typefix

* refactor: added rule to install golangci lint

* chore: to trigger action

* fix: error in ci.yml

* refactor: updated rule

* refactor: fix linter issue

* [MM-59349]: Getting Rid of Mattermost Auth layer (#10)

* refactor: get rid of mattermost auth layer

* chore: removed removeDuplicate from isboardsFromRow

* refactor: changed method to private'

* refactor: private method calls private method

* refactor: get license from server API

* [MM-59824]: Removed website code. (#12)

* MM-59294: Workflow updated and release process (#7)

* refactor: updated workflow and Readme

* chore: added Contributing and security.md

* refactor: updated README and makefile with new release process

* refactor: updated the protected branch name

* refactor: readme

* refactor: updated README

* refactor: removed focalboard references

* refactor: updated README

* From `focalboard` to `board` to generate tar bundle (#14)

* refactor: changed name for generating tar

* refactor: changed from board to boards

* refactor: changed the folder name from board to boards

* fix: ci issue

* chore: ci fix

* chore: ci fix

* minor fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants