Skip to content

Commit f3f4987

Browse files
authored
Minor fix catalog exception exception and doc (#1829)
* Minor fix * Cleanup doc * improves msg
1 parent 6637e08 commit f3f4987

File tree

2 files changed

+42
-37
lines changed

2 files changed

+42
-37
lines changed

docs/releasing-workflow-instructions.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,46 @@ The process of creating staging/release/hotfix versions of code from [Master](ht
44

55
## Description
66

7-
Each commit on the master branch triggers a CI workflow that builds the simcore platform docker images.
8-
These docker images are then stored on [dockerhub](https://hub.docker.com/repositories/itisfoundation) registry in the itisfoundation repository.
9-
Each docker image are named following this pattern:
7+
Each commit on the *master* branch triggers a CI workflow that builds the simcore platform docker images.
8+
These docker images are then stored on [dockerhub](https://hub.docker.com/repositories/itisfoundation) registry in the itisfoundation [repository](https://hub.docker.com/repositories/itisfoundation).
9+
Each docker image are named with the following pattern:
1010

11-
- itisfoundation/[image_name]:master-[CINAME]-latest
12-
- itisfoundation/[image_name]:master-[CINAME]-[BUILD_DATE]--[BUILD_TIME].[GIT_SHA]
11+
- ``itisfoundation/[image_name]:master-[CINAME]-latest``
12+
- ``itisfoundation/[image_name]:master-[CINAME]-[BUILD_DATE]--[BUILD_TIME].[GIT_SHA]``
1313

1414
with:
1515

16-
- CINAME the name of the CI
17-
- BUILD_DATE is the build date
18-
- BUILD_TIME is the build time
19-
- GIT_SHA is the git SHA corresponding to the code used for building
16+
- ``CINAME`` the name of the CI
17+
- ``BUILD_DATE`` is the build date
18+
- ``BUILD_TIME`` is the build time
19+
- ``GIT_SHA is`` the git SHA corresponding to the code used for building
2020

2121
### Example
2222

23-
The ``webserver`` service in master branch with commit ``752ef...`` will be built by ``github`` actions CI on ``2020/08/31`` at ``12:36`` and therefore the image is named as:
23+
The ``webserver`` service in *master* branch with commit ``752ef...`` will be built by *github actions* CI on ``2020/08/31`` at ``12:36`` and therefore the image is named as:
2424

2525
- ``itisfoundation/webserver:master-github-v2.0.1-2020-08-31--12-36.752ef50f3babb6537580c0e03b85b9a8209bbf10``
2626
- ``itisfoundation/webserver:master-github-latest``
2727

2828
## Staging process
2929

30-
A staging version of simcore is like a pre-released version, that is marked as such on the master branch by leveraging Github pre-release tagging mechanism. The CI is triggered and will pull the marked docker images (by using the given git SHA or latest master build), and tag them as staging images.
31-
Each docker image are renamed as:
30+
A staging version of simcore is a *pre-released* version that is marked as such on the *master* branch by leveraging *Github* pre-release tagging mechanism. The CI is triggered and will pull the marked docker images (by using the given git SHA or latest *master* build), and tag them as staging images.
31+
Therefore, each docker image are renamed as:
3232

33-
- itisfoundation/[image_name]:staging-[CINAME]-latest
34-
- itisfoundation/[image_name]:staging-[CINAME]-staging_[BUILD_NAMEVERSION]-[BUILD_DATE]--[BUILD_TIME].[GIT_SHA]
33+
- ``itisfoundation/[image_name]:staging-[CINAME]-latest``
34+
- ``itisfoundation/[image_name]:staging-[CINAME]-staging_[BUILD_NAMEVERSION]-[BUILD_DATE]--[BUILD_TIME].[GIT_SHA]``
3535

3636
with:
3737

38-
- CINAME the name of the CI
39-
- BUILD_NAMEVERSION is a one word name and a number (e.g. DaJia0, Dajia1, ...)
40-
- BUILD_DATE is the build date
41-
- BUILD_TIME is the build time
42-
- GIT_SHA is the git SHA corresponding to the code used for building
38+
- ``CINAME`` the name of the CI
39+
- ``BUILD_NAMEVERSION`` is a one word name and a number (e.g. DaJia0, Dajia1, ...)
40+
- ``BUILD_DATE`` is the build date
41+
- ``BUILD_TIME`` is the build time
42+
- ``GIT_SHA`` is the git SHA corresponding to the code used for building
4343

4444
### Staging example
4545

46-
Just before the review of the ``DAJIA`` sprint we release a staging version ``v1.0.0``, the commit ``752ef...`` from above is tagged as stage and the ``github`` actions CI on ``2020/09/01`` at ``17:30``.
46+
Just before the review of the ``DAJIA`` sprint we release a staging version ``v1.0.0``, the commit ``752ef...`` from above is tagged as stage and the *Github actions* CI on ``2020/09/01`` at ``17:30``.
4747

4848
- ``itisfoundation/webserver:staging-github-stage_DAJIA1-2020-09-01--17-30.752ef50f3babb6537580c0e03b85b9a8209bbf10``
4949
- ``itisfoundation/webserver:staging-github-latest``
@@ -55,34 +55,34 @@ then after the review we do a couple of additions and re-release staging ``DAJIA
5555

5656
### Instructions to generate a staging release
5757

58-
1. Generate Github release tag
58+
1. Generate *Github* release tag
5959

6060
```bash
6161
git clone https://github.com/ITISFoundation/osparc-simcore.git
6262
cd osparc-simcore
6363
make release-staging name=SPRINTNAME version=VERSION (git_sha=OPTIONAL)
6464
```
65-
6665
2. Adjust the list of changes if needed
6766
3. Press the **Publish release** button
6867
4. The CI will be automatically triggered and will deploy the staging release
6968

69+
7070
## Release process
7171

72-
A released version of simcore, that is marked as such on the master branch by leveraging Github release tagging mechanism. The CI is triggered and will pull the marked staging docker images (by using the given git SHA or the latest staging images), and tag them as release images.
72+
A released version of simcore, that is marked as such on the *master* branch by leveraging *Github* release tagging mechanism. The CI is triggered and will pull the marked staging docker images (by using the given git SHA or the latest staging images), and tag them as release images.
7373
**NOTE:** A release version is ALWAYS preceded by a staging version. The CI will fail if it does not find the corresponding staging version.
7474
Each docker build marked as released are tagged as:
7575

76-
- itisfoundation/[image_name]:release-[CINAME]-latest
77-
- itisfoundation/[image_name]:release-[CINAME]-v[RELEASE_VERSION]-[BUILD_DATE]--[BUILD_TIME].GIT_SHA
76+
- ``itisfoundation/[image_name]:release-[CINAME]-latest``
77+
- ``itisfoundation/[image_name]:release-[CINAME]-v[RELEASE_VERSION]-[BUILD_DATE]--[BUILD_TIME].GIT_SHA``
7878

7979
with:
8080

81-
- CINAME the name of the CI
82-
- RELEASE_VERSION is a version number following semantic versioning (e.g. 1.0.0, 1.2.0, 1.2.1, ...)
83-
- BUILD_DATE is the build date
84-
- BUILD_TIME is the build time
85-
- GIT_SHA is the git SHA corresponding to the code used for building
81+
- ``CINAME`` the name of the CI
82+
- ``RELEASE_VERSION`` is a version number following semantic versioning (e.g. 1.0.0, 1.2.0, 1.2.1, ...)
83+
- ``BUILD_DATE`` is the build date
84+
- ``BUILD_TIME`` is the build time
85+
- ``GIT_SHA`` is the git SHA corresponding to the code used for building
8686

8787
### Release example
8888

@@ -93,7 +93,7 @@ The team decides to release to production the lastest staging version of ``DAJIA
9393

9494
### Instructions to generate a release
9595

96-
1. Generate Github release tag
96+
1. Generate *Github* release tag
9797

9898
```bash
9999
git clone https://github.com/ITISFoundation/osparc-simcore.git
@@ -109,10 +109,10 @@ The team decides to release to production the lastest staging version of ``DAJIA
109109

110110
A hotfix is **ALWAYS made from an already released version**. A branch is created from the tagged release version (must be named hotfix_v*) and the fix is implemented there following usual best practices. On each commit in that branch the CI is triggered and will generate the following images in Dockerhub:
111111

112-
- itisfoundation/[image_name]:hotfix-[CINAME]-latest
113-
- itisfoundation/[image_name]:hotfix-[CINAME]-[BUILD_DATE]--[BUILD_TIME].[GIT_SHA]
112+
- ``itisfoundation/[image_name]:hotfix-[CINAME]-latest``
113+
- ``itisfoundation/[image_name]:hotfix-[CINAME]-[BUILD_DATE]--[BUILD_TIME].[GIT_SHA]``
114114

115-
Once ready, the release-hotfix process starts by leveraging Github release mechanism. The CI will trigger again and pull the docker images (based on git SHA or latest hotfix image) and push a new release version.
115+
Once ready, the release-hotfix process starts by leveraging *Github* release mechanism. The CI will trigger again and pull the docker images (based on git SHA or latest hotfix image) and push a new release version.
116116

117117
Each docker build marked as released are tagged as described in the Release process.
118118

@@ -127,7 +127,7 @@ A bug was found in version 1.2.0 of the simcore stack. The team decides to fix i
127127

128128
### Instructions to generate a hotfix release
129129

130-
1. Generate Github release tag
130+
1. Generate *Github* release tag
131131

132132
```bash
133133
git clone https://github.com/ITISFoundation/osparc-simcore.git

services/catalog/src/simcore_service_catalog/services/director.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,17 @@ def _unenvelope_or_raise_error(resp: Response) -> Dict:
6969
return data or {}
7070

7171
@functools.wraps(request_func)
72-
async def request_wrapper(self: "AuthSession", path: str, *args, **kwargs):
72+
async def request_wrapper(self: "DirectorApi", path: str, *args, **kwargs):
7373
try:
7474
normalized_path = path.lstrip("/")
7575
resp = await request_func(self, path=normalized_path, *args, **kwargs)
7676
except Exception as err:
77-
logger.exception("Failed to put %s%s", self.client.base_url, path)
77+
logger.exception(
78+
"Failed request %s to %s%s",
79+
request_func.__name__,
80+
self._client.base_url,
81+
path,
82+
)
7883
raise HTTPException(status.HTTP_503_SERVICE_UNAVAILABLE) from err
7984

8085
return _unenvelope_or_raise_error(resp)

0 commit comments

Comments
 (0)