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

Create a workflow to test and build the API-dummy image on github elifesciences/issues#9006 #260

Merged
merged 13 commits into from
Oct 30, 2024

Conversation

scottaubrey
Copy link
Member

@scottaubrey scottaubrey commented Oct 21, 2024

elifesciences/issues#9006

@scottaubrey scottaubrey marked this pull request as draft October 21, 2024 08:23
@scottaubrey scottaubrey mentioned this pull request Oct 21, 2024
@scottaubrey
Copy link
Member Author

This is a very invasive replacement. It would mean needing to update all the downstream dependencies at once - doable, but needs some time an coordination. Blocking #259

@giorgiosironi
Copy link
Contributor

Why does it need to atomically affect all downstream dependencies? For example, journal uses a pinned image tag so it should not see any change if this just published new images at new tags named after a commit sha.
It would still remain possible to update the version used in journal manually, by editing the .env file, if needed in development.

@scottaubrey
Copy link
Member Author

Why does it need to atomically affect all downstream dependencies? For example, journal uses a pinned image tag so it should not see any change if this just published new images at new tags named after a commit sha. It would still remain possible to update the version used in journal manually, by editing the .env file, if needed in development.

Yup true. I was thinking about the automated update pipelines in Jenkins downstream, because the way I went about doing this is so invasive that I didn't keep the jenkins pipelines working. It would mean dismantling those connections, though nothing would break the the immediate, I would want to tidy up after myself so to speak.

Equally, it is just work, but not easy to just "merge" when reviewed and OK.

@giorgiosironi
Copy link
Contributor

Noticing the Jenkinsfile deploys to a api-dummy--demo environment though, that would need to be retired (or redeployed somewhere else is still useful).

Will join the infrastructure team stand-up today to coordinate with the application development going on in journal and api-dummy.

@scottaubrey scottaubrey marked this pull request as ready for review October 24, 2024 14:10
@scottaubrey
Copy link
Member Author

This PR should now:

  • continue to build and test on Jenkins and publish the result to docker hub, finally deploying to demo
  • build and test on github actions workflow and publish the result to github container repository.

@scottaubrey scottaubrey force-pushed the build-on-github branch 3 times, most recently from e36b36b to 73c4dcf Compare October 25, 2024 07:58

```$sh
cd /srv/api-dummy
./bin/import 09560
docker compose run app ./bin/import 09560
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the only task I run into problems with, perhaps a Linux file ownership issue:

[16:23:06][giorgio@Arconia:~/code/api-dummy]$ docker compose run app ./bin/import 92110
WARN[0000] /home/giorgio/code/api-dummy/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
WARN[0000] Found orphan containers ([api-dummy-app-run-6f44d91c5293 api-dummy-composer-run-1984308df2a2 api-dummy-composer-run-73e461503125]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. 
[+] Creating 1/0
 ✔ Container api-dummy-composer-1  Created                                                                                                        0.0s 
[+] Running 1/1
 ✔ Container api-dummy-composer-1  Started                                                                                                        0.2s 
PHP Fatal error:  Uncaught Symfony\Component\Filesystem\Exception\IOException: Failed to touch "/srv/api-dummy/bin/../data/articles/92110.json". in /srv/api-dummy/vendor/symfony/filesystem/Filesystem.php:150
Stack trace:
#0 /srv/api-dummy/bin/import(66): Symfony\Component\Filesystem\Filesystem->touch('/srv/api-dummy/...')
#1 {main}
  thrown in /srv/api-dummy/vendor/symfony/filesystem/Filesystem.php on line 150

Copy link
Contributor

Choose a reason for hiding this comment

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

./bin/import 09560 remains available as a workaround.


```$sh
docker compose run --rm app ./project_tests.sh
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Tested the rest of the README on Linux.

@scottaubrey scottaubrey merged commit 1344937 into develop Oct 30, 2024
7 checks passed
@scottaubrey scottaubrey deleted the build-on-github branch October 30, 2024 17:00
@scottaubrey
Copy link
Member Author

TYVM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants