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

Decouple version tag from the repo #111

Open
surchs opened this issue Apr 8, 2024 · 4 comments
Open

Decouple version tag from the repo #111

surchs opened this issue Apr 8, 2024 · 4 comments
Labels
bug:performance Performance defects or response time degradation. _flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again type:bug Defects in shipped code and fixes for those defects

Comments

@surchs
Copy link
Contributor

surchs commented Apr 8, 2024

Right now we fetch the release number every time any user interacts with the App:

useEffect(() => {
// TODO: replace with react-query-tool once there is a release
const GHApiURL = 'https://api.github.com/repos/neurobagel/query-tool/releases/latest';
axios
.get(GHApiURL)
.then((response) => {
const { data } = response;
setLatestReleaseTag(data.tag_name);
})
.catch(() => {
setLatestReleaseTag('beta');
});
}, []);

This will break real quick with some level of load - and even just from running the e2e test suite a couple of times:
image

There is really no reason to fetch this at all! The purpose of string is to tell you what version you are running, not what version is available. So this number should get baked into the build of the tool and read at build time from the build context, not from the repository!

@surchs surchs added bug:performance Performance defects or response time degradation. type:bug Defects in shipped code and fixes for those defects labels Apr 8, 2024
@surchs
Copy link
Contributor Author

surchs commented Apr 8, 2024

I think there is a related problem (without the same performance impact) because we pull the neurobagel logo live every time the app loads for a user - couldn't find the issue for that, so maybe we need to make one

@rmanaem
Copy link
Contributor

rmanaem commented Apr 9, 2024

There is really no reason to fetch this at all! The purpose of string is to tell you what version you are running, not what version is available. So this number should get baked into the build of the tool and read at build time from the build context, not from the repository!

I agree that it's better to have this baked in somewhere instead of pulling from the repo every time but having it hardcoded and having to update it every time a new release is made seems inefficient.

@surchs
Copy link
Contributor Author

surchs commented Apr 9, 2024

Agree, we'd need something that runs automatically at release time, but only once

Copy link

We want to keep our issues up to date and active. This issue hasn't seen any activity in the last 75 days.
We have applied the _flag:stale label to indicate that this issue should be reviewed again.
When you review, please reread the spec and then apply one of these three options:

  • prioritize: apply the flag:schedule label to suggest moving this issue into the backlog now
  • close: if the issue is no longer relevant, explain why (give others a chance to reply) and then close.
  • archive: sometimes an issue has important information or ideas but we won't work on it soon. In this case
    apply the someday label to show that this won't be prioritized. The stalebot will ignore issues with this
    label in the future. Use sparingly!

@github-actions github-actions bot added the _flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:performance Performance defects or response time degradation. _flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again type:bug Defects in shipped code and fixes for those defects
Projects
Status: No status
Development

No branches or pull requests

2 participants