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

Fix/continuous delivery #834

Open
wants to merge 10 commits into
base: staging
Choose a base branch
from
Open

Conversation

Ellen-Wittingen
Copy link
Contributor

If the workflow fails with an error message about blobs along the lines of the following: buildx failed with: ERROR: failed to solve: [...] blob [...] then all recent cache files for staging on the Caches page need to be deleted and the workflow needs to be executed again. Instructions for this were added to the README.md.

Also added the option Perform all jobs, regardless of whether there are actual changes? to force the workflow to re-execute all its jobs. This was added because if the previous workflow run errored after staging was merged into master it will detect no changes and skip the Continuous Integration and Publish Image jobs, which means the changes won't go live.

@@ -7,6 +7,11 @@ on:
description: Merge staging into master first? (y/N)
required: false
default: 'n'
Copy link
Member

Choose a reason for hiding this comment

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

Can you make this one boolean too? I think I made it like this because boolean was not an option back in the day, but I see the UI nicely supports it now. Don't forget the checks below :)

README.md Show resolved Hide resolved
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 13.79%. Comparing base (26f13a0) to head (d96386b).

Additional details and impacted files
@@           Coverage Diff            @@
##           staging     #834   +/-   ##
========================================
  Coverage    13.79%   13.79%           
========================================
  Files          450      450           
  Lines         3067     3067           
========================================
  Hits           423      423           
  Misses        2644     2644           

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

@lodewiges lodewiges dismissed guidojw’s stale review October 29, 2024 13:44

changes have been implemented

@DrumsnChocolate
Copy link
Contributor

@lodewiges there's a problem with your commit: you have not taken care of the places where the value of this input is used. You can't change a type without updating the usages of the variable.
Will you be able to identify the occurrences in the workflow, and fix them? You can find all of these in continuous-delivery.yaml. An example is line 49:
INPUT_MERGE: ${{ github.event.inputs.merge }}
the line is followed by usage of INPUT_MERGE where the variable is checked to be 'y' or 'n'. That will most certainly not result in expected behaviour now that we've changed it to a boolean.

Copy link
Contributor

@DrumsnChocolate DrumsnChocolate left a comment

Choose a reason for hiding this comment

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

see comment

Copy link
Contributor

@DrumsnChocolate DrumsnChocolate left a comment

Choose a reason for hiding this comment

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

only one last request

@@ -61,7 +67,7 @@ jobs:
name: Merge
runs-on: ubuntu-latest
needs: metadata
if: github.event.inputs.merge == 'y'
if: github.event.inputs.merge == true
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if: github.event.inputs.merge == true
if: github.event.inputs.merge

can't we do this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@lodewiges lodewiges Nov 10, 2024

Choose a reason for hiding this comment

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

we need to decide what would be better, and implement that everywhere, i forgot it in one line.

Copy link
Contributor

Choose a reason for hiding this comment

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

You are talking about shell expressions, I'm talking about GitHub expressions: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions

They are separate concepts.

I've doublechecked why I suggested this. I come to a slightly more nuanced conclusion now, based on https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs
I think the conclusion is we can use inputs.merge and we don't need to check against a string, but when we use github.event.inputs.merge we do need to check against a string, because:

The workflow will also receive the inputs in the github.event.inputs context. The information in the inputs context and github.event.inputs context is identical except that the inputs context preserves Boolean values as Booleans instead of converting them to strings. The choice type resolves to a string and is a single selectable option.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think implemented it correctly can you check?

.github/workflows/continuous-delivery.yml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants