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

Make the pypirc generation script safer #6410

Closed

Conversation

pavoljuhas
Copy link
Collaborator

  • avoid accidental modification of user's pypirc, instead
    have the script output new config without changing any file.

  • use absolute path in the shebang.

  • drop unnecessary triple quotes.
    In bash they just concatenate an empty string.

  • fail script early if required environment variables do not exist.

* avoid accidental modification of user's pypirc, instead
  have the script output config without changing any file

* use absolute path in the shebang

* drop unnecessary triple quotes.
  In bash they just concatenate an empty string.

* fail script early if required environment variables do not exist
Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c8f7ed7) 97.81% compared to head (4d00579) 97.81%.
Report is 2 commits behind head on main.

❗ Current head 4d00579 differs from pull request most recent head 3cb69c1. Consider uploading reports for the commit 3cb69c1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6410      +/-   ##
==========================================
- Coverage   97.81%   97.81%   -0.01%     
==========================================
  Files        1111     1111              
  Lines       97088    97088              
==========================================
- Hits        94965    94964       -1     
- Misses       2123     2124       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@NoureldinYosri
Copy link
Collaborator

@pavoljuhas wiil this work and not get a permission denied

@pavoljuhas
Copy link
Collaborator Author

@pavoljuhas wiil this work and not get a permission denied

strange, let me check this. converting to a draft for few test commits...

@pavoljuhas pavoljuhas marked this pull request as draft January 10, 2024 18:46
@NoureldinYosri
Copy link
Collaborator

@pavoljuhas I also have this draft #6409. which one do you think we should go with?

@pavoljuhas
Copy link
Collaborator Author

@pavoljuhas I also have this draft #6409. which one do you think we should go with?

#6409 looks good, let us go with that one.

@pavoljuhas
Copy link
Collaborator Author

@pavoljuhas wiil this work and not get a permission denied

strange, let me check this. converting to a draft for few test commits...

I see - the permission denied was happening for the main branch at ea6fabc,
because dev_tools/packaging/create_pypirc.sh did not have executable permission.
This PR set the executable permission for the script so it passed the CI at 85261cd.

#6409 is also a good solution so let us stick with that one.

@pavoljuhas
Copy link
Collaborator Author

Superseded by #6409

@pavoljuhas pavoljuhas closed this Jan 10, 2024
@pavoljuhas pavoljuhas deleted the make-pypirc-creation-safer branch January 10, 2024 19:18
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.

2 participants