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

Feature 77: Improve Development Actions #84

Merged
merged 8 commits into from
Apr 17, 2024

Conversation

daniel-va
Copy link
Contributor

@daniel-va daniel-va commented Apr 12, 2024

This feature has not been fully tested and should not be merged yet!

PR for #77.

The new build workflow defines the following automatic release process:

  1. When pushing to any branch, the code is tested, linted and type checked.
  2. If all these actions passed, when pushing to develop, the edge Docker images are built and pushed.
  3. If all these actions passed, when pushing to main, the edge Docker images are tagged as release-candidate.

The rewritten release workflow defines the following manual release process:

  1. The release-candidate Docker images are tagged as latest.

These workflows contain the following notable changes to their predecessors:

  • Builds and releases are only triggered after successful code checks.
  • The Docker images are only built once instead of being rebuilt for every sub-release.
    This is done by adding a new tag to existing images when releasing them.
  • The Docker image release for prod is now tagged latest instead of release.
  • Docker images are only tagged with actual version numbers when releasing for prod.

The workflow will no longer add a new image tagged as `release`.
Also, the ChangeLog has been removed completely as it is not used by the current project team.
@daniel-va daniel-va added the enhancement New feature or request label Apr 12, 2024
@daniel-va daniel-va self-assigned this Apr 12, 2024
@daniel-va
Copy link
Contributor Author

One point that I'm not yet decided on is how to handle/generate version numbers.
The current live workflows use a three-part versioning system (i.e. X.X.X), generated using the following method:

  • The first two numbers are taken from the VERSION file. They haven't been changed since their introduction.
  • The last number is taken from the run counter of any workflow that is building and tagging Docker images.
  • Due to how the current build process works, Docker images are built by three different workflows. This means that we use three different version numbers, one for dev (edge, eX.X.X), one for int (release-candidate, rcX.X.X) and prod (release, vX.X.X). These numbers don't have any direct relation to each other.

The issue with different versions by release would be fixed in this PR, by only building the images once and then just adding new tags per release. However, since the PR replaces the existing workflows, it effectively "resets" the version's last number to 1.

Personally, I would move to a two-part versioning system (i.e. X.X), where the first number is always 1, which should only change if the application is ever fully rewritten or replaced. The second number should be an incrementing number starting at 1. If possible, I would only increment the second number on a prod release, instead of on each dev build, as it happens with the current system. This has the following advantages:

  • The version number is fully defined and has meaning.
  • Images that are never pushed to prod are automatically replaced instead of being kept forever, as is the case now.
  • All pushed images that are tagged with a version number can be assumed to be production ready.

@vej-ananas vej-ananas linked an issue Apr 16, 2024 that may be closed by this pull request
@daniel-va daniel-va merged commit 915df96 into develop Apr 17, 2024
@daniel-va daniel-va deleted the feature/asset-77-improve-development-actions branch April 17, 2024 12:35
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

Successfully merging this pull request may close these issues.

Improve development actions
1 participant