Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

deployment on master fails #665

Closed
markus2330 opened this issue Jul 18, 2023 · 15 comments
Closed

deployment on master fails #665

markus2330 opened this issue Jul 18, 2023 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@markus2330
Copy link
Contributor

Describe the Bug

https://build.libelektra.org/blue/organizations/jenkins/PermaPlanT-Folder%2FPermaplanT/detail/master/304/pipeline

Steps to Reproduce the Problem

trigger master build

Expected Result

all green 🟢

Actual Result

+ sudo /usr/local/bin/permaplant-deploy.sh dev /home/jenkins/workspace/maPlanT-Folder_PermaplanT_master
+ INSTANCE_PATH=/opt/permaplant/dev
+ BACKEND_BINARY=/home/jenkins/workspace/maPlanT-Folder_PermaplanT_master/backend/target/release/backend
+ SERVICE=permaplant-dev
+ [[ ! -d /home/jenkins/workspace/maPlanT-Folder_PermaplanT_master ]]
+ [[ ! -d /opt/permaplant/dev ]]
+ cd /home/jenkins/workspace/maPlanT-Folder_PermaplanT_master/backend
+ LC_ALL=C
+ diesel --version
diesel 2.0.1
+ cd /home/jenkins/workspace/maPlanT-Folder_PermaplanT_master/backend
+ LC_ALL=C
+ diesel migration run --locked-schema
Running migration 2023-07-03-165000_heatmap
Failed to run 2023-07-03-165000_heatmap with: column "geometry" of relation "maps" contains null values
script returned exit code 1

PermaplanT version

master

Operating System

Linux

Browser

Firefox

Versions of other relevant software/extensions

No response

Additional info/logs

No response

@markus2330 markus2330 added the bug Something isn't working label Jul 18, 2023
@4ydan
Copy link
Contributor

4ydan commented Jul 18, 2023

I have seen this error in a PR that was probaly merged now.

@markus2330
Copy link
Contributor Author

Thx! Can you also add the link to the build log?

Btw. the PR must have some changes to migrations...

@4ydan
Copy link
Contributor

4ydan commented Jul 18, 2023

Yes, I think we should really not merge stuff that doesnt go completely through the pipeline.
Something like this is really dangerous
image
Just because only mdbook fails, doesnt mean everything else is fine, we need to wait for the deploy stage. It's harder to track down now.

@markus2330
Copy link
Contributor Author

I agree.

My best guess it that the faulty one is: #595

We don't have yet the #134, so it slipped through (even though being successfully build).

If there are no other ideas, I would revert #595

@4ydan
Copy link
Contributor

4ydan commented Jul 18, 2023

I can try some commits out. Up to you.

@4ydan
Copy link
Contributor

4ydan commented Jul 18, 2023

I will checkout #595 and test it locally.

@4ydan
Copy link
Contributor

4ydan commented Jul 18, 2023

Yes its that branch.
Interesting though, because the branch was rebased, right? And all checks were passing?

image

@4ydan
Copy link
Contributor

4ydan commented Jul 18, 2023

Hm, I cant reproduce it anymore, what should be done after resetting the database to reproduce it?

@markus2330
Copy link
Contributor Author

You cannot reproduce it anymore after your have reset the database, this is in the nature of these migrations.

I created #666 to revert. Unfortunately, it cannot be tested on pr.libelektra.org, so I need to merge to master to see if it works.

@markus2330
Copy link
Contributor Author

Probably the better option is to merge #644 and reset the databases already for this release (and hope we can stay compatible). Let us see if it builds.

@4ydan
Copy link
Contributor

4ydan commented Jul 18, 2023

Also should we maybe rethrow the exception to make the pipeline fail or do we leave it like this?

@markus2330
Copy link
Contributor Author

Absolutely! I just noticed that https://build.libelektra.org/blue/organizations/jenkins/PermaPlanT-Folder%2FPermaplanT/detail/master/303/pipeline also already failed.

As #644 is not ready yet we will probably need to do the resetting of DBs twice.

I already resetted dev.permaplant.net, let us see if https://build.libelektra.org/blue/organizations/jenkins/PermaPlanT-Folder%2FPermaplanT/detail/master/305/pipeline will work.

@markus2330
Copy link
Contributor Author

markus2330 commented Jul 18, 2023

Worked! Now release: https://build.libelektra.org/job/PermaPlanT-Folder/job/PermaplanT-Release/14/ (also resetted the DB)

@markus2330
Copy link
Contributor Author

Also worked, 0.2.3 is now released!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants