Skip to content

Add /uploadActivities#138

Merged
JosephVolosin merged 8 commits intodevelopfrom
feature/bulk-upload-activities
Feb 18, 2026
Merged

Add /uploadActivities#138
JosephVolosin merged 8 commits intodevelopfrom
feature/bulk-upload-activities

Conversation

@JosephVolosin
Copy link
Copy Markdown
Contributor

This PR adds the route /uploadActivities which allows uploading of a set of activities to a plan. The activities are expected in the plan JSON format.

See UI pull-request: NASA-AMMOS/plandev-ui#1843

@JosephVolosin JosephVolosin requested review from a team as code owners January 9, 2026 19:07
@JosephVolosin JosephVolosin added the publish Tells GH to publish docker images for this PR label Jan 9, 2026
Comment thread src/packages/plan/plan.ts Outdated
Comment thread src/packages/plan/plan.ts Outdated
Comment thread src/packages/plan/plan.ts
@JosephVolosin
Copy link
Copy Markdown
Contributor Author

Linter seems to be upset with how createdTags is being used:

Error: src/packages/plan/plan.ts(253,17): error TS6133: 'createdTags' is declared but its value is never read.
Error: src/packages/plan/plan.ts(396,13): error TS6133: 'createdTags' is declared but its value is never read.

Any ideas? I assume its cause its set in the try but only used in the catch

@duranb
Copy link
Copy Markdown
Contributor

duranb commented Jan 13, 2026

Linter seems to be upset with how createdTags is being used:

Error: src/packages/plan/plan.ts(253,17): error TS6133: 'createdTags' is declared but its value is never read.
Error: src/packages/plan/plan.ts(396,13): error TS6133: 'createdTags' is declared but its value is never read.

Any ideas? I assume its cause its set in the try but only used in the catch

For the first error, it doesn't look like you're using the createdTags array anywhere within the importPlan function. I believe it's because it now exists and is used within the createTags function you just created.

The second error looks like it's a scope issue. On line 391, you're declaring a const called createdTags, but on line 396, you're declaring another one within the try scope. The catch block doesn't have access to the last one created, just the one created on line 391. Effectively, the catch will never see a populated createdTags array.

@JosephVolosin
Copy link
Copy Markdown
Contributor Author

Linter seems to be upset with how createdTags is being used:

Error: src/packages/plan/plan.ts(253,17): error TS6133: 'createdTags' is declared but its value is never read.
Error: src/packages/plan/plan.ts(396,13): error TS6133: 'createdTags' is declared but its value is never read.

Any ideas? I assume its cause its set in the try but only used in the catch

For the first error, it doesn't look like you're using the createdTags array anywhere within the importPlan function. I believe it's because it now exists and is used within the createTags function you just created.

The second error looks like it's a scope issue. On line 391, you're declaring a const called createdTags, but on line 396, you're declaring another one within the try scope. The catch block doesn't have access to the last one created, just the one created on line 391. Effectively, the catch will never see a populated createdTags array.

I think it should be good now - I had to create both createdTags and tagMap prior to the try/catch and then set it from the result, seems like the linter is happy and createdTags should be full when referenced

Comment thread src/packages/plan/plan.ts Outdated
Comment thread src/packages/plan/plan.ts Outdated
Comment thread src/packages/plan/plan.ts
Copy link
Copy Markdown
Contributor

@duranb duranb left a comment

Choose a reason for hiding this comment

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

I think this is pretty much good to go! Just one small rename request. Thanks!

Comment thread src/types/dataset.ts Outdated
Copy link
Copy Markdown
Contributor

@duranb duranb left a comment

Choose a reason for hiding this comment

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

Thank you!

@duranb duranb force-pushed the feature/bulk-upload-activities branch from 289df10 to 0e8b006 Compare February 12, 2026 18:48
@JosephVolosin JosephVolosin merged commit b4c14da into develop Feb 18, 2026
5 checks passed
@JosephVolosin JosephVolosin deleted the feature/bulk-upload-activities branch February 18, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

publish Tells GH to publish docker images for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants