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

Improvements to CI pipeline, workflow organisation #5773

Merged
merged 8 commits into from
May 17, 2023

Conversation

eternaltyro
Copy link
Contributor

  • Revert to Python 3.9 <-- Python 3.10 for compatibility
  • Breakout frontend and backend checks and builds as their own jobs
  • Add a separate job for RDS database backup
  • Whittle down the generic "build" job to temporary commands - to be removed later
  • Removed Database snapshot cleanup step
  • Introduce good workflows - initial draft Separate workflows for production, staging/dev, TM Assisted, and TeachOSM instances.
  • Improve branch filters for workflow jobs: Move to workflow level filters.

@AfiMaameDufie
Copy link
Contributor

@eternaltyro the cleanup LGTM

@Aadesh-Baral
Copy link
Contributor

@eternaltyro I'd like to see how configuration is carried out in the circle-ci app. Can you merge develop into this branch as backend-code-check-black is blocking the entire execution and it was fixed in develop?

@eternaltyro eternaltyro force-pushed the enhance/circleci-syntactic-sugar branch from f2da09f to cdd4cc3 Compare May 9, 2023 10:22
@eternaltyro
Copy link
Contributor Author

@Aadesh-Baral done

Copy link
Contributor

@Aadesh-Baral Aadesh-Baral left a comment

Choose a reason for hiding this comment

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

Some processes (mostly build and deploy-backend) use the Python 3.7.14, whereas other jobs use Python 3.9. Can Python 3.9 be used for all jobs?

Additionally, since requirements.txt will eventually be removed, we might need to install backend dependencies via pdm or by generating requirements.txt with pdm export.

.circleci/config.yml Show resolved Hide resolved
- Revert to Python 3.9 <-- Python 3.10 for compatibility
- Breakout frontend and backend checks and builds as their own jobs
- Add a separate job for RDS database backup
- Whittle down the generic "build" job to temporary commands - to be
  removed later
- Removed Database snapshot cleanup step
- Introduce good workflows - initial draft
  Separate workflows for production, staging/dev, TM Assisted, and
  TeachOSM instances.
- Improve branch filters for workflow jobs: Move to workflow level
  filters.
Setup a separate temporary database for running test cases in the CI
pipeline.
- Move POSTGRES_TEST_DB envvar to primary image
- Add PG USER, ENDPOINT vars to primary image
- Simplify package installation step into separate runs
- Break long commands
- Remove the modern flow
@eternaltyro eternaltyro force-pushed the enhance/circleci-syntactic-sugar branch from 2234f8f to a83e0db Compare May 16, 2023 17:09
- Move from python:3.7.14-node to python:3.9.14-node, later versions use
  node v18 which is incompatible
- Split tasks into their own run steps
- Add pdm and disable virtualenv creation
@eternaltyro
Copy link
Contributor Author

@Aadesh-Baral thanks for the review. Comments below:

Some processes (mostly build and deploy-backend) use the Python 3.7.14, whereas other jobs use Python 3.9. Can Python 3.9 be used for all jobs?

They will use Python 3.9.14 image for now. I can move to a later version of 3.9 or even 3.10 once the frontend PR are merged.

Additionally, since requirements.txt will eventually be removed, we might need to install backend dependencies via pdm or by generating requirements.txt with pdm export.

This is already included in the changes I made.

The earlier PR #5184 switched the default TM_LOG_DIR from `logs` to
`/home/appuser` which is not present in circleCI. Switched it out for
/tmp/logs to make tests work.
@sonarcloud
Copy link

sonarcloud bot commented May 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@Aadesh-Baral Aadesh-Baral left a comment

Choose a reason for hiding this comment

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

LGTM

@eternaltyro eternaltyro merged commit 224139c into develop May 17, 2023
8 checks passed
@eternaltyro eternaltyro deleted the enhance/circleci-syntactic-sugar branch May 17, 2023 09:57
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.

None yet

3 participants