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

chore: simplify staging #2018

Merged
merged 9 commits into from
Aug 22, 2024
Merged

chore: simplify staging #2018

merged 9 commits into from
Aug 22, 2024

Conversation

albttx
Copy link
Member

@albttx albttx commented May 2, 2024

This simplify the staging servers system.

It's using the docker image: watchtower to automatically pull-update new gno versions.

It's currently deployed on the server: we now have

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@albttx albttx requested review from moul and a team as code owners May 2, 2024 10:55
Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.23%. Comparing base (e94f76f) to head (107b34c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2018      +/-   ##
==========================================
- Coverage   60.23%   60.23%   -0.01%     
==========================================
  Files         562      562              
  Lines       75026    75026              
==========================================
- Hits        45192    45189       -3     
- Misses      26462    26466       +4     
+ Partials     3372     3371       -1     
Flag Coverage Δ
contribs/gnodev 61.40% <ø> (ø)
contribs/gnofaucet 15.31% <ø> (+0.85%) ⬆️
gno.land 64.61% <ø> (ø)
gnovm 64.33% <ø> (ø)
misc/genstd 80.54% <ø> (ø)
misc/logos 19.88% <ø> (-0.36%) ⬇️
tm2 62.10% <ø> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@moul
Copy link
Member

moul commented May 2, 2024

It looks better. However, staging should not just update with new commits but also restart regularly, like every hour. Please, maintain this periodic schedule as well.

@albttx
Copy link
Member Author

albttx commented May 2, 2024

It looks better. However, staging should not just update with new commits but also restart regularly, like every hour. Please, maintain this periodic schedule as well.

Sure, what do you prefer?

  • Restart every hour
  • Restart every day at 00:00 for example ?

I can add something like:

  restarter:
    image: docker:cli
    volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
    command: ["/bin/sh", "-c", "while true; do sleep 86400; docker restart ${CONTAINER_NAME}; done"]

or

  restarter:
    image: docker:cli
    restart: unless-stopped
    volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
    entrypoint: ["/bin/sh","-c"]
    command:
      - |
        while true; do
          if [ "$$(date +'%H:%M')" = '20:00' ]; then
            docker restart myservice
          fi
          sleep 60
        done

@leohhhn
Copy link
Contributor

leohhhn commented May 6, 2024

Closes: #1866

Can we also make the port consistent with other networks (make it :443)?

I believe resetting each 1h is too short - since staging is good for throwaway code & demoing, maybe resetting it each 3-6 hours, starting from midnight (say CET timezone) is good. WDYT @moul?

Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Thank you for the fix 🙏

I've left a few comments

misc/deployments/staging.gno.land/docker-compose.yml Outdated Show resolved Hide resolved
misc/deployments/staging.gno.land/docker-compose.yml Outdated Show resolved Hide resolved
misc/deployments/staging.gno.land/gnoland.entrypoint.sh Outdated Show resolved Hide resolved
@leohhhn
Copy link
Contributor

leohhhn commented Jun 12, 2024

@albttx

Please update the appropriate docs as well, in docs/references/network-config.md 🙏

@albttx
Copy link
Member Author

albttx commented Jun 13, 2024

All good ! :)

  • I've added the restarter everyday at 22:00 (UTC)
  • Docs updated (cc: @leohhhn )
  • Ports removed + default chain id updated ( cc: @zivkovicmilos )

Copy link
Contributor

@leohhhn leohhhn left a comment

Choose a reason for hiding this comment

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

Good on the docs side - thanks @albttx!

@zivkovicmilos zivkovicmilos merged commit e60e4ca into master Aug 22, 2024
118 checks passed
@zivkovicmilos zivkovicmilos deleted the staging-v2 branch August 22, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants