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

Release v5.0.0 Grünkohl #12920

Closed
12 tasks done
rioug opened this issue Oct 15, 2024 · 4 comments
Closed
12 tasks done

Release v5.0.0 Grünkohl #12920

rioug opened this issue Oct 15, 2024 · 4 comments
Assignees

Comments

@rioug
Copy link
Collaborator

rioug commented Oct 15, 2024

1. Preparation on Thursday

  • Merge pull requests in the Ready To Go column
  • Include translations: script/release/update_locales
    • You need the Transifex Client installed on your local dev environement to run the script.
  • Increment version number: git push upstream HEAD:refs/tags/vX.Y.Z
    • Major: if server changes are required (eg. provision with ofn-install)
    • Minor: larger change that is irreversible (eg. migration deleting data)
    • Patch: all others. Shortcut: script/release/tag
  • Draft new release. Look at previous releases for inspiration.
    • Select new release tag
    • Generate release notes and check to ensure all items are arranged in the right category.
  • Notify #instance-managers of user-facing 👀, API ⚠️ and experimental 🚧 changes.

2. Testing

3. Finish on Tuesday

  • Publish and notify #global-community (this is automatically posted with a plugin)
  • Deploy the new release to all managed instances.
    Command line instructions
    cd ofn-install
    git pull
    ansible-playbook --limit all_prod --extra-vars "git_version=vX.Y.Z" playbooks/deploy.yml
    
  • Notify #instance-managers:

    @instance_managers The new release has been deployed.

  • Create issue for next release and confirm with next release manager in #core-devs.

The full process is described at https://github.com/openfoodfoundation/openfoodnetwork/wiki/Releasing.

@mkllnk
Copy link
Member

mkllnk commented Oct 17, 2024

I created another tag in between again. You'll need to adjust the release note generation to the last official release tag v4.6.11.

@drummer83 drummer83 moved this from All the things 💤 to Test Ready 🧪 in OFN Delivery board Oct 21, 2024
@mkllnk mkllnk changed the title Release Release v5.0.0 Grünkohl Oct 22, 2024
@filipefurtad0 filipefurtad0 self-assigned this Oct 22, 2024
@filipefurtad0 filipefurtad0 added the no-staging-AU A tag which does not trigger deployments, indicating a server is being used label Oct 22, 2024
@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Oct 22, 2024

Hey @rioug ,

I've tested the release, and the usual test cases show no issues, all good here:
https://docs.google.com/document/d/1IkUr7Fcipzr5oCggC7c03nzcqS3rG9XZdTKCx5Z-zZQ/edit?tab=t.0

However, I thought I'd have a look in the products page, given we're rolling out a big chunk. Unfortunately, it can be seen, that after staging this PR, new products/variants (1, pic below) retain the attributed unit scale but previously created products/variants (2, pic below) are left without a unit scale. Interestingly, it appears ok in the shopfrot:

image

I've checked the DB and it looks like the issue is not only on the UI, variant_unit_scale is NULL for variant 2):

For variant 1):


openfoodnetwork=> select variant_unit, variant_unit_scale, unit_value from spree_variants where id = 158192;
 variant_unit | variant_unit_scale | unit_value 
--------------+--------------------+------------
 weight       |               1000 |      22000

For variant 2)

openfoodnetwork=> select variant_unit, variant_unit_scale, unit_value from spree_variants where id = 158187;
 variant_unit | variant_unit_scale | unit_value 
--------------+--------------------+------------
 weight       |                    |       1000
(1 row)

I don't know why, but this was (and is, as of now) not observed in staging-AU, where the PR #12787 was tested:

image

I'm afraid this release might be removing unit scale from all variants, so I'd mark it as blocked, for now. I'm a bit puzzled by this, I'd expect this to have been seen in staging-AU, before.

Happy for your thoughts on this.

EDIT: I realize we have discussed a similar situation, but to my understanding there are two distinct situations:

  • if the UI displays the option to select an empty value -> release is not blocked, as per this comment and issue.
  • if unit scale values are removed from previously existing variants -> release is blocked

I'll delete the migrations, re-stage, and check again.

@filipefurtad0 filipefurtad0 added no-staging-FR A tag which does not trigger deployments, indicating a server is being used blocked and removed no-staging-AU A tag which does not trigger deployments, indicating a server is being used no-staging-FR A tag which does not trigger deployments, indicating a server is being used labels Oct 22, 2024
@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Oct 22, 2024

After deleting the migrations with:


bundle exec rails db:migrate:down VERSION=20240819045115
bundle exec rails db:migrate:down VERSION=20240618013850

and re-staging the PR, we get the following result:

Variant 1) (from the pic in the previous comment) now has an empty variant_unit_scale:


openfoodnetwork=> select variant_unit, variant_unit_scale, unit_value from spree_variants where id = 158192;
 variant_unit | variant_unit_scale | unit_value 
--------------+--------------------+------------
 weight       |                    |      22000
(1 row)

Variant 2) now has the correct information an empty variant_unit_scale:

openfoodnetwork=> select variant_unit, variant_unit_scale, unit_value from spree_variants where id = 158187;
 variant_unit | variant_unit_scale | unit_value 
--------------+--------------------+------------
 weight       |               1000 |       1000
(1 row)

With an empty (mandatory) value, no changes can be made to the page. I think this might render the page unusable.

image

So, I'm not sure we're good here. Can you confirm @rioug @RachL ?

@rioug rioug added no-staging-FR A tag which does not trigger deployments, indicating a server is being used no-staging-UK A tag which does not trigger deployments, indicating a server is being used labels Oct 22, 2024
@rioug
Copy link
Collaborator Author

rioug commented Oct 22, 2024

I think the database was a bit out of sync, probably because the PR was staged on the server but the migration were never reverted before this release was staged.

I reverted the migration using :

bundle exec rails db:migrate:down VERSION=20240819045115
bundle exec rails db:migrate:down VERSION=20240618013850

I then staged the current release and set up some test data :
Before_staging

After staging v5.0.0 I can see the unit scale are correct :
varian_unit_after

@rioug rioug removed no-staging-FR A tag which does not trigger deployments, indicating a server is being used no-staging-UK A tag which does not trigger deployments, indicating a server is being used blocked labels Oct 22, 2024
@rioug rioug closed this as completed Oct 23, 2024
@github-project-automation github-project-automation bot moved this from Test Ready 🧪 to Done in OFN Delivery board Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants