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

Avatar metadata for BitBucket organization folder is reworked #700

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

duemir
Copy link
Member

@duemir duemir commented Apr 28, 2023

Since code is already has conditional branches for Server vs Cloud, handling of Avatar Metadata was split from single Action into two separate one. This enabled:

  • Deprecating the copypaste of Avatar caching logic.
  • Simplifying the BitBucket Cloud avatar metadata action
  • Re-working the BitBucket Server avatar metadata action to avoid capturing the copy of a credential.

Related to:

Your checklist for this pull request

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or in Jenkins JIRA
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Did you provide a test-case? That demonstrates feature works or fixes the issue.

Since code is already has conditional branches for Server vs Cloud, handling of Avatar Metadata was split from single Action into two separate one. This enabled:

* Deprecating the copypaste of Avatar caching logic.
* Simplifying the BitBucket Cloud avatar metadata action
* Re-working the BitBucket Server avatar metadata action to avoid capturing the copy of a credential.
@duemir
Copy link
Member Author

duemir commented Apr 28, 2023

@olamy @Dohbedoh can you check this out? It is not done but shows an alternative approach to Avatar loading that should work for all credential stores, not just system.
FYI @lifeofguenter

@duemir
Copy link
Member Author

duemir commented Apr 28, 2023

I checked all the OSS plugins that depend on bitbucket-branch-source, none of which use src/main/java/com/cloudbees/jenkins/plugins/bitbucket/avatars/UrlAvatarCacheSource.java, which is why I just deleted it.

@lifeofguenter
Copy link
Contributor

Thanks for your contribution <3 - would it be possible to fix the spotbugs issues?

public final long lastModified;

@Deprecated
class AvatarImage extends jenkins.scm.impl.avatars.AvatarImage {

Check notice

Code scanning / CodeQL

Class has same name as super class Note

AvatarImage has the same name as its supertype
jenkins.scm.impl.avatars.AvatarImage
.
@donkee
Copy link

donkee commented Jun 16, 2023

@duemir Any chance you could finish this PR?

@duemir
Copy link
Member Author

duemir commented Jun 17, 2023

@donkee I'd love to. I'm just finding it hard to get some focus time for the work.

@pniederlag
Copy link
Contributor

Can we somehow help? It's a constant source of pain for anyone with expiring tokens/passwords.

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.

None yet

4 participants