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

[#572] Allow image url with more than 2 slashes to be parsed properly. #577

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

mnovak1
Copy link
Contributor

@mnovak1 mnovak1 commented Aug 30, 2024

Please make sure your PR meets the following requirements:

  • Pull Request contains a description of the changes
  • Pull Request does not include fixes for multiple issues/topics
  • Code is formatted, imports ordered, code compiles and tests are passing
  • Code is self-descriptive and/or documented

CI runs:
Without fix: https://url.corp.redhat.com/a7db151
With fix: https://url.corp.redhat.com/bbed950

  • GalleonDatasourceNoDriverVersionTest#noMsSQLDriverVersion,GalleonDatasourceFeaturePackMsSQLTest - caused by not updated mssql image
  • Rerun HAServletCounterUpstreamKubePingTest,RollingUpdatesKubePingTest → https://url.corp.redhat.com/e8c1138 passed

@mnovak1 mnovak1 requested a review from mchoma August 30, 2024 14:06
@@ -70,7 +71,10 @@ public static Image from(String imageUrl) {
repoTag = slashTokens[2];
break;
default:
throw new IllegalArgumentException("image '" + imageUrl + "' should have one or two '/' characters");
registry = slashTokens[0];
user = slashTokens[1];
Copy link
Contributor

Choose a reason for hiding this comment

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

This is different to what dosu says :) My understanding is aligned with dosu implementation.

IIUC dosu implementation #572 (comment) will bring this result

registry = mcr.microsoft.com
user = mssql/rhel
repoTag = server:2022-CU13-rhel-9.1

whereas your implementation will bring

registry = mcr.microsoft.com
user = mssql
repoTag = rhel/server:2022-CU13-rhel-9.1

Copy link
Contributor

Choose a reason for hiding this comment

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

to me the latter makes more sense, though we are only bending image url (which can be almost anything) to what the class expects

Copy link
Contributor

@mchoma mchoma Sep 2, 2024

Choose a reason for hiding this comment

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

Yes, you was faster than me wanted to write user = mssql makes more sense to me now while thinking about it.

Dosu just implemented what I requested in issue.

Copy link
Contributor

@mchoma mchoma left a comment

Choose a reason for hiding this comment

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

I consider #572 for addressed. Now it is enabled to use image url with more than 2 slashes.

Tests proove results are expected.

@mchoma mchoma merged commit 2ae4d79 into xtf-cz:master Sep 2, 2024
2 checks passed
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.

3 participants