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

Various QOL changes. #169

Merged
merged 14 commits into from
Mar 20, 2024
Merged

Various QOL changes. #169

merged 14 commits into from
Mar 20, 2024

Conversation

q-uint
Copy link
Collaborator

@q-uint q-uint commented Mar 12, 2024

.github/workflows/pull_request.yml Outdated Show resolved Hide resolved
schema/core.go Show resolved Hide resolved
examples_test.go Show resolved Hide resolved
logger.go Outdated Show resolved Hide resolved
@icamys
Copy link
Contributor

icamys commented Mar 13, 2024

Here's a PR that with a solution I propose regarding the logger: #170

@q-uint
Copy link
Collaborator Author

q-uint commented Mar 13, 2024

Thanks for taking the time to go though this @icamys! :)

@icamys
Copy link
Contributor

icamys commented Mar 13, 2024

@q-uint My pleasure! I am happy to work on improving this package.

@q-uint q-uint force-pushed the qol branch 2 times, most recently from abd57e3 to e2af284 Compare March 15, 2024 07:54
@q-uint q-uint requested a review from icamys March 15, 2024 07:55
@q-uint
Copy link
Collaborator Author

q-uint commented Mar 15, 2024

@icamys not sure why the tests are failing, I'll try to look at it later today.

logger.go Outdated Show resolved Hide resolved
@icamys
Copy link
Contributor

icamys commented Mar 15, 2024

@q-uint Thank you for merging the logger-related changes.

I have a proposal regarding the release strategy. Currently, when you run go get github.com/elimity-com/scim, you always get the latest version of the repo from the main branch, which is df55fde at the moment. Since this PR changes how the server is created, a package upgrade command invocation will probably break the existing builds for other devs using this package: they'll either have to update the Server construction in their code or roll back to the package version with which their applications work. For those who want to roll back, there won't be a release version to attach to, as they previously pulled just the latest version.

I propose to create a release for the currently latest commit in the main branch and name it, for example, 1.0, to allow people who want to use the old package version to roll back and attach to a release version. After this PR is merged into the main branch, create a new release, for example, 2.0, to allow those who want to use the newer version and upgrade their code to attach to 2.x versions.

@q-uint
Copy link
Collaborator Author

q-uint commented Mar 15, 2024

I will make sure to add tags. I will not make it a major version yet, since it is not feature complete. It will probably be 0.1 and 0.2.0.

@icamys
Copy link
Contributor

icamys commented Mar 15, 2024

@q-uint I'm ok with any approach, as I plan to use this package after this merge. Still, the issue about incrementing the minor version is that the package upgrade command go get -u package_name will upgrade to the latest minor or patch version according to the docs, which will break existing builds:

The -u flag instructs get to update modules providing dependencies of packages named on the command line to use newer minor or patch releases when available.

@q-uint
Copy link
Collaborator Author

q-uint commented Mar 16, 2024

We are still sub version 1, so people should upgrade with caution. An increase in minor version can mean non backwards compatible changes. The moment we release v1 we would not be able to do that anymore.


@icamys if you run the tests locally, do they also pass? I can not replicate the behavior of the CI on my machine.

@icamys
Copy link
Contributor

icamys commented Mar 16, 2024

@q-uint It also works fine on my machine. It is worth trying to create a new branch out of this one and push it to remote to trigger CI for it.


I saw that you changed back the server creation functions in the tests from getNewServer(t *testing.T) Server to getNewServer() (Server, error): there are a couple of instances left in:

  • internal/idp_test/util_test.go
  • internal/idp_test/okta_util_test.go
  • internal/idp_test/azuread_util_test.go

@mrene
Copy link

mrene commented Mar 16, 2024

Hi!

Github is running tests by checking out a commit equivalent to the merge between the PR and its base branch.

You can reproduce them by merging master inside qol before running tests, or by using the github-provided "merge" reference as such:

$ git fetch origin refs/pull/169/merge
$ git checkout FETCH_HEAD

Then, the line numbers will make more sense, as there are some changes in master that reference newTestServer() without expecting it to return an error value, causing the build to fail once both branches are merged together.

@q-uint
Copy link
Collaborator Author

q-uint commented Mar 17, 2024

Hi @mrene thanks for jumping in, totally forgot we were one commit behind on main! Thanks 😉

@q-uint q-uint requested a review from icamys March 17, 2024 16:17
@q-uint
Copy link
Collaborator Author

q-uint commented Mar 17, 2024

Please, feel free to review/comment! I will probably merge this Tuesday morning (CET).

Thanks for the feedback! 🏆

@icamys
Copy link
Contributor

icamys commented Mar 17, 2024

Hi @q-uint ! I will review it tomorrow morning; thank you!
Also, kudos to @mrene for explaining the issue.

Copy link
Contributor

@icamys icamys left a comment

Choose a reason for hiding this comment

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

Hi @q-uint ! I left a couple of comments related to the documentation and the Makefile. The code itself looks good.

@@ -0,0 +1,21 @@
.PHONY: all arrange tidy lint test
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the Makefile has been added, wouldn't using it in the Github workflow make sense? There is some code duplication now in both places.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is some duplication, the big difference is that in the CI it checks whether it has been done, and in the Makefile it is actually executing the actions.

Makefile Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@q-uint q-uint requested a review from icamys March 19, 2024 14:20
Copy link
Contributor

@icamys icamys left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@q-uint q-uint merged commit 172bf2a into master Mar 20, 2024
4 checks passed
@q-uint q-uint deleted the qol branch March 20, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: add custom logger support Azure's noncompliance of standard
3 participants