frcStaticFileDeploy FileTreeArtifact not noticing new files

Hi everybody,

Yesterday one of our students struggled for a long time with static file deployment. The deploy process as a whole would run successfully but the frcStaticFileDeploy FileTreeArtifact step never noticed that there was anything for it to do, it always reported something the gist of which was “skipping this step because it’s up to date”. The student wasn’t doing anything unusual at all, just dropped a file in the “deploy” directory, with the other files that have deployed correctly before, and it didn’t work.

Does anyone have any advice about how to troubleshoot this kind of failure? The whole GradleRIO/deployutils thing is a mystery to me. The README implies that there’s some sort of “cache”? Does this survive vscode restarts or “clean workspace”?

Maybe @Thad_House has some advice? Are there any more docs beyond the deployutils readme?

When it does a deploy, it checks to see if all the files already exist in the target, by matching their hashes. If they do, it skips deployment. That’s what that message says, and what the caching is. The way to force a redeploy is to ssh into the device and manually delete the files you want to redeploy. But if you just change the files, the changed files should redeploy.

It’s possible there’s a bug with the gradle targets though. Do you have the project I can look at?

yeah, that makes sense. i don’t see how it could ignore a new static file. it deployed the jar fine, but not the static files.

the project is github.com/team100/main2023/swerve100.

Which files in the deploy folder are not deploying?

Actually, I see the issue @truher. frcStaticFileDeploy is the name of the artifact. So

frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
                    files = project.fileTree('src/main/deploy')
                    directory = '/home/lvuser/deploy'
                }
                // kernel parameters
                frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
                    files = project.fileTree('src/main/etc')
                    directory = '/etc'
                }

Is declaring the same artifact twice, and one overwrites the other. Change the second one to something like etcStaticFileDeploy. That name is arbitrary and can be anything.

I just made an issue to track turning that into an error if we can. Disallow adding 2 artifacts with the same name · Issue #11 · wpilibsuite/deploy-utils · GitHub

oh my God, thank you! i didn’t realize how it worked.