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

prepare actions to include qc report #10

Closed

Conversation

zsigmas
Copy link
Contributor

@zsigmas zsigmas commented May 31, 2024

  • Compacts GH actions building process in a single file equal, with minor changes, to the one we had before
  • Includes QC report steps in GH actions
  • We lose parallel execution of jobs, (execution time is low anyways and most time of parallel jobs is consumed in pod start up anyway)
  • Parallel loss is outweighed, in my opinion, by a simplified GH actions flow
  • Because the same pod is used, all artifacts generated are available across steps this simplifes including the qc report

The build will fail as actions points to @main and those actions do not exist there yet. They will build once the PR merged

Copy link
Collaborator

Choose a reason for hiding this comment

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

why merge check/lintr/pkgdown ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Main point is that pkgdown uses the output of tests to generate the quality control documentation, it is simpler that moving artifacts between Github action jobs. Secondarily, personal perspective, it is simpler to maintain a single R script that does all the job than maintaining separated yaml files.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would still separate the concerns. I can chip in on the artifacts part if you want.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ideally we should just plug-and-play other qc reports/validatoR as the industry evolves. This ensures that.

- name: Check URLs 🌐
run: |
lychee . --format markdown --verbose --no-progress >> $GITHUB_STEP_SUMMARY
shell: bash

- name: Checkout gh-pages branch ⬇️
if: github.ref_name == 'main'
Copy link
Collaborator

Choose a reason for hiding this comment

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

why generate pkgdown docs for every commit?

Copy link
Contributor Author

@zsigmas zsigmas Jun 3, 2024

Choose a reason for hiding this comment

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

Removed for debugging and creating the documentation, I will include it again

workflows.md Outdated Show resolved Hide resolved

steps:
- name: Checkout project ⬇️
uses: actions/checkout@v4

- name: Install package dependencies 📄
uses: boehringer-ingelheim/dv.templates/.github/actions/dependencies@main
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are now installed inside single build, but if we prefer a separate step for installing dependencies, no opposition.

message("###### INSTALLING (S) ######")
message("############################")

pak::local_install_deps(".", upgrade=FALSE, ask=FALSE, dependencies = TRUE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would say keep the deps step removed above (since it's a dependency in all steps, not just check/lintr/pkgdown) and comment these 2 lines

Copy link
Collaborator

Choose a reason for hiding this comment

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

also why not add the qc report code in this repo in the first place? it uses nobody outside BI to have it in the package repo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The qc report is used inside the test files to link specs and test cases, therefore it is required when running tests. In a next iteration we can think about ways to move it to dv.templates. No problem with that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

why not do it in the first place?

message("###### CHECKING (S) ######")
message("##########################")

check_results <- rcmdcheck::rcmdcheck(error_on = "never", args = "--no-tests")
Copy link
Collaborator

Choose a reason for hiding this comment

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

would definitely not serialize steps in a big file. KISS, remember?

Copy link
Collaborator

@sorinvoicu sorinvoicu Jun 3, 2024

Choose a reason for hiding this comment

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

  • why wait for fails if you can see them all at once and hopefully fix them in one go?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would argue that it is simpler to maintain a single R file that runs all the steps and offers a final summary with all the errors found. You don't wait more than having separate pods or have less information from my point of view, a table is included in the Action Summary, and in the end you have to check the logs anyway to find the specific errors.

Copy link
Collaborator

@sorinvoicu sorinvoicu Jun 3, 2024

Choose a reason for hiding this comment

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

old wheel to a new cart. disagree. I thought the action status would save you from doing just that...

Copy link
Contributor

Choose a reason for hiding this comment

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

@sorinvoicu
Strongly agree with @zsigmas on this one and I'm ready to die on this hill.

"One cart carrying all the things we need VS several carts that need coordination."

Copy link
Collaborator

@sorinvoicu sorinvoicu Jun 3, 2024

Choose a reason for hiding this comment

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

be my guest @ml-ebs-ext (a name update would work as well)

Copy link
Contributor

Choose a reason for hiding this comment

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

I have slept on the matter and have a few comments.

My combative wording ("ready to die on this hill") stems from your unfortunate "KISS, remember?" except I'm not insulting (accidentally or purposefully) anyone. In retrospect, I could have been more civil.

On the topic of simplicity, yes, I do think one big file that executes top-to-bottom is simpler than several files strung together through github actions. It is simpler because (in subjective decreasing order of importance):

  1. You only need to look in a single place to understand how the build process works.
  2. Related to the previous point, all build information is available at the same time on a single pod, making its manipulation trivial.
  3. You can run it locally without having to mirror github machinery on your machine (a luxury that our internal colleagues don't have). This means you can tweak it locally and have a pretty good sense that it's going to work without having to go through minutes-long trial and error, which not only makes us miserable but costs the company money.
  4. We have less work to do whenever github decides to deprecate features we rely on (https://github.blog/changelog/label/actions+deprecation/)
  5. It makes it easier for potential users to take our code and use it mostly as-is outside of github. Our choice of hosting platform should not dictate theirs.
  6. It is more environmentally friendly, because we save the cost of spinning up several containers (drop in the ocean, I know, considering we're encouraging the use of R).

I have numbered them so that you can comment on any of them individually and see where the nature of our disagreement lies. I would also like to know your reasons for thinking that a split .R file is simpler.

On the topic of my username: I revised it from mlebs to the obviously superior ml-ebs-ext, that make it clear that I'm an external working through EBS and my initials are "m" and "l".

Copy link
Contributor

Choose a reason for hiding this comment

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

@sorinvoicu Sorry, I failed to mention your nickname yesterday. This is an important issue because it sits upstream of developers and dictates the way they work. I would like to hear your reasons for thinking that a split .R file is simpler. Even if we fail to convince each other, the whole team can benefit from this conversation.

@sorinvoicu sorinvoicu self-requested a review June 3, 2024 08:03
@zsigmas zsigmas closed this Jun 3, 2024
@zsigmas zsigmas deleted the refactor_actions_for_qc branch June 3, 2024 15:08
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.

3 participants