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

fix: parsed url is not exposed (#11816) #11916

Merged
merged 4 commits into from Jan 10, 2023

Conversation

alexef
Copy link
Member

@alexef alexef commented Jan 9, 2023

follow up on: #11819 according to @RomanBats
fixes: #11816
fixes: #11922

Now the code of revisionURL is consistent with repoURL above it. not anymore after subtler fix

Signed-off-by: Alex Eftimie alex.eftimie@getyourguide.com

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
@alexef alexef requested a review from rbreeze January 9, 2023 08:33
@alexef alexef added bug Something isn't working breaking/high A possibly breaking change with high impact labels Jan 9, 2023
@alexef alexef added this to the v2.6 milestone Jan 9, 2023
@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Base: 47.29% // Head: 47.29% // No change to project coverage 👍

Coverage data is based on head (2632d95) compared to base (abf6d73).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11916   +/-   ##
=======================================
  Coverage   47.29%   47.29%           
=======================================
  Files         245      245           
  Lines       41665    41665           
=======================================
  Hits        19706    19706           
  Misses      19974    19974           
  Partials     1985     1985           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@woehrl01
Copy link
Contributor

woehrl01 commented Jan 9, 2023

@alexef

I suggest a more subtle fix like this, as it won't hide possible future unrelated errors on other method calls:

let parsed;
try {
    parsed = GitUrlParse(url);
} catch {
    // URL Parsing failed
    return null;
}

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
@crenshaw-dev
Copy link
Collaborator

@alexef could I trouble you for some unit tests on this function? :-)

@crenshaw-dev
Copy link
Collaborator

Also, am I correct to only cherry-pick this to 2.6?

@alexef
Copy link
Member Author

alexef commented Jan 10, 2023

@crenshaw-dev yes, this is 2.6 only. I'll add the unit tests

@alexef
Copy link
Member Author

alexef commented Jan 10, 2023

@crenshaw-dev nevermind, the tests already exists: https://github.com/argoproj/argo-cd/blob/master/ui/src/app/shared/components/urls.test.ts#L7

now the question is why they didn't fail when the previous change was introduced that changed the scope of const parsed?

@crenshaw-dev
Copy link
Collaborator

@alexef good question... I'll leave that as an exercise for later, since this fixes an important issue. :-)

@crenshaw-dev crenshaw-dev merged commit 2f8da71 into argoproj:master Jan 10, 2023
crenshaw-dev pushed a commit that referenced this pull request Jan 10, 2023
* fix: parsed url is not exposed (#11816)

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* subtler fix, thanks @woehrl01

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
@crenshaw-dev
Copy link
Collaborator

Cherry-picked onto release-2.6 for 2.6.0-rc3.

@alexef alexef deleted the fix-js-parsed branch January 10, 2023 15:37
@jannfis
Copy link
Member

jannfis commented Jan 15, 2023

@alexef May I ask why you set the breaking/high label on this bug? Is it by mistake, or is this a breaking change?

@alexef
Copy link
Member Author

alexef commented Jan 16, 2023

@jannfis the UI was completely broken (unable to view application details, presented stacktrace, no workaround) in master and in the 2.6 branch until rc3. If this doesn't grant a breaking/high I'm happy to remove it - also from related PR/issues, there were a few around this same story.

@jannfis
Copy link
Member

jannfis commented Jan 16, 2023

@alexef Ah. Just as a heads-up for the future, the breaking/* labels indicate that a given change itself is breaking (e.g. is not backwards-compatible). For classifying bugs' severity, you can use the severity/* labels.

@alexef alexef removed the breaking/high A possibly breaking change with high impact label Jan 16, 2023
emirot pushed a commit to emirot/argo-cd that referenced this pull request Jan 27, 2023
* fix: parsed url is not exposed (argoproj#11816)

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* subtler fix, thanks @woehrl01

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: emirot <emirot.nolan@gmail.com>
schakrad pushed a commit to schakrad/argo-cd that referenced this pull request Mar 14, 2023
* fix: parsed url is not exposed (argoproj#11816)

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* subtler fix, thanks @woehrl01

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Signed-off-by: schakrad <chakradari.sindhu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cherry-pick/2.6
Projects
None yet
4 participants