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

Feature/publish python package #6

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Conversation

catcombo
Copy link
Contributor

@catcombo catcombo commented Oct 2, 2024

I prepared changes in pyproject.toml and CI for publishing spec2sdk to PyPI as we did for https://github.com/moneymeets/youtrack-sdk/ My only concerns are PyPI credentials. PyPI changed requirements and I had to switch to authorization token instead of basic authorization when I deployed one of my personal package in the last time. Probably, we should switch to authorization token here and in the YouTrack SDK as well. Can you login to PyPI and check if my statement is true? If this is true, we can use POETRY_PYPI_TOKEN_PYPI instead of POETRY_HTTP_BASIC_PYPI_* in the publish.yml.

Copy link
Contributor

@felix11h felix11h left a comment

Choose a reason for hiding this comment

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

My only concerns are PyPI credentials. PyPI changed requirements and I had to switch to authorization token instead of basic authorization when I deployed one of my personal package in the last time. Probably, we should switch to authorization token here and in the YouTrack SDK as well. Can you login to PyPI and check if my statement is true? If this is true, we can use POETRY_PYPI_TOKEN_PYPI instead of POETRY_HTTP_BASIC_PYPI_* in the publish.yml.

I have tried to log in, it says the user does not exist. Maybe something about the saved credentials we have is incorrect? I can't say more about this at the moment as I wasn't involved in setting this up, but will clarify with Marcel once he is back.

In general, I'm definitely in favour of using the recommended authorization with PyPI.

.github/workflows/publish.yml Outdated Show resolved Hide resolved
.github/workflows/publish.yml Outdated Show resolved Hide resolved
@felix11h
Copy link
Contributor

felix11h commented Oct 7, 2024

Can you login to PyPI and check if my statement is true? If this is true, we can use POETRY_PYPI_TOKEN_PYPI instead of POETRY_HTTP_BASIC_PYPI_* in the publish.yml.

We were able to log in, and it turns out that we are already using the token for authorization. I guess it's indeed confusing that the environment variables are called POETRY_HTTP_BASIC_PYPI_*. We can set the token as action secret under the name of POETRY_PYPI_TOKEN_PYPI if you prefer (https://python-poetry.org/docs/configuration#pypi-tokenname).

@catcombo
Copy link
Contributor Author

catcombo commented Oct 7, 2024

Can you login to PyPI and check if my statement is true? If this is true, we can use POETRY_PYPI_TOKEN_PYPI instead of POETRY_HTTP_BASIC_PYPI_* in the publish.yml.

We were able to log in, and it turns out that we are already using the token for authorization. I guess it's indeed confusing that the environment variables are called POETRY_HTTP_BASIC_PYPI_*. We can set the token as action secret under the name of POETRY_PYPI_TOKEN_PYPI if you prefer (https://python-poetry.org/docs/configuration#pypi-tokenname).

I prefer to use token. It's more secure. I'll updated PR to use POETRY_PYPI_TOKEN_PYPI instead of POETRY_HTTP_BASIC_PYPI_*.

Copy link

@marns93 marns93 left a comment

Choose a reason for hiding this comment

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

We need to add the variable POETRY_PYPI_TOKEN_PYPI with Pulumi first (PR: https://github.com/moneymeets/moneymeets-pulumi/pull/712).
Furthermore, I would prefer to update youtrack-sdk as well for consistency.

Copy link
Contributor

@felix11h felix11h left a comment

Choose a reason for hiding this comment

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

Deployed the update the Action secrets (https://github.com/moneymeets/moneymeets-pulumi/pull/712), publishing can be tested/merged.

@catcombo
Copy link
Contributor Author

catcombo commented Oct 8, 2024

/rebase

@mergealot mergealot force-pushed the feature/publish-python-package branch from 16f833b to cbd9d36 Compare October 8, 2024 07:45
@catcombo catcombo merged commit cc8f6d9 into master Oct 8, 2024
4 checks passed
@catcombo catcombo deleted the feature/publish-python-package branch October 8, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants