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

Fetch Python environment from Sleipnir.jl for CI #6

Closed
JordiBolibar opened this issue Jul 7, 2023 · 4 comments
Closed

Fetch Python environment from Sleipnir.jl for CI #6

JordiBolibar opened this issue Jul 7, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@JordiBolibar
Copy link
Member

Right now we are duplicating the environment.yml file in each of the repos for the CI to have access to the Python environment. This is problematic, since any update to the Python environment will have to be extended to the 4 ODINN repositories.

For that, we should update the CI to download (e.g. using wget) the environment.yml file from Sleipnir.jl's GitHub repo.

@JordiBolibar JordiBolibar added the enhancement New feature or request label Jul 7, 2023
@facusapienza21
Copy link
Member

I managed to sync files across repositories using the repo-file-sync-action with GH Actions. An example of how this work is illustrated in these two toy repositories:

  • Origin repository. This will be Sleipnir.jl and we will sync the environment.yml
  • Destiantion repository: Huginn.jl, Muninn.jl, ODINN.jl
    After implementing the action and configure the sync file with the details of the repository, the next step is to create a fined-grained token (ideally, using ODINN-SciML as the owner) and add it as a GH secret in the origin repository. After the setup of the GH credentials is done (this has to be updated every 90 days), a Pull Request will be created in the destination repository. We can force the PR to be accepted, but I oppening a PR is actually the best posible workflow for this goal.

What do you think @JordiBolibar ? I can directly implement this in Sleipnir and sync with all the required repositories.

@facusapienza21 facusapienza21 self-assigned this Aug 6, 2023
@JordiBolibar
Copy link
Member Author

JordiBolibar commented Aug 6, 2023

Sounds good! The only annoying thing seems the 90 day token renewal, which will require maintenance.

@facusapienza21
Copy link
Member

Actually, I think you can manually configure the token to never expire. However, I am not sure about how good of a practice this is. The good news is that the new tokens in GH allow you to have a very fine-tune on the tokens, meaning that we can create a token JUST for sync the repositories we want and JUST with the necessary right to perform the sync action. In this way, we don't need to compromise any security of the repo by creating this token forever. Also, this will be kept secret in GH, so we will be safe. I can move forward with this @JordiBolibar and implement accross repositories.

@JordiBolibar
Copy link
Member Author

OK, go for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants