Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add GitLabCredentials placeholder text for token field #26

Closed
wants to merge 1 commit into from

Conversation

serinamarie
Copy link

@serinamarie serinamarie commented Aug 31, 2023

Part of closing PrefectHQ/prefect#10468

Screenshot 2023-08-31 at 3 36 56 PM

Screenshots

Checklist

  • References any related issue by including "Closes #" or "Closes ".
    • If no issue exists and your change is not a small fix, please create an issue first.
  • Includes tests or only affects documentation.
  • Passes pre-commit checks.
    • Run pre-commit install && pre-commit run --all locally for formatting and linting.
  • Includes screenshots of documentation updates.
    • Run mkdocs serve view documentation locally.
  • Summarizes PR's changes in CHANGELOG.md

@serinamarie serinamarie marked this pull request as ready for review August 31, 2023 20:40
@serinamarie serinamarie requested a review from a team as a code owner August 31, 2023 20:40
@desertaxle
Copy link
Member

I believe that all our consumers of this block append oauth2: to the token when necessary. If that's true, is this change necessary?

@serinamarie
Copy link
Author

As requested in the issue, if not placeholder text we could include a better description since this is a recurrent issue.

Would something like this make more sense?
Screenshot 2023-08-31 at 3 57 53 PM

@serinamarie
Copy link
Author

serinamarie commented Aug 31, 2023

@desertaxle
Community issues:

GitLab
https://prefect-community.slack.com/archives/CL09KU1K7/p1689115696739679?thread_ts=1689088572.689859&cid=CL09KU1K7

https://prefect-community.slack.com/archives/CL09KU1K7/p1690867549084869?thread_ts=1689088572.689859&cid=CL09KU1K7

Some users are just using GitHubCredentials blocks as a workaround instead, which isn't ideal:
https://prefect-community.slack.com/archives/CM28LL405/p1692025643321819?thread_ts=1690989437.858689&cid=CM28LL405

There are more such issues for BitBucket as well.

But users do ask in multiple places in community for documentation on it.

@desertaxle
Copy link
Member

In those threads, I see that our git_clone step wasn't formatting the URL, and that burden was placed on the user. You've improved the git_clone step to handle this for users seamlessly, so whether users prefix their tokens has no impact on functionality. That makes me think this change isn't needed, but let me know if there's a use case I'm not considering.

@serinamarie
Copy link
Author

I was thinking if we were to add other deployment steps!

However, with the new _format_token_from_access_token and _format_token_from_credentials helper functions, it shouldn't be hard to do the same thing with similar deployment steps using git. I'll close this then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants