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

Handle lowercase project ids #59

Merged
merged 4 commits into from
Sep 20, 2022
Merged

Conversation

jesperes
Copy link
Contributor

Fixes bug #34 (Workzone plugin does not handle lowercase project ids), and also bug #58 (bitbucket does not preserve ssh key order).

The `logger` API will not automatically flush logging before
the BEAM exits, so we call logger_std_h:filesync/1 explicitly.
When getting the access keys for a repo, Bitbucket does not preserve
the order of the access keys, so sort them before comparing.
The workzone plugin is known to be confused and silently ignore
changes to projects when the project key is in lower case, so always
convert to upper case.
@jesperes jesperes requested a review from a team as a code owner September 20, 2022 07:51
@jesperes
Copy link
Contributor Author

Note to @klarna-incubator/kred-core reviewers: this has been tested internally at Klarna (see the sync-with-upstreams branch in tools-bec).

@@ -80,7 +80,7 @@ do_request(Method, Url, Body) ->
Type = "application/json",
Request = {Url, Headers, Type, Body},
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe put _Body here so that warning_as_errors won't cause compilation to fail?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, but for some weird reason, rebar.config uses fail_on_warning, which I thinks is not a valid option.

{erl_opts             , [fail_on_warning, debug_info]}.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But Body is actually a function argument, so this is not a problem.

@jesperes jesperes merged commit 35243ab into master Sep 20, 2022
@jesperes jesperes deleted the handle-lowercase-project-ids branch September 20, 2022 08:31
@jesperes jesperes linked an issue Sep 20, 2022 that may be closed by this pull request
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.

Bitbucket does not preserve access key order
2 participants