Add a local stack for ERC20 watcher #80

Merged
prathamesh0 merged 8 commits from pm-erc20-watcher-stack into main 2022-12-22 06:03:39 +00:00
prathamesh0 commented 2022-12-21 14:03:05 +00:00 (Migrated from github.com)

Part of https://github.com/cerc-io/watcher-ts/issues/278

  • Add a stand-alone local stack for ERC20 watcher (including core services)
  • Add a demo
Part of https://github.com/cerc-io/watcher-ts/issues/278 - Add a stand-alone local stack for ERC20 watcher (including core services) - Add a demo
zramsay reviewed 2022-12-21 14:27:54 +00:00
@ -0,0 +7,4 @@
COPY . .
RUN echo "Building watcher-ts" && \
git checkout v0.2.19 && \
Member

i get error: pathspec 'v0.2.19' did not match any file(s) known to git
even though i see the latest watcher-ts release of v0.2.19 is over an hour ago. checkout works locally, maybe be that the cache docker pulls takes a bit to update?

i get `error: pathspec 'v0.2.19' did not match any file(s) known to git` even though i see the latest watcher-ts release of `v0.2.19` is over an hour ago. checkout works locally, maybe be that the cache docker pulls takes a bit to update?
prathamesh0 (Migrated from github.com) reviewed 2022-12-21 14:51:39 +00:00
@ -0,0 +7,4 @@
COPY . .
RUN echo "Building watcher-ts" && \
git checkout v0.2.19 && \
prathamesh0 (Migrated from github.com) commented 2022-12-21 14:51:38 +00:00

@zramsay
Thanks for catching; it's actually because we need to pull the repo if it already exists in the dev-root directory.
Should be fixed now.

@zramsay Thanks for catching; it's actually because we need to pull the repo if it already exists in the dev-root directory. Should be fixed now.
zramsay reviewed 2022-12-21 14:55:33 +00:00
@ -0,0 +7,4 @@
COPY . .
RUN echo "Building watcher-ts" && \
git checkout v0.2.19 && \
Member

awesome, yep --pull did the trick, thanks

awesome, yep `--pull` did the trick, thanks
dboreham reviewed 2022-12-21 15:00:09 +00:00
@ -0,0 +7,4 @@
COPY . .
RUN echo "Building watcher-ts" && \
git checkout v0.2.19 && \
Owner

A special branch should be implemented in laconic-so setup-repositories. I think there is already some support for non-main branches there but it's been a while since I tried it.

A special branch should be implemented in `laconic-so setup-repositories`. I think there is already some support for non-main branches there but it's been a while since I tried it.
zramsay reviewed 2022-12-21 16:14:16 +00:00
@ -0,0 +7,4 @@
COPY . .
RUN echo "Building watcher-ts" && \
git checkout v0.2.19 && \
Member

oh i see, --pull is only required because this PR isn't merged on to main, makes sense

oh i see, `--pull` is only required because this PR isn't merged on to main, makes sense
Member

the demo works like a charm
edit: bunch of missing info for metamask related stuff (e.g, token's currency symbol is GLD) but I can add to the demo later on

the demo works like a charm edit: bunch of missing info for metamask related stuff (e.g, token's currency symbol is GLD) but I can add to the demo later on
prathamesh0 (Migrated from github.com) reviewed 2022-12-22 05:33:08 +00:00
@ -0,0 +7,4 @@
COPY . .
RUN echo "Building watcher-ts" && \
git checkout v0.2.19 && \
prathamesh0 (Migrated from github.com) commented 2022-12-22 05:33:08 +00:00

I think there is already some support for non-main branches there but it's been a while since I tried it.

@dboreham
I see that checking out to branches is currently supported using the --branches-file option.
However, when I try checking out to the required release tag, it works if the HEAD is pointing to a branch and throws the following error if it's detached (checked out to a release tag for eg.):

(venv) $ laconic-so --verbose setup-repositories --include cerc-io/watcher-ts --pull --branches-file branches.txt
loading branches from: branches.txt
Branches are: ['cerc-io/watcher-ts v0.2.18']
.
.
  File "/home/prathamesh/deepstack/stack-orchestrator/app/setup_repositories.py", line 116, in process_repo
    present_text = f"already exists active branch: {git.Repo(full_filesystem_repo_path).active_branch}" if is_present \
  File "/home/prathamesh/deepstack/stack-orchestrator/venv/lib/python3.10/site-packages/git/repo/base.py", line 865, in active_branch
    return self.head.reference
  File "/home/prathamesh/deepstack/stack-orchestrator/venv/lib/python3.10/site-packages/git/refs/symbolic.py", line 309, in _get_reference
    raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha))
TypeError: HEAD is a detached symbolic reference as it points to '9566dff4664f1f9620d2edd6a3ce78a7c6ca40c3'
> I think there is already some support for non-main branches there but it's been a while since I tried it. @dboreham I see that checking out to branches is currently supported using the `--branches-file` option. However, when I try checking out to the required release tag, it works if the `HEAD` is pointing to a branch and throws the following error if it's detached (checked out to a release tag for eg.): ``` (venv) $ laconic-so --verbose setup-repositories --include cerc-io/watcher-ts --pull --branches-file branches.txt loading branches from: branches.txt Branches are: ['cerc-io/watcher-ts v0.2.18'] . . File "/home/prathamesh/deepstack/stack-orchestrator/app/setup_repositories.py", line 116, in process_repo present_text = f"already exists active branch: {git.Repo(full_filesystem_repo_path).active_branch}" if is_present \ File "/home/prathamesh/deepstack/stack-orchestrator/venv/lib/python3.10/site-packages/git/repo/base.py", line 865, in active_branch return self.head.reference File "/home/prathamesh/deepstack/stack-orchestrator/venv/lib/python3.10/site-packages/git/refs/symbolic.py", line 309, in _get_reference raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha)) TypeError: HEAD is a detached symbolic reference as it points to '9566dff4664f1f9620d2edd6a3ce78a7c6ca40c3' ```
prathamesh0 (Migrated from github.com) reviewed 2022-12-22 05:36:19 +00:00
@ -0,0 +7,4 @@
COPY . .
RUN echo "Building watcher-ts" && \
git checkout v0.2.19 && \
prathamesh0 (Migrated from github.com) commented 2022-12-22 05:36:19 +00:00

oh i see, --pull is only required because this PR isn't merged on to main, makes sense

--pull is actually required because the repo we're trying to setup has a new remote branch / tag.

> oh i see, --pull is only required because this PR isn't merged on to main, makes sense `--pull` is actually required because the repo we're trying to setup has a new remote branch / tag.
dboreham reviewed 2022-12-22 05:37:12 +00:00
@ -0,0 +7,4 @@
COPY . .
RUN echo "Building watcher-ts" && \
git checkout v0.2.19 && \
Owner

Hmm...ok. But do we need to support the "already detached" state? Wouldn't the repo have been cloned by stack-orchestrator, hence it wouldn't be detached?

Hmm...ok. But do we need to support the "already detached" state? Wouldn't the repo have been cloned by stack-orchestrator, hence it wouldn't be detached?
prathamesh0 (Migrated from github.com) reviewed 2022-12-22 05:43:11 +00:00
@ -0,0 +7,4 @@
COPY . .
RUN echo "Building watcher-ts" && \
git checkout v0.2.19 && \
prathamesh0 (Migrated from github.com) commented 2022-12-22 05:43:11 +00:00

hence it wouldn't be detached

It might be in a detached state when we run setup-repositories the next time (re-running the demo for eg.).

> hence it wouldn't be detached It might be in a detached state when we run `setup-repositories` the next time (re-running the demo for eg.).
dboreham reviewed 2022-12-22 05:47:01 +00:00
@ -0,0 +7,4 @@
COPY . .
RUN echo "Building watcher-ts" && \
git checkout v0.2.19 && \
Owner

Ok, this approach is fine until we add proper branch/tag-switching support.

Ok, this approach is fine until we add proper branch/tag-switching support.
dboreham approved these changes 2022-12-22 05:48:16 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#80
No description provided.