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

Uniform circleci workflow with main repository #261

Closed
Czaki opened this issue Oct 31, 2023 · 4 comments · Fixed by #266
Closed

Uniform circleci workflow with main repository #261

Czaki opened this issue Oct 31, 2023 · 4 comments · Fixed by #266
Labels

Comments

@Czaki
Copy link
Contributor

Czaki commented Oct 31, 2023

🧰 Task

In the context of the fail spotted in #259 I found that circleci workflow between the main repository and this repository differs.

I think that we should find a way to uniform it for simplifaction of maintenance.

@Czaki Czaki added the task label Oct 31, 2023
@Czaki
Copy link
Contributor Author

Czaki commented Oct 31, 2023

We may investigate orbs for this:

https://circleci.com/docs/orb-concepts/
https://circleci.com/docs/reusing-config/

@Czaki
Copy link
Contributor Author

Czaki commented Nov 2, 2023

Short summary.
Circle ci does not allow just passing paths to a YAML file (like in GitHub reusable workflows). It requires adding an orb to some form of register, and the orb needs to live in a separate repository.

So, the advantage of using Orb is that we could have a single source of truth that should require one PR to fix docs built in both repositories. The disadvantage is the next repository to maintain.

Another option is to create a build docs script (improve makefile, for example). The advantage is that it does not add a separate repository. It still has a single PR to fix most of the problems. The disadvantage is that the main changes, like the change of the Python version, will still require two PRs and the log will be less readable.

The third option is just to synchronize .circle/config.yml to represent the same structure.

@psobolewskiPhD
Copy link
Member

psobolewskiPhD commented Nov 3, 2023

I think I'd vote for option 3. We can put a reminder in the comments in both files that if you PR one to do the other. I can't imagine these workflows needing that much regular maintenance anyways.

Edit: oops, mis-clicked close. sorry!

@melissawm
Copy link
Member

I can see the appeal of automating this but I do fear it will be one more script to maintain anyway. So I'd vote for option 3 as well. We could add someone as a code owner on the actions (I'd be happy to be pinged for that, or maybe one of the core devs) to make sure they are pinged whenever there are changes that need to be synced.

Carreau pushed a commit to napari/napari that referenced this issue Nov 12, 2023
Implement of napari/docs#261 in the main repository

Uniform circleci workflow across main and docs repository for easier maintenance

Co-authored-by: Peter Sobolewski <[email protected]>
Czaki added a commit that referenced this issue Nov 12, 2023
# References and relevant issues
together with napari/napari#6417 closes #261

# Description


Diff:
```diff
diff .circleci/config.yml ../napari/.circleci/config.yml                                                     1 ↵
10c10
<           path: docs
---
>           path: napari
12,13c12,13
<           name: Clone main repo into a subdirectory
<           command: git clone [email protected]:napari/napari.git napari
---
>           name: Clone docs repo into a subdirectory
>           command: git clone [email protected]:napari/docs.git docs
```

```diff
diff .github/workflows/build_docs.yml ../napari/.github/workflows/build_docs.yml                             1 ↵
2c2
< # https://github.com/napari/napari/blob/main/.github/workflows/build_docs.yml
---
> # https://github.com/napari/docs/blob/main/.github/workflows/build_docs.yml
6c6
<   pull_request:
---
>   push:
8c8,10
<       - main
---
>       - docs
>     tags:
>       - 'v*'
9a12
>   workflow_call:
19a23
>           repository: napari/docs
25d28
<           repository: napari/napari
```

---------

Co-authored-by: Peter Sobolewski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants